47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
|
<?php
|
||
|
/* @var $this AddPostFormController */
|
||
|
/* @var $model AddPostForm */
|
||
|
/* @var $form CActiveForm */
|
||
|
?>
|
||
|
|
||
|
<div class="form">
|
||
|
|
||
|
<?php $form=$this->beginWidget('CActiveForm', array(
|
||
|
'id'=>'add-post-form-addPost-form',
|
||
|
// Please note: When you enable ajax validation, make sure the corresponding
|
||
|
// controller action is handling ajax validation correctly.
|
||
|
// See class documentation of CActiveForm for details on this,
|
||
|
// you need to use the performAjaxValidation()-method described there.
|
||
|
'enableAjaxValidation'=>false,
|
||
|
'htmlOptions' => array('enctype' => 'multipart/form-data'),
|
||
|
)); ?>
|
||
|
|
||
|
<p class="note">Fields with <span class="required">*</span> are required.</p>
|
||
|
|
||
|
<?php echo $form->errorSummary($model); ?>
|
||
|
|
||
|
<div class="row">
|
||
|
<?php echo $form->labelEx($model,'title'); ?>
|
||
|
<?php echo $form->textField($model,'title'); ?>
|
||
|
<?php echo $form->error($model,'title'); ?>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<?php echo $form->labelEx($model,'text'); ?>
|
||
|
<?php echo $form->textArea($model,'text'); ?>
|
||
|
<?php echo $form->error($model,'text'); ?>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<?php echo $form->labelEx($model,'image'); ?>
|
||
|
<?php echo $form->fileField($model,'image'); ?>
|
||
|
<?php echo $form->error($model,'image'); ?>
|
||
|
</div>
|
||
|
|
||
|
<div class="row buttons">
|
||
|
<?php echo CHtml::submitButton('Submit'); ?>
|
||
|
</div>
|
||
|
|
||
|
<?php $this->endWidget(); ?>
|
||
|
|
||
|
</div><!-- form -->
|