<div id="login-page"></div>
<?php $logos = param('logos'); ?>
<?php $titles = param('appTitles'); ?>
<?php $loginLogoStyle = paramdeep('logosStyles', 'login'); ?>
<?php $loginLogo = $logos['login']; ?>
<?php $mainTitle = $titles['main_title']; ?>
<?php $mainTitleIsHtml = $titles['main_title_is_html']; ?>
<?php $subTitle = $titles['sub_title']; ?>
<?php $subTitleIsHtml = $titles['sub_title_is_html']; ?>
<div class="row">
  <div class="span6">
    <?php if(isset($loginLogo)) { ?>
      <center>
        <?php if($mainTitle) { ?>
          <?php if($mainTitleIsHtml) { ?>
            <?php echo $mainTitle; ?>
          <?php } else { ?>
            <h2>
              <?php echo htmlspecialchars($mainTitle,ENT_QUOTES,'UTF-8'); ?>
            </h2>
          <?php } ?>
        <?php } ?>
        <?php if($subTitle) { ?>
          <?php if($subTitleIsHtml) { ?>
            <?php echo $subTitle; ?>
          <?php } else { ?>
            <h3>
              <?php echo htmlspecialchars($subTitle,ENT_QUOTES,'UTF-8'); ?>
            </h3>
          <?php } ?>
        <?php } ?>
        <img <?php echo MtHaml\Runtime::renderAttributes(array(array('class', 'login-logo'), array('src', ((Yii::app()->baseUrl) . '/images/' . $loginLogo)), array('style', $loginLogoStyle)), 'html5', 'UTF-8'); ?> />
      </center>
    <?php } ?>
  </div>
  <div class="login-box span4 offset2">
    <h2><?php echo htmlspecialchars(Yii::t('app','Login'),ENT_QUOTES,'UTF-8'); ?></h2>
    <?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array('id'=>'login-form','focus' => array($model,'username'),)); ?>
    <?php echo $form->errorSummary($model); ?>
    <?php echo $form->textFieldRow($model,'username', array('class'=>'span4', 'placeholder'=>'username')); ?>
    <?php echo $form->passwordFieldRow($model,'password', array('class'=>'span4', 'placeholder'=>'password')); ?>
    <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=> Yii::t('app', 'Login'))); ?>
    <?php $this->endWidget(); ?>
  </div>
</div>
