コード例 #1
0
ファイル: FormRenderer.php プロジェクト: balrok/aiajaya
 public function run()
 {
     $htmlOptions = array_merge(array('class' => 'form wide'), $this->htmlOptions);
     $form = new CForm($this->form, $this->form['model']);
     echo CHtml::openTag('div', $htmlOptions);
     echo $form->renderBegin();
     foreach ($form->getElements() as $element) {
         echo CHtml::openTag('div', array('class' => 'row'));
         echo $element->render();
         echo '</div>';
     }
     echo '<div style="display:block; height:30px; margin-top:10px;">';
     echo $form->renderButtons();
     echo '</div>';
     echo $form->getActiveFormWidget()->errorSummary($this->form['model']) . "\n";
     echo $form->renderEnd();
     echo '</div>';
 }
コード例 #2
0
ファイル: MultiModelForm.php プロジェクト: dev-lav/htdocs
 /**
  * Modified for bootstrapLayout
  */
 public function renderButtons()
 {
     if ($this->parentWidget->bootstrapLayout) {
         $output = '';
         foreach ($this->getButtons() as $button) {
             $output .= $this->renderElement($button);
         }
         return $output !== '' ? "<div class=\"form-actions\">" . $output . "</div>\n" : '';
     } else {
         parent::renderButtons();
     }
 }