<?php echo CHtml::form('','post', array('id' => 'addfile-form', 'enctype'=>'multipart/form-data')); ?>
<?php echo CHtml::errorSummary($files); ?>
<table class="table table-bordered">
<tr>
<td class="span4">
<?php echo CHtml::activeLabel(
$files,
'email'
); ?>
</td>
<td class="span8">
<?php
echo CHtml::activeEmailField(
$files,
'email',
!Yii::app()->user->isGuest ?
array(
'value' => Yii::app()->user->email,
'readonly' => 'readonly'
)
:
- ''
+ array()
)
?>
</td>
</tr>
<tr>
<td>
<?php echo CHtml::activeLabel($files, 'name'); ?>
</td>
<td>
<?php
echo CHtml::activeTextField(
$files,
'name',
!Yii::app()->user->isGuest ?
array(
'value' => Yii::app()->user->name,
'readonly' => 'readonly'
)
:
- ''
+ array()
)
?>
</td>
</tr>
<tr>
<td>
<?php echo CHtml::activeLabel($files, 'demo_real');?>
</td>
<td>
<?php echo CHtml::activeFileField($files, 'demo_real');?>
</td>
</tr>
<tr>
<td>
<?php echo CHtml::activeLabel($files, 'comment');?>
</td>
<td>
<?php echo CHtml::activeTextArea($files, 'comment');?>
</td>
</tr>
<?php if(CCaptcha::checkRequirements() && Yii::app()->user->isGuest):?>
<tr>
<td>
<?php echo CHtml::activeLabel($files, 'verifyCode');?>
</td>
<td class="verifyCode">
<?php echo CHtml::activeTextField($files, 'verifyCode');?>
<?php $this->widget('CCaptcha');?>
</td>
</tr>
<?php endif?>
<tr>
<td class="downbtn" colspan="2">
<?php echo CHtml::submitButton('Добавить файл');?>
<input value="Отмена" type="reset" name="otmenayt3"/>
</td>
</tr>
</table>
<?php echo CHtml::endForm(); ?>
</div>