Новичок
Покинул форум
Сообщений всего: 1
Дата рег-ции: Март 2014
Помог: 0 раз(а)
|
Parse error: syntax error, unexpected '[' in Z:\home\mysite.ru\www\protected\views\teacher\_form.php on line 53
PHP:
скопировать код в буфер обмена
<?PHP /* @var $this TeacherController */ /* @var $model Teacher */ /* @var $form CActiveForm */ Yii::import('ext.imperavi-redactor-widget.ImperaviRedactorWidget'); ?> <div class="form"> <?PHP $form=$this->beginWidget('CActiveForm', array( 'id'=>'teacher-form', // Please note: When you enable ajax validation, make sure the corresponding // controller action is handling ajax validation correctly. // There is a call to performAjaxValidation() commented in generated controller code. // See class documentation of CActiveForm for details on this. 'enableAjaxValidation'=>false, 'htmlOptions' => array('enctype' => 'multipart/form-data'), )); ?> <p class="note">Поля отмеченые <span class="required">*</span> обязательны.</p> <?PHP echo $form->errorSummary($model); ?> <div class="row"> <h2><?PHP echo $form->labelEx($model,'login'); ?></h2> <?PHP echo $form->textField($model,'login',array('size'=>45,'maxlength'=>45 )); ?> <?PHP echo $form->error($model,'login'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'password'); ?></h2> <?PHP echo $form->passwordField($model,'password',array('size'=>45,'maxlength'=>45 )); ?> <?PHP echo $form->error($model,'password'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'name'); ?></h2> <?PHP echo $form->textField($model,'name',array('size'=>60,'maxlength'=>100 )); ?> <?PHP echo $form->error($model,'name'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'info'); ?></h2> <?PHP $this->widget('ImperaviRedactorWidget', array( // You can either use it for model attribute 'model' => $model, 'attribute' => 'info', 'lang' => 'ru', 'toolbar' => true, 'iframe' => true, 'buttons' => ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'table', 'link', 'alignment', 'horizontalrule', 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify'], 'minHeight' => 150 ), )); ?> <?PHP echo $form->error($model,'info'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'lesson'); ?></h2> <?PHP $this->widget('ImperaviRedactorWidget', array( // You can either use it for model attribute 'model' => $model, 'attribute' => 'lesson', 'lang' => 'ru', 'toolbar' => true, 'iframe' => true, 'buttons' => ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'table', 'link', 'alignment', 'horizontalrule', 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify'], 'minHeight' => 150 ), )); ?> <?PHP echo $form->error($model,'lesson'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'work'); ?></h2> <?PHP $this->widget('ImperaviRedactorWidget', array( // You can either use it for model attribute 'model' => $model, 'attribute' => 'work', 'lang' => 'ru', 'toolbar' => true, 'iframe' => true, 'buttons' => ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'table', 'link', 'alignment', 'horizontalrule', 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify'], 'minHeight' => 150 ), )); ?> <?PHP echo $form->error($model,'work'); ?> </div> <div class="row"> <h2>Дипломы и сертификаты</h2> <p>Добавление</p> <?PHP $this->widget('CMultiFileUpload', array( 'name' => 'diplomsAdd', 'accept' => 'jpeg|jpg|gif|png', // useful for verifying files 'duplicate' => 'Duplicate file!', // useful, i think 'denied' => 'Invalid file type', // useful, i think )); ?> <?PHP if(count($model->diplomImages)>0 ) { echo '<br /><p>Удаление</p>'; $index = 1; foreach($model->diplomImages as $image) { echo '<input value="'.$image->id.'" id="diplomsRem_'.$index.'" type="checkbox" name="diplomsRem[]">'; echo '<label for="diplomsRem_'.$index.'">'.CHtml ::image($image->path,'',array('width'=>100,'height'=>100)).'</label>'; $index++; } } ?> </div> <div class="row"> <h2>Фото</h2> <p>Добавление</p> <?PHP $this->widget('CMultiFileUpload', array( 'name' => 'fotoAdd', 'accept' => 'jpeg|jpg|gif|png', // useful for verifying files 'duplicate' => 'Duplicate file!', // useful, i think 'denied' => 'Invalid file type', // useful, i think )); ?> <?PHP if(count($model->fotoImages)>0 ) { echo '<br /><p>Удаление</p>'; $index = 1; foreach($model->fotoImages as $image) { echo '<input value="'.$image->id.'" id="fotoRem_'.$index.'" type="checkbox" name="fotoRem[]">'; echo '<label for="fotoRem_'.$index.'">'.CHtml ::image($image->path,'',array('width'=>100,'height'=>100)).'</label>'; $index++; } } ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'award'); ?></h2> <?PHP $this->widget('ImperaviRedactorWidget', array( // You can either use it for model attribute 'model' => $model, 'attribute' => 'award', 'lang' => 'ru', 'toolbar' => true, 'iframe' => true, 'buttons' => ['html', 'formatting', 'bold', 'italic', 'deleted', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'table', 'link', 'alignment', 'horizontalrule', 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify'], 'minHeight' => 150 ), )); ?> <?PHP echo $form->error($model,'award'); ?> </div> <div class="row"> <h2><?PHP echo $form->labelEx($model,'avatar'); ?></h2> <?PHP echo CHtml::activeFileField($model, 'avatar'); ?> <?PHP echo $form->error($model,'avatar'); ?> </div> <div class="row buttons"> <?PHP echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?> </div> <?PHP $this->endWidget(); ?> </div><!-- form -->
|