Пример #1
0
 public function run()
 {
     // If form is empty, we will not add the form wrappers
     if (!empty($this->form)) {
         parent::run();
         return;
     }
     $this->form = $this->beginWidget('CActiveForm', array('id' => $this->modelName . '-form', 'enableAjaxValidation' => false));
     parent::run();
     echo X2Html::tag('div', array('class' => 'row buttons save-button-row'));
     $text = $this->model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Save');
     echo X2Html::submitButton($text, array('class' => 'x2-button', 'id' => 'save-button', 'tabindex' => 24));
     echo '</div>';
     $this->endWidget();
 }