<?php
/* @var $this EventsController */
/* @var $model Events */
/* @var $form CActiveForm */
?>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'events-form',
	'enableAjaxValidation'=>false,
)); ?>

<div id="row">
  <fieldset id="current">
    <legend><strong>New Event</strong></legend>
    <br />
    <table width="800" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="126"><?php echo $form->labelEx($model,'event_title'); ?><br /></td>
        <td width="654">&nbsp;&nbsp; <?php echo $form->textField($model,'event_title'); ?> <?php echo $form->error($model,'event_title'); ?></td>
      </tr>
      <tr>
        <td>Event Date</td>
        <td>&nbsp;&nbsp;
        	<?php
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model'=>$model,
			'attribute'=>"event_date", // the name of the field
			'language'=> 'en-GB',
			// additional javascript options for the date picker plugin
			'options'=>array(
			'dateFormat'=>'yy-mm-dd',
			'buttonText'=>'Select',
			'showAnim'=>'fold',
			'showOn'=>'button',
			'showButtonPanel'=>false,
			'yearRange'=>'1900',
			'debug'=>true,
			),
			'htmlOptions'=>array(
			'style'=>'height:20px;'
			),
			));
			?>
            <?php echo $form->error($model,'event_date'); ?>
      </td>
      </tr>
      <tr>
        <td><?php echo $form->labelEx($model,'event_time'); ?></td>
        <td>&nbsp;&nbsp; 
			<?php  
            $this->widget(
            'ext.EJuiDateTimePicker.EJuiDateTimePicker',
            array(
            'model'     => $model,
            'attribute' => 'event_time',
            'language'=> 'en-GB',//default Yii::app()->language
            'mode'    => 'time',//'datetime' or 'time' ('datetime' default)
            'options'   => array(
            //'dateFormat' => 'dd.mm.yy',
            //'timeFormat' => '',//'hh:mm tt' default
            ),
            )
            ); ?> 
		<?php echo $form->error($model,'event_time'); ?></td>
      </tr>
      <tr>
        <td><?php echo $form->labelEx($model,'event_end_date'); ?></td>
        <td>&nbsp;&nbsp; 
		<?php
			$this->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model'=>$model,
			'attribute'=>"event_end_date", // the name of the field
			'language'=> 'en-GB',
			// additional javascript options for the date picker plugin
			'options'=>array(
			'dateFormat'=>'yy-mm-dd',
			'buttonText'=>'Select',
			'showAnim'=>'fold',
			'showOn'=>'button',
			'showButtonPanel'=>false,
			'yearRange'=>'1900',
			'debug'=>true,
			),
			'htmlOptions'=>array(
			'style'=>'height:20px;'
			),
			));
		?> 
		<?php echo $form->error($model,'event_end_date'); ?></td>
      </tr>
      <tr>
        <td><?php echo $form->labelEx($model,'event_end_time'); ?></td>
        <td>&nbsp;&nbsp; 
			<?php  
            $this->widget(
            'ext.EJuiDateTimePicker.EJuiDateTimePicker',
            array(
            'model'     => $model,
            'attribute' => 'event_end_time',
            'language'=> 'en-GB',//default Yii::app()->language
            'mode'    => 'time',//'datetime' or 'time' ('datetime' default)
            'options'   => array(
            //'dateFormat' => 'dd.mm.yy',
            //'timeFormat' => '',//'hh:mm tt' default
            ),
            )
            ); ?> 
		<?php echo $form->error($model,'event_end_time'); ?></td>
      </tr>
      <tr>
        <td valign="top"><?php echo $form->labelEx($model,'description'); ?></td>
        <td>&nbsp;&nbsp;&nbsp; <?php echo $form->textArea($model,'description',array('rows'=>10, 'cols'=>80,'class'=>'ckeditor')); ?> <?php echo $form->error($model,'description'); ?></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td>&nbsp;&nbsp;&nbsp; <?php echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Save'); ?></td>
      </tr>
    </table>
  </fieldset>
</div>
<?php $this->endWidget(); ?>
