/** * Konstruiert das Metadaten-Formular aus verschiedenen Unterformularen und den Aktion Buttons. */ public function init() { parent::init(); $this->setDecorators(array('FormElements', array(array('wrapperDivClose' => 'HtmlTag'), array('tag' => 'div', 'closeOnly' => 'true', 'placement' => 'append')))); $this->addSubForm(new Admin_Form_ActionBox($this), 'ActionBox'); $subform = new Admin_Form_InfoBox(); $subform->addDecorator(array('wrapperDivOpen' => 'HtmlTag'), array('tag' => 'div', 'placement' => 'prepend', 'class' => 'wrapper', 'openOnly' => 'true')); $this->addSubForm($subform, 'InfoBox'); $this->addSubForm(new Admin_Form_Document_General(), 'General'); $this->addSubForm(new Admin_Form_Document_Persons(), 'Persons'); // Bibliographische Beschreibung $this->addSubForm(new Admin_Form_Document_Titles(), 'Titles'); $this->addSubForm(new Admin_Form_Document_Bibliographic(), 'Bibliographic'); $this->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Series', 'Series', new Form_Validate_MultiSubForm_RepeatedValues('SeriesId', 'admin_document_error_repeated_series'), array('columns' => array(array(), array('label' => 'Opus_Model_Dependent_Link_DocumentSeries_Number'), array('label' => 'Opus_Model_Dependent_Link_DocumentSeries_SortOrder')))), 'Series'); $this->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Enrichment', 'Enrichment', null, array('columns' => array(array('label' => 'KeyName'), array('label' => 'Value')))), 'Enrichments'); $this->addSubForm(new Admin_Form_Document_Collections(), 'Collections'); // Inhaltliche Erschließung $subform = new Admin_Form_Document_Section(); $subform->setLegend('admin_document_section_content'); $subform->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Abstract', 'TitleAbstract', new Form_Validate_MultiSubForm_RepeatedValues('Language', 'admin_document_error_MoreThanOneTitleInLanguage')), 'Abstracts'); $subform->addSubForm(new Admin_Form_Document_Subjects(), 'Subjects'); $this->addSubForm($subform, 'Content'); // Weiteres Allgemeines $this->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Identifier', 'Identifier', new Form_Validate_MultiSubForm_RepeatedValues('Value', 'admin_document_error_repeated_identifier', 'Type'), array('columns' => array(array('label' => 'Opus_Identifier_Type'), array('label' => 'Text')))), 'Identifiers'); $this->addSubForm(new Admin_Form_Document_Licences(), 'Licences'); $this->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Patent', 'Patent'), 'Patents'); $this->addSubForm(new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Note', 'Note'), 'Notes'); $this->addSubForm(new Admin_Form_Document_Actions(), 'Actions'); }
public function testIsEmpty() { $form = new Admin_Form_InfoBox(); $this->assertFalse($form->isEmpty()); }