<?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'=>'video-centre-form',
	'enableAjaxValidation'=>false,
        'htmlOptions' => array(
        'enctype' => 'multipart/form-data',
        ),
)); ?>

	

	<?php echo $form->errorSummary($model); ?>

	<div id="row">
  <fieldset id="current">
    <legend><strong>Video center</strong></legend>
    <br />
    <table width="800" border="0" cellspacing="0" cellpadding="5">
      
      <tr>
        <td><?php echo $form->labelEx($model,'user_group_id'); ?></td>
        <td>
		
		<?php echo $form->dropDownList($model,'user_group_id',UserGroup::userGroupFrontEnd(),array('prompt'=>'-None-',
                    'ajax' => array(
                    'type'=>'POST',
                    'url'=>CController::createUrl('Product/updateProduct'), 
                    'data'=>array(
                                              'user_group_id'=>'js:$("#VideoCenter_user_group_id :selected").val()',  
                                              
                                              ),
                    'success'=>'js:function(data){
                            $("#VideoCenter_product_id").html(data)
                            }'
                                )
                    )); ?>
		<?php echo $form->error($model,'user_group_id'); ?>
	</td>
      </tr>
      
      
      <?php /*<tr>
        <td>
		<?php echo $form->labelEx($model,'product_id'); ?>
            </td>
        <td>
		<?php echo $form->dropDownList($model,'product_id',Product::getProduct(null,null,null,true,null),array('prompt'=>'-All-',
                
                    )); ?>
		<?php echo $form->error($model,'product_id'); ?>
	</td>
      </tr>*/ ?>
      
      <tr>
        <td>
		<?php echo $form->labelEx($model,'purpose'); ?>
            </td>
        <td>
		<?php echo $form->dropDownList($model,'purpose',array('configuration'=>'Configuration','product_feature_demo'=>'Product Feature & Demo','solution_intro'=>'Solution Intro',),array('prompt'=>'-Not specified-')); ?>
		<?php echo $form->error($model,'purpose'); ?>
	</td>
      </tr>
      
      <tr>
        <td>
		<?php echo $form->labelEx($model,'title'); ?>
            </td>
        <td>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</td>
      </tr>
      
      <tr>
        <td>
		<?php echo $form->labelEx($model,'brief_description'); ?>
            </td>
        <td>
		<?php echo $form->textArea($model,'brief_description',array('maxlength'=>1000)); ?>
		<?php echo $form->error($model,'brief_description'); ?>
	</td>
      </tr>
      
      
      <tr>
        <td>
		<?php echo $form->labelEx($model,'date'); ?>
            </td>
        <td>
		<?php 
                    $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                        'model'=>$model,
                                'attribute'=>'date',
                                // additional javascript options for the date picker plugin
                                'options'=>array(
                                'showAnim'=>'fold',
                                     'changeMonth' => 'true',
                                     'changeYear' => 'true',
                                    'showButtonPanel' => 'true',
                            ),
                            'htmlOptions'=>array(
                                'style'=>'height:20px;'
                            ),
                        ));
              ?>
		<?php echo $form->error($model,'date'); ?>
	</td>
      </tr>
      
      <tr>
        <td>
		<?php echo $form->labelEx($model,'video_script'); ?>
            </td>
        <td>
		<?php echo $form->textField($model,'video_script',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'video_script'); ?>
	</td>
      </tr>
      
      
      <tr>
          <td>
		
	</td>
        <td>
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Save'); ?>
	</td>
      </tr>
      </table>
  </fieldset>
</div>

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

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