<?php
/* @var $this InicioController */
/* @var $model Inicio */
/* @var $form CActiveForm */
?>

<div class="row">
	<div class="col-lg-12">
		<a href="<?php echo $this->createUrl('index');?>">
            <button class="btn btn-green"><i class="fa fa-arrow-left" style="margin-right:8px;"></i>Regresar</button>
        </a>

        <div style="margin:15px"></div>

        <div class="portlet portlet-default">
            <div class="portlet-heading">
                <div class="portlet-title">
                    <h4>Editar contenido - <?php echo $model->titulo;?></h4>
                </div>
                
                <div class="clearfix"></div>
            </div>
            
            <div class="portlet-body">
                
                <?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
					'id'=>'inicio-form',
					'enableAjaxValidation'=>false,
				    'method'=>'post',
				    'htmlOptions'=>array(
						'enctype'=>'multipart/form-data'
					)
				)); ?>

					<small>Campos con * son requeridos</small>
					<br>
					<?php echo $form->errorSummary($model,'Opps!!!', null,array('class'=>'alert alert-error')); ?>
					<hr>

                    
                    <div class="form-group">
                    	<?php echo $form->textArea($model,'html',array('rows'=>12, 'cols'=>120)); ?>
                    </div>

                    <div class="form-actions">
						<?php $this->widget('bootstrap.widgets.TbButton', array(
							'buttonType'=>'submit',
							'type'=>'primary',
				            'htmlOptions'=> array('class'=>'btn btn-default'),  
							'label'=>$model->isNewRecord ? 'Crear' : 'Guardar',
						)); ?>

						<a href="<?php echo $this->createUrl('index');?>">
							<button type="button" class="btn btn-default">Cancelar</button>
						</a>

					</div>

                <?php $this->endWidget(); ?>

            </div>  
        </div>
	</div>
</div>

<?php 

    $cs=Yii::app()->clientScript;

    $cs->registerScript('plugin_ck',

        '$(document).ready(function() {
        
	        CKEDITOR.config.contentsCss  = ["http://centinelasmayab.org/themes/site/plugins/bootstrap/css/bootstrap.min.css","http://centinelasmayab.org/themes/site/css/style.css"];


            CKEDITOR.replace( "Inicio_html", {
                toolbar: "Full",
                height: 200,               
            });


        });',

        CClientScript::POS_END);

?>