<?php
/* @var $this BannerController */
/* @var $model Banner */
/* @var $form CActiveForm */
?>

<div id="communicationsbox" style="height:525px; background-color:#f7eee1;">
<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
    }
?>

  <div id="form_wrapper">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'banner-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array
	(
	'enctype' => 'multipart/form-data',
	)
)); ?>
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

        <div class="row">
		<?php echo $form->labelEx($model,'href'); ?>
		<?php echo $form->textField($model,'href',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'href'); ?>
	</div>
      
	<div class="row">
		<?php //echo $form->labelEx($model,'description'); ?>
		<?php //echo $form->textArea($model,'description',array('size'=>60,'maxlength'=>1000)); ?>
		<?php //echo $form->error($model,'description'); ?>
                <?php if(!$model->isNewRecord): ?>
                <?php echo CHtml::image(Yii::app()->baseUrl."/../partner/media/banner/".$model->banner, "banner",array()) ?>
                <?php endif; ?>
	</div>
        
        
      
	<div class="row">
		<?php echo $form->labelEx($model,'banner'); ?>
		<?php echo $form->fileField($model,'banner'); ?>
		<?php echo $form->hiddenField($model,'banner'); ?>
		<?php echo $form->error($model,'banner'); ?>
	</div>
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

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

</div><!-- form -->
</div>