예제 #1
0
 /**
  * (non-PHPdoc)
  * @see adminPage::output()
  */
 public function output(extasyDocument $doc = null, $szTitle = '', $bEdit = true)
 {
     if (!empty($this->typeInfo['edit_fields'])) {
         $design = CMSDesign::getInstance();
         $design->begin($this->viewBeginPath, $szTitle);
         $design->documentBegin();
         $design->header($szTitle);
         $design->formBegin();
         $design->hidden('typeName', $this->modelName);
         if ($bEdit) {
             $design->hidden('id', $doc->id);
             $design->submit('submit', _msg('Сохранить'));
         } else {
             $design->submit('submit', _msg('Добавить'));
         }
         $design->tableBegin();
         $fieldList = explode(',', $this->typeInfo['edit_fields']);
         foreach ($fieldList as $fieldName) {
             $title = !empty($this->typeInfo['fields'][$fieldName]['title']) ? $this->typeInfo['fields'][$fieldName]['title'] : $fieldName;
             $help = !empty($this->typeInfo['fields'][$fieldName]['cms_help']) ? $this->typeInfo['fields'][$fieldName]['cms_help'] : '';
             $design->row2cell($title, $doc->attr($fieldName, true)->getAdminFormValue(), $help);
         }
         $design->TableEnd();
         foreach ($this->aBackUrlParams as $key => $row) {
             $design->hidden($key, htmlspecialchars($row));
         }
         if ($bEdit) {
             $design->submit('submit', _msg('Сохранить'));
         } else {
             $design->submit('submit', _msg('Добавить'));
         }
         $design->formEnd();
         $design->documentEnd();
         $design->end();
     } else {
         if ($bEdit) {
             $doc->getAdminUpdateForm();
         } else {
             $doc->getAdminInsertForm();
         }
     }
     parent::output();
 }
예제 #2
0
파일: model.php 프로젝트: gudwin/extasy
 public function getAdminInsertForm()
 {
     parent::getAdminInsertForm();
 }