<?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.0
 */
 
?>

<ul class="nav nav-tabs" style="border-bottom: 0px;">
    <?php foreach ($types as $typeName) {?>
    <li class="<?php echo $typeName == $type ? 'active' : 'inactive';?>"><a href="<?php echo $this->createUrl('settings/email_templates', array('type' => $typeName))?>"><?php echo CHtml::encode(Yii::t('settings', ucfirst($typeName)));?></a></li>
    <?php } ?>
</ul>

<?php $form = $this->beginWidget('CActiveForm'); ?>
<div class="panel panel-default">
    
    <div class="panel-heading">
        <div class="pull-left">
            <h3 class="panel-title"><?php echo Yii::t('settings', 'Email templates - {type}', array('{type}' => CHtml::encode(ucfirst($type))));?></h3>
        </div>
        <div class="pull-right">
            <?php echo CHtml::link(Yii::t('app', 'Cancel'), array('settings/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">
            <?php echo $form->labelEx($model, 'common');?>
            <?php echo $form->textArea($model, 'common', $model->getHtmlOptions('common', array('rows' => 20))); ?>
            <?php echo $form->error($model, 'common');?>
        </div>
        
        <div class="callout">
            <?php echo $model->getAttributeHelpText('common');?>
        </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(); ?>