<?php defined('MW_PATH') || exit('No direct script access allowed');

/**
 * This file is part of the MailWizz EMA application.
 * 
 * @package MailWizz EMA
 * @author Serban George Cristian <cristian.serban@mailwizz.com> 
 * @link http://www.mailwizz.com/
 * @copyright 2013-2014 MailWizz EMA (http://www.mailwizz.com)
 * @license http://www.mailwizz.com/license/
 * @since 1.1
 */
 
?>
    
<?php $form = $this->beginWidget('CActiveForm'); ?>
<div class="panel panel-default">
    
    <div class="panel-heading">
        <div class="pull-left">
            <h3 class="panel-title"><span class="glyphicon glyphicon-flag"></span> <?php echo $pageHeading;?></h3>
        </div>
        <div class="pull-right">
            <?php if (!$language->isNewRecord) { ?>
            <?php echo CHtml::link(Yii::t('app', 'Create new'), array('languages/create'), array('class' => 'btn btn-default btn-xs', 'title' => Yii::t('app', 'Create new')));?>
            <?php } ?>
            <?php echo CHtml::link(Yii::t('app', 'Cancel'), array('languages/index'), array('class' => 'btn btn-default btn-xs', 'title' => Yii::t('app', 'Cancel')));?>
        </div>
        <div class="clearfix"><!-- --></div>
    </div>
    
    <div class="panel-body">
        
        <div class="form-group col-lg-3">
            <?php echo $form->labelEx($language, 'name');?>
            <?php echo $form->textField($language, 'name', $language->getHtmlOptions('name')); ?>
            <?php echo $form->error($language, 'name');?>
        </div>        

        <div class="form-group col-lg-3">
            <?php echo $form->labelEx($language, 'language_code');?>
            <?php echo $form->textField($language, 'language_code', $language->getHtmlOptions('language_code')); ?>
            <?php echo $form->error($language, 'language_code');?>
        </div> 
        
        <div class="form-group col-lg-3">
            <?php echo $form->labelEx($language, 'region_code');?>
            <?php echo $form->textField($language, 'region_code', $language->getHtmlOptions('region_code')); ?>
            <?php echo $form->error($language, 'region_code');?>
        </div> 
        
        <div class="form-group col-lg-3">
            <?php echo $form->labelEx($language, 'is_default');?>
            <?php echo $form->dropDownList($language, 'is_default', $language->getIsDefaultOptionsArray(), $language->getHtmlOptions('is_default')); ?>
            <?php echo $form->error($language, 'is_default');?>
        </div>   
    
        <div class="clearfix"><!-- --></div>

    </div>
    
    <div class="panel-footer">
        <div class="pull-right">
            <button type="submit" class="btn btn-default btn-submit" data-loading-text="<?php echo Yii::t('app', 'Please wait, processing...');?>"><?php echo Yii::t('app', 'Save changes');?></button>
        </div>
        <div class="clearfix"><!-- --></div>
    </div>
    
</div>
<?php $this->endWidget(); ?>