/** Delete a decorative style */ public function deletedecorationstyleAction() { if ($this->_request->isPost()) { $id = (int) $this->_request->getPost('id'); $del = $this->_request->getPost('del'); if ($del == 'Yes' && $id > 0) { $decs = new Decstyles(); $where = 'id = ' . $id; $decs->delete($where); } $this->_flashMessenger->addMessage(self::DELETED); $this->_redirect($this->_redirectUrl . 'decorationstyles'); } else { $id = (int) $this->_request->getParam('id'); if ($id > 0) { $decs = new Decstyles(); $this->view->dec = $decs->fetchRow('id=' . $id); } } }
public function __construct($options = null) { //Get data to form select menu for discovery methods $discs = new DiscoMethods(); $disc_options = $discs->getOptions(); //Get data to form select menu for manufacture methods $mans = new Manufactures(); $man_options = $mans->getOptions(); //Get data to form select menu for primary and secondary material $primaries = new Materials(); $primary_options = $primaries->getPrimaries(); //Get data to form select menu for periods $periods = new Periods(); $period_options = $periods->getPeriodFrom(); //Get data to form select menu for cultures $cultures = new Cultures(); $culture_options = $cultures->getCultures(); //Get data to form Surface treatments menu $surfaces = new Surftreatments(); $surface_options = $surfaces->getSurfaces(); //Get data to form Decoration styles menu $decorations = new Decstyles(); $decoration_options = $decorations->getStyles(); //Get data to form Decoration methods menu $decmeths = new Decmethods(); $decmeth_options = $decmeths->getDecmethods(); //Get Find of note reason data $reasons = new Findofnotereasons(); $reason_options = $reasons->getReasons(); //Get Preservation data $preserves = new Preservations(); $preserve_options = $preserves->getPreserves(); //Get Rally data $rallies = new Rallies(); $rally_options = $rallies->getRallies(); $periods = new Periods(); $periodword_options = $periods->getPeriodFromWords(); $circa = new DateQualifiers(); $circa_o = $circa->getTerms(); $actions = new SubsequentActions(); $actionsDD = $actions->getSubActionsDD(); //End of select options construction parent::__construct($options); $decorator = array('SimpleInput'); $decoratorButton = array('NormalDecButton'); $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li'))); $decoratorsHide = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hideme')), array('HtmlTag', array('tag' => 'li'))); $decoratorsRally = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hiderally')), array('HtmlTag', array('tag' => 'li'))); $decoratorsHoard = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hidehoard')), array('HtmlTag', array('tag' => 'li'))); $decoratorsNote = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hidenote')), array('HtmlTag', array('tag' => 'li'))); $this->setName('finds'); $secuid = new Zend_Form_Element_Hidden('secuid'); $secuid->removeDecorator('label')->removeDecorator('HtmlTag')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum'); // Object specifics $old_findID = new Zend_Form_Element_Hidden('old_findID'); $old_findID->removeDecorator('label')->removeDecorator('HtmlTag')->addFilters(array('StripTags', 'StringTrim')); //Objecttype - autocomplete from thesaurus $objecttype = new Zend_Form_Element_Text('objecttype'); $objecttype->setLabel('Object type: ')->setRequired(true)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->addValidator('ValidObjectType')->setDecorators($decorators); $objecttypecert = new Zend_Form_Element_Radio('objecttypecert'); $objecttypecert->setLabel('Object type certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''))->setDecorators($decorators); //Object description $description = new Pas_Form_Element_RTE('description'); $description->setLabel('Object description: ')->setRequired(false)->setAttrib('rows', 10)->setAttrib('cols', 40)->setAttrib('Height', 400)->setAttrib('ToolbarSet', 'Finds')->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars')); //Object notes $notes = new Pas_Form_Element_RTE('notes'); $notes->setLabel('Notes: ')->setRequired(false)->setAttrib('rows', 5)->setAttrib('cols', 60)->setAttrib('ToolbarSet', 'Finds')->setAttrib('Height', 250)->addFilters(array('StringTrim', 'BasicHtml', 'EmptyParagraph', 'WordChars')); //Find of note $findofnote = new Zend_Form_Element_Checkbox('findofnote'); $findofnote->setLabel('Find of Note: ')->setRequired(false)->setCheckedValue('1')->setUncheckedValue(NULL)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators)->addValidator('NotEmpty', 'Int'); //Reason for find of note $findofnotereason = new Zend_Form_Element_Select('findofnotereason'); $findofnotereason->setLabel('Why this find is considered noteworthy: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a reasoning', 'Available reasons' => $reason_options))->addValidator('InArray', false, array(array_keys($reason_options)))->addValidator('Int')->setDecorators($decoratorsNote); //Find classification $class = new Zend_Form_Element_Text('classification'); $class->setLabel('Classification: ')->setAttrib('size', 60)->setRequired(false)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Find subclassification $subclass = new Zend_Form_Element_Text('subclass'); $subclass->setLabel('Sub-classification: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alnum', false, array('allowWhiteSpace' => true))->setDecorators($decorators)->setAttrib('size', 60); //Inscription: Only available if !=coin $inscription = new Zend_Form_Element_Text('inscription'); $inscription->setLabel('Inscription: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addValidator('Alnum', false, array('allowWhiteSpace' => true))->setDecorators($decorators); //Treasure: enumerator 1/0 $treasure = new Zend_Form_Element_Checkbox('treasure'); $treasure->setLabel('Treasure: ')->setRequired(false)->setCheckedValue('1')->setUncheckedValue(NULL)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Treasure: enumerator 1/0 $treasureID = new Zend_Form_Element_Text('treasureID'); $treasureID->setLabel('Treasure number: ')->setRequired(false)->addValidator('Alnum', false, array('allowWhiteSpace' => false))->addFilters(array('StripTags', 'StringTrim', 'StringToUpper'))->setDecorators($decoratorsHide); // Temporal details section // //Broadperiod: $broadperiod = new Zend_Form_Element_Select('broadperiod'); $broadperiod->setLabel('Broad period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose broadperiod', 'Available periods' => $periodword_options))->setDecorators($decorators)->addErrorMessage('You must enter a broad period.')->addValidator('InArray', false, array(array_keys($periodword_options))); //Period from: Assigned via dropdown $objdate1subperiod = new Zend_Form_Element_Select('objdate1subperiod'); $objdate1subperiod->setLabel('Sub period from: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a subperiod', 'Valid sub periods' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->setDecorators($decorators); //Period from: Assigned via dropdown $objdate1period = new Zend_Form_Element_Select('objdate1period'); $objdate1period->setLabel('Period from: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a period from', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setDecorators($decorators); $objdate1cert = new Zend_Form_Element_Radio('objdate1cert'); $objdate1cert->setLabel('Period from certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Digits')->setDecorators($decorators); //Period from: Assigned via dropdown $objdate2subperiod = new Zend_Form_Element_Select('objdate2subperiod'); $objdate2subperiod->setLabel('Sub period to: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a subperiod', 'Valid sub periods' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->addValidator('Digits')->setDecorators($decorators); //Period to: Assigned via dropdown $objdate2period = new Zend_Form_Element_Select('objdate2period'); $objdate2period->setLabel('Period to: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose period to', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setDecorators($decorators); $objdate2cert = new Zend_Form_Element_Radio('objdate2cert'); $objdate2cert->setLabel('Period to certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->setDecorators($decorators)->addValidator('Digits'); $numdate1qual = new Zend_Form_Element_Radio('numdate1qual'); $numdate1qual->setLabel('Date certainty: ')->addMultiOptions($circa_o)->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->setDecorators($decorators)->addValidator('Digits'); //Date from: Free text Integer +ve or -ve $numdate1 = new Zend_Form_Element_Text('numdate1'); $numdate1->setLabel('Date from: ')->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators); $numdate2qual = new Zend_Form_Element_Radio('numdate2qual'); $numdate2qual->setLabel('Date certainty: ')->addMultiOptions($circa_o)->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->setDecorators($decorators)->addValidator('Digits'); //Date to: Free text Integer +ve or -ve $numdate2 = new Zend_Form_Element_Text('numdate2'); $numdate2->setLabel('Date to: ')->setRequired(false)->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators); //Ascribed culture: assigned via dropdown $culture = new Zend_Form_Element_Select('culture'); $culture->setLabel('Ascribed culture: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose ascribed culture', 'Available cultures' => $culture_options))->addValidator('InArray', false, array(array_keys($culture_options)))->addValidator('Int')->setDecorators($decorators); //Period of reuse $reuse_period = new Zend_Form_Element_Select('reuse_period'); $reuse_period->setLabel('Period of reuse: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose period of reuse', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setDecorators($decorators); //Evidence of reuse $reuse = new Zend_Form_Element_Text('reuse'); $reuse->setLabel('Evidence of reuse: ')->setAttrib('size', 60)->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //METRICS SECTION// //Weight: grammes $weight = new Zend_Form_Element_Text('weight'); $weight->setLabel('Weight: ')->setAttrib('size', 5)->setRequired(false)->addValidator('Float')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Height: millimetres $height = new Zend_Form_Element_Text('height'); $height->setLabel('Height: ')->setRequired(false)->setAttrib('size', 5)->addValidator('Float')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Length: millimetres $length = new Zend_Form_Element_Text('length'); $length->setLabel('Length: ')->setRequired(false)->setAttrib('size', 5)->addValidator('Float')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Diameter: millimetres $diameter = new Zend_Form_Element_Text('diameter'); $diameter->setLabel('Diameter: ')->setRequired(false)->setAttrib('size', 5)->addValidator('Float')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); // $width = new Zend_Form_Element_Text('width'); $width->setLabel('Width: ')->setRequired(false)->setAttrib('size', 5)->addValidator('Float')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Thickness: millimetres $thickness = new Zend_Form_Element_Text('thickness'); $thickness->setLabel('Thickness: ')->setRequired(false)->setAttrib('size', 5)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Float')->setDecorators($decorators); //Quantity: positive integers only $quantity = new Zend_Form_Element_Text('quantity'); $quantity->setLabel('Quantity: ')->setRequired(true)->setValue('1')->setAttrib('size', 3)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators); $material1 = new Zend_Form_Element_Select('material1'); $material1->setLabel('Primary material: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose primary material', 'Available materials' => $primary_options))->addValidator('InArray', false, array(array_keys($primary_options)))->addValidator('Int')->setDecorators($decorators); //Secondary material $material2 = new Zend_Form_Element_Select('material2'); $material2->setLabel('Secondary material: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose secondary material', 'Available materials' => $primary_options))->addValidator('InArray', false, array(array_keys($primary_options)))->addValidator('Int')->setDecorators($decorators); //Manufacture method $manmethod = new Zend_Form_Element_Select('manmethod'); $manmethod->setLabel('Manufacture method: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose method of manufacture', 'Available methods' => $man_options))->addValidator('InArray', false, array(array_keys($man_options)))->addValidator('Int')->setDecorators($decorators); //Decoration method $decmethod = new Zend_Form_Element_Select('decmethod'); $decmethod->setLabel('Decoration method: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose decoration method', 'Available methods' => $decmeth_options))->addValidator('InArray', false, array(array_keys($decmeth_options)))->addValidator('Int')->setDecorators($decorators); //Surface treatment $surftreat = new Zend_Form_Element_Select('surftreat'); $surftreat->setLabel('Surface Treatment: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose surface treatment', 'Available treatments' => $surface_options))->addValidator('InArray', false, array(array_keys($surface_options)))->addValidator('Int')->setDecorators($decorators); //decoration style $decstyle = new Zend_Form_Element_Select('decstyle'); $decstyle->setLabel('Decorative style: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose decorative style', 'Available styles' => $decoration_options))->addValidator('InArray', false, array(array_keys($decoration_options)))->addValidator('Int')->setDecorators($decorators); //Preservation of object $preservation = new Zend_Form_Element_Select('preservation'); $preservation->setLabel('Preservation: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(NULL => 'Choose level of preservation', 'Available states' => $preserve_options))->addValidator('InArray', false, array(array_keys($preserve_options)))->addValidator('Int')->setDecorators($decorators); //Completeness of object $completeness = new Zend_Form_Element_Radio('completeness'); $completeness->setLabel('Completeness: ')->setRequired(false)->addMultiOptions(array('4' => 'Complete', '2' => 'Incomplete', '1' => 'Fragment', '3' => 'Uncertain'))->setValue('4')->setOptions(array('separator' => ''))->addFilters(array('StripTags', 'StringTrim'))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators); //Rally details $rally = new Zend_Form_Element_Checkbox('rally'); $rally->setLabel('Rally find: ')->setRequired(false)->setCheckedValue('1')->setUncheckedValue(NULL)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setDecorators($decorators); $rallyID = new Zend_Form_Element_Select('rallyID'); $rallyID->setLabel('Found at this rally: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose rally name', 'Available rallies' => $rally_options))->addValidator('InArray', false, array(array_keys($rally_options)))->addValidator('Int')->setDecorators($decoratorsRally); ## PERSONNEL INFORMATION (or personal depending on the way you see it!) // Identifier $finder = new Zend_Form_Element_Text('finder'); $finder->setLabel('Found by: ')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators)->setDescription('To make a new finder/identifier appear, you first need to create them from the people menu on the left hand side'); $finderID = new Zend_Form_Element_Hidden('finderID'); $finderID->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('Label')->removeDecorator('HtmlTag')->removeDecorator('DdDtWrapper')->setDecorators($decorators); $secondfinder = new Zend_Form_Element_Text('secondfinder'); $secondfinder->setLabel('Secondary finder: ')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Secondary finder $finder2ID = new Zend_Form_Element_Hidden('finder2ID'); $finder2ID->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('Label')->removeDecorator('HtmlTag')->removeDecorator('DdDtWrapper')->setDecorators($decorators); $recordername = new Zend_Form_Element_Text('recordername'); $recordername->setLabel('Recorded by: ')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //recorder information $recorderID = new Zend_Form_Element_Hidden('recorderID'); $recorderID->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('Label')->removeDecorator('HtmlTag')->removeDecorator('DdDtWrapper')->setDecorators($decorators); $idBy = new Zend_Form_Element_Text('idBy'); $idBy->setLabel('Primary identifier: ')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); $identifier1ID = new Zend_Form_Element_Hidden('identifier1ID'); $identifier1ID->removeDecorator('HtmlTag')->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('DtDdWrapper')->removeDecorator('Label'); $id2by = new Zend_Form_Element_Text('id2by'); $id2by->setLabel('Secondary Identifier: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Secondary Identifier $identifier2ID = new Zend_Form_Element_Hidden('identifier2ID'); $identifier2ID->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->removeDecorator('Label')->removeDecorator('HtmlTag')->removeDecorator('DdDtWrapper'); ##DISCOVERY INFORMATION //Discovery method $discmethod = new Zend_Form_Element_Select('discmethod'); $discmethod->setLabel('Discovery method: ')->setRequired(true)->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addValidator('inArray', true, array(array_keys($disc_options)))->addMultiOptions(array(NULL => 'Choose method of discovery', 'Available methods' => $disc_options))->setDecorators($decorators); //Discovery circumstances $disccircum = new Zend_Form_Element_Text('disccircum'); $disccircum->setLabel('Discovery circumstances: ')->setRequired(false)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Date found from $datefound1 = new Zend_Form_Element_Text('datefound1'); $datefound1->setLabel('First discovery date: ')->setRequired(false)->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Datetime')->setDecorators($decorators); //Date found to $datefound2 = new Zend_Form_Element_Text('datefound2'); $datefound2->setLabel('Second discovery date: ')->setRequired(false)->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Datetime')->setDecorators($decorators); ##OTHER REFERENCE NUMBERS //Other reference number $other_ref = new Zend_Form_Element_Text('other_ref'); $other_ref->setLabel('Other reference: ')->setRequired(false)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //SMR reference number $smrrefno = new Zend_Form_Element_Text('smr_ref'); $smrrefno->setLabel('Sites and Monuments record number: ')->setRequired(false)->setAttrib('size', 30)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Museum accession number $musaccno = new Zend_Form_Element_Text('musaccno'); $musaccno->setLabel('Museum accession number: ')->setRequired(false)->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Current location of object $curr_loc = new Zend_Form_Element_Text('curr_loc'); $curr_loc->setLabel('Current location: ')->setRequired(false)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators); //Current location of object $subs_action = new Zend_Form_Element_Select('subs_action'); $subs_action->setLabel('Subsequent action: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators)->addMultiOptions(array(NULL => 'Choose a subsquent action', 'Available options' => $actionsDD))->setValue(1)->addValidator('InArray', false, array(array_keys($actionsDD)))->addValidator('Int'); $hash = new Zend_Form_Element_Hash('csrf'); $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800); $this->addElement($hash); //Submit button $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper'); $this->addElements(array($secuid, $old_findID, $objecttype, $broadperiod, $objdate1period, $objdate1subperiod, $objdate2subperiod, $objdate2period, $numdate1, $numdate2, $culture, $inscription, $description, $notes, $findofnote, $class, $subclass, $weight, $length, $thickness, $diameter, $height, $quantity, $manmethod, $surftreat, $treasure, $treasureID, $decstyle, $recordername, $recorderID, $idBy, $identifier1ID, $id2by, $identifier2ID, $finder, $finderID, $secondfinder, $finder2ID, $discmethod, $disccircum, $datefound1, $datefound2, $reuse, $reuse_period, $material1, $material2, $curr_loc, $smrrefno, $musaccno, $other_ref, $width, $preservation, $completeness, $findofnotereason, $rally, $objecttypecert, $rallyID, $objdate1cert, $objdate2cert, $submit, $subs_action, $numdate1qual, $numdate2qual)); $this->removeDecorator('DtDdWrapper'); $this->addDisplayGroup(array('objecttype', 'objecttypecert', 'classification', 'subclass', 'description', 'notes', 'inscription', 'findofnote', 'findofnotereason', 'treasure', 'treasureID'), 'objectdetails'); $this->objectdetails->removeDecorator('DtDdWrapper'); $this->objectdetails->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->objectdetails->setLegend('Object details'); $this->addDisplayGroup(array('broadperiod', 'objdate1period', 'objdate1cert', 'objdate1subperiod', 'objdate2period', 'objdate2cert', 'objdate2subperiod', 'numdate1qual', 'numdate1', 'numdate2qual', 'numdate2', 'culture', 'reuse_period', 'reuse'), 'date'); $this->date->removeDecorator('DtDdWrapper'); $this->date->setLegend('Temporal details'); $this->date->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->addDisplayGroup(array('length', 'width', 'thickness', 'height', 'diameter', 'weight', 'quantity'), 'metrics'); $this->metrics->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->metrics->removeDecorator('DtDdWrapper'); $this->metrics->setLegend('Measurements'); $this->addDisplayGroup(array('material1', 'material2', 'manmethod', 'surftreat', 'decstyle', 'preservation', 'completeness'), 'methods'); $this->methods->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->methods->removeDecorator('DtDdWrapper'); $this->methods->setLegend('Methods of production and decoration'); $this->addDisplayGroup(array('recordername', 'recorderID', 'idBy', 'identifier1ID', 'id2by', 'identifier2ID'), 'people'); $this->people->removeDecorator('DtDdWrapper'); $this->people->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->people->setLegend('Recording details'); $this->addDisplayGroup(array('finder', 'finderID', 'secondfinder', 'finder2ID'), 'discoverers'); $this->discoverers->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->discoverers->removeDecorator('DtDdWrapper'); $this->discoverers->setLegend('Discoverer details'); $this->addDisplayGroup(array('disccircum', 'discmethod', 'datefound1', 'datefound2', 'rally', 'rallyID'), 'discovery'); $this->discovery->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->discovery->removeDecorator('DtDdWrapper'); $this->discovery->setLegend('Discovery details'); $this->addDisplayGroup(array('other_ref', 'smr_ref', 'musaccno', 'curr_loc', 'subs_action'), 'references'); $this->references->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->references->removeDecorator('DtDdWrapper'); $this->references->setLegend('Reference numbers'); $this->addDisplayGroup(array('submit'), 'submit'); }
public function __construct($options = null) { $institutions = new Institutions(); $inst_options = $institutions->getInsts(); //Get data to form select menu for discovery methods $discs = new DiscoMethods(); $disc_options = $discs->getOptions(); //Get data to form select menu for manufacture methods $mans = new Manufactures(); $man_options = $mans->getOptions(); //Get data to form select menu for primary and secondary material $primaries = new Materials(); $primary_options = $primaries->getPrimaries(); //Get data to form select menu for periods $periods = new Periods(); $period_options = $periods->getPeriodFrom(); //Get primary material list $primaries = new Materials(); $primary_options = $primaries->getPrimaries(); //Get period list $periods = new Periods(); $periodword_options = $periods->getPeriodFromWords(); //Get data to form select menu for cultures $cultures = new Cultures(); $culture_options = $cultures->getCultures(); //Get data to form Surface treatments menu $surfaces = new Surftreatments(); $surface_options = $surfaces->getSurfaces(); //Get data to form Decoration styles menu $decorations = new Decstyles(); $decoration_options = $decorations->getStyles(); //Get data to form Decoration methods menu $decmeths = new Decmethods(); $decmeth_options = $decmeths->getDecmethods(); //Get Find of note reason data $reasons = new Findofnotereasons(); $reason_options = $reasons->getReasons(); //Get Preservation data $preserves = new Preservations(); $preserve_options = $preserves->getPreserves(); //Get Rally data $rallies = new Rallies(); $rally_options = $rallies->getRallies(); //Get Hoard data $hoards = new Hoards(); $hoard_options = $hoards->getHoards(); //Get county dropdown $counties = new Counties(); $county_options = $counties->getCountyName2(); //Get regions list $regions = new Regions(); $region_options = $regions->getRegionName(); //Set up year of discovery dropdown $current_year = date('Y'); $years = range(1950, $current_year); $years_list = array_combine($years, $years); parent::__construct($options); $decorator = array('SimpleInput'); $decoratorSelect = array('SelectInput'); $decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'requiredSuffix' => ' *')), array('HtmlTag', array('tag' => 'li'))); $decoratorsHide = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hideme')), array('HtmlTag', array('tag' => 'li'))); $decoratorsRally = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hiderally')), array('HtmlTag', array('tag' => 'li'))); $decoratorsHoard = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hidehoard')), array('HtmlTag', array('tag' => 'li'))); $decoratorsNote = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'prepend', 'class' => 'error', 'tag' => 'li')), array('Label', array('separator' => ' ', 'class' => 'hidenote')), array('HtmlTag', array('tag' => 'li'))); $this->setName('Advanced'); $old_findID = new Zend_Form_Element_Text('old_findID'); $old_findID->setLabel('Find number: ')->addFilters(array('StringTrim', 'StripTags'))->addValidator('StringLength', false, array(3, 20))->addErrorMessage('Please enter a valid number!')->setDecorators($decorators); $objecttype = new Zend_Form_Element_Text('objecttype'); $objecttype->setLabel('Object type: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('Please enter a valid object type!')->setDecorators($decorator); $description = new Zend_Form_Element_Text('description'); $description->setLabel('Object description contains: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addErrorMessage('Please enter a valid term')->setDecorators($decorator); //Find of note $findofnote = new Zend_Form_Element_Checkbox('note'); $findofnote->setLabel('Find of Note: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setUncheckedValue(NULL)->setDecorators($decorators); //Reason for find of note $findofnotereason = new Zend_Form_Element_Select('reason'); $findofnotereason->setLabel('Reason for noteworthy status: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose reason' => $reason_options))->setDisableTranslator(true)->setDecorators($decoratorsNote); //Institution $institution = new Zend_Form_Element_Select('institution'); $institution->setLabel('Recording institution: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose institution' => $inst_options))->setDecorators($decoratorsNote); $notes = new Zend_Form_Element_Text('notes'); $notes->setLabel('Notes: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $broadperiod = new Zend_Form_Element_Select('broadperiod'); $broadperiod->setLabel('Broad period: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose period from' => $periodword_options))->setDecorators($decorators); $objdate1subperiod = new Zend_Form_Element_Select('fromsubperiod'); $objdate1subperiod->setLabel('Sub period from: ')->setRequired(false)->addMultiOptions(array(NULL => NULL, 'Choose sub-period from' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''))->setDecorators($decorators); //Period from: Assigned via dropdown $objdate1period = new Zend_Form_Element_Select('periodFrom'); $objdate1period->setLabel('Period from: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose period from' => $period_options))->setDisableTranslator(true)->setDecorators($decorators); $objdate2subperiod = new Zend_Form_Element_Select('tosubperiod'); $objdate2subperiod->setLabel('Sub period to: ')->addMultiOptions(array(NULL => NULL, 'Choose sub-period from' => array('1' => 'Early', '2' => 'Middle', '3' => 'Late')))->setDisableTranslator(true)->addFilters(array('StringTrim', 'StripTags'))->setOptions(array('separator' => ''))->setDecorators($decorators); //Period to: Assigned via dropdown $objdate2period = new Zend_Form_Element_Select('periodTo'); $objdate2period->setLabel('Period to: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose period to' => $period_options))->setDecorators($decorators); $culture = new Zend_Form_Element_Select('culture'); $culture->setLabel('Ascribed culture: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose ascribed culture to' => $culture_options))->setDecorators($decorators); $from = new Zend_Form_Element_Text('from'); $from->setLabel('Start date greater than: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidators(array('NotEmpty', 'Int'))->addErrorMessage('Please enter a valid date')->setDisableTranslator(true)->setDecorators($decorator); $fromend = new Zend_Form_Element_Text('fromend'); $fromend->setLabel('Start date smaller than: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidators(array('NotEmpty', 'Int'))->addErrorMessage('Please enter a valid date')->setDecorators($decorator)->setDisableTranslator(true); $to = new Zend_Form_Element_Text('to'); $to->setLabel('End date greater than: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidators(array('NotEmpty', 'Int'))->addErrorMessage('Please enter a valid date')->setDecorators($decorator); $toend = new Zend_Form_Element_Text('toend'); $toend->setLabel('End date smaller than: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidators(array('NotEmpty', 'Int'))->addErrorMessage('Please enter a valid date')->setDecorators($decorator); $workflow = new Zend_Form_Element_Select('workflow'); $workflow->setLabel('Workflow stage: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidator('Int')->setDecorators($decorators); if (in_array($this->getRole(), $this->higherlevel)) { $workflow->addMultiOptions(array(NULL => NULL, 'Choose Worklow stage' => array('1' => 'Quarantine', '2' => 'On review', '4' => 'Awaiting validation', '3' => 'Published'))); } if (in_array($this->getRole(), $this->restricted)) { $workflow->addMultiOptions(array(NULL => NULL, 'Choose Worklow stage' => array('4' => 'Awaiting validation', '3' => 'Published'))); } $treasure = new Zend_Form_Element_Checkbox('treasure'); $treasure->setLabel('Treasure find: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setUncheckedValue(NULL)->setDecorators($decorators); $treasureID = new Zend_Form_Element_Text('TID'); $treasureID->setLabel('Treasure ID number: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decoratorsHide); //Rally details $rally = new Zend_Form_Element_Checkbox('rally'); $rally->setLabel('Rally find: ')->setRequired(false)->addValidator('Int')->addFilters(array('StringTrim', 'StripTags'))->setUncheckedValue(NULL)->setDecorators($decorators); $rallyID = new Zend_Form_Element_Select('rallyID'); $rallyID->setLabel('Found at this rally: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose rally name' => $rally_options))->setDisableTranslator(true)->setDecorators($decoratorsRally); $hoard = new Zend_Form_Element_Checkbox('hoard'); $hoard->setLabel('Hoard find: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setUncheckedValue(NULL)->setDecorators($decorators); $hoardID = new Zend_Form_Element_Select('hID'); $hoardID->setLabel('Part of this hoard: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose rally name' => $hoard_options))->setDecorators($decoratorsHoard); $other_ref = new Zend_Form_Element_Text('otherRef'); $other_ref->setLabel('Other reference: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); //Manufacture method $manmethod = new Zend_Form_Element_Select('manufacture'); $manmethod->setLabel('Manufacture method: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addValidator('Int')->addMultiOptions(array(NULL => NULL, 'Choose method of manufacture' => $man_options))->setDecorators($decorators); //Decoration method $decmethod = new Zend_Form_Element_Select('decoration'); $decmethod->setLabel('Decoration method: ')->setRequired(false)->addValidator('Int')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose decoration method' => $decmeth_options))->setDecorators($decorators); //Surface treatment $surftreat = new Zend_Form_Element_Select('surface'); $surftreat->setLabel('Surface Treatment: ')->setRequired(false)->addValidator('Int')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose surface treatment' => $surface_options))->setDecorators($decorators); //decoration style $decstyle = new Zend_Form_Element_Select('decstyle'); $decstyle->setLabel('Decorative style: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose decorative style' => $decoration_options))->addValidator('Int')->setDecorators($decorators); //Preservation of object $preservation = new Zend_Form_Element_Select('preservation'); $preservation->setLabel('Preservation: ')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('Int')->addMultiOptions(array(NULL => NULL, 'Choose level of preservation' => $preserve_options))->setDecorators($decorators); $county = new Zend_Form_Element_Select('county'); $county->setLabel('County: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => NULL, 'Choose county' => $county_options))->setDecorators($decorators); $district = new Zend_Form_Element_Select('district'); $district->setLabel('District: ')->addMultiOptions(array(NULL => 'Choose district after county'))->setRegisterInArrayValidator(false)->addFilters(array('StringTrim', 'StripTags'))->setDisableTranslator(true)->setDecorators($decorators); $parish = new Zend_Form_Element_Select('parish'); $parish->setLabel('Parish: ')->setRegisterInArrayValidator(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => 'Choose parish after county'))->setDisableTranslator(true)->setDecorators($decorators); $regionID = new Zend_Form_Element_Select('regionID'); $regionID->setLabel('European region: ')->setRegisterInArrayValidator(false)->addValidator('Int')->addMultiOptions(array(NULL => 'Choose a region for a wide result', 'Choose region' => $region_options))->setDisableTranslator(true)->setDecorators($decorators); $gridref = new Zend_Form_Element_Text('gridref'); $gridref->setLabel('Grid reference: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $fourFigure = new Zend_Form_Element_Text('fourFigure'); $fourFigure->setLabel('Four figure grid reference: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $idBy = new Zend_Form_Element_Text('idby'); $idBy->setLabel('Primary identifier: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $identifierID = new Zend_Form_Element_Hidden('identifierID'); $identifierID->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->addFilters(array('StringTrim', 'StripTags'))->removeDecorator('Label'); $created = new Zend_Form_Element_Text('createdBefore'); $created->setLabel('Date record created on or before: ')->addValidator('Date')->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $created2 = new Zend_Form_Element_Text('createdAfter'); $created2->setLabel('Date record created on or after: ')->addValidator('Date')->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $finder = new Zend_Form_Element_Text('finder'); $finder->setLabel('Found by: ')->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorator); $finderID = new Zend_Form_Element_Hidden('finderID'); $finderID->removeDecorator('HtmlTag')->addFilters(array('StringTrim', 'StripTags'))->removeDecorator('DtDdWrapper')->removeDecorator('Label'); $recordby = new Zend_Form_Element_Text('recordby'); $recordby->setLabel('Recorded by: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'))->setAttrib('autoComplete', 'true')->setDecorators($decorator); $recorderID = new Zend_Form_Element_Hidden('recorderID'); $recorderID->removeDecorator('HtmlTag')->addFilters(array('StringTrim', 'StripTags'))->removeDecorator('DtDdWrapper')->removeDecorator('Label'); $discoverydate = new Zend_Form_Element_Select('discovered'); $discoverydate->setLabel('Year of discovery')->setMultiOptions(array(NULL => 'Choose a year of discovery', 'Date range' => $years_list))->addValidator('Int')->addFilters(array('StringTrim', 'StripTags'))->setDecorators($decorators); //Submit button $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton')->setAttrib('class', 'large')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->setLabel('Submit your search'); $material1 = new Zend_Form_Element_Select('material'); $material1->setLabel('Primary material: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose primary material' => $primary_options))->setDecorators($decorators); $woeid = new Zend_Form_Element_Text('woeid'); $woeid->setLabel('Where on earth ID: ')->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorator); $elevation = new Zend_Form_Element_Text('elevation'); $elevation->setLabel('Elevation: ')->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorator); if (in_array($this->getRole(), $this->restricted)) { $this->addElements(array($old_findID, $objecttype, $broadperiod, $description, $from, $to, $workflow, $findofnote, $findofnotereason, $rally, $rallyID, $hoard, $hoardID, $other_ref, $manmethod, $fromend, $toend, $notes, $objdate1period, $objdate2period, $county, $regionID, $district, $parish, $fourFigure, $objdate1subperiod, $objdate2subperiod, $treasure, $treasureID, $discoverydate, $created, $created2, $idBy, $recordby, $recorderID, $identifierID, $culture, $surftreat, $submit, $material1, $elevation, $woeid, $institution)); } else { $this->addElements(array($old_findID, $objecttype, $broadperiod, $description, $from, $to, $workflow, $findofnote, $findofnotereason, $rally, $rallyID, $hoard, $hoardID, $other_ref, $manmethod, $fromend, $toend, $notes, $objdate1period, $objdate2period, $county, $regionID, $district, $parish, $fourFigure, $elevation, $woeid, $objdate1subperiod, $objdate2subperiod, $treasure, $treasureID, $discoverydate, $created, $created2, $idBy, $finder, $finderID, $recordby, $recorderID, $identifierID, $culture, $surftreat, $submit, $material1, $institution)); } $this->addDisplayGroup(array('old_findID', 'objecttype', 'description', 'notes', 'note', 'reason', 'treasure', 'TID', 'rally', 'rallyID', 'hoard', 'hID', 'workflow', 'otherRef', 'material', 'manufacture', 'surface'), 'details')->removeDecorator('HtmlTag'); $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->details->removeDecorator('DtDdWrapper'); $this->details->setLegend('Main details: '); $hash = new Zend_Form_Element_Hash('csrf'); $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60); $this->addElement($hash); $this->addDisplayGroup(array('broadperiod', 'fromsubperiod', 'periodFrom', 'tosubperiod', 'periodTo', 'culture', 'from', 'fromend', 'to', 'toend'), 'Temporaldetails')->removeDecorator('HtmlTag'); $this->Temporaldetails->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->Temporaldetails->removeDecorator('DtDdWrapper'); $this->Temporaldetails->setLegend('Temporal details: '); $this->addDisplayGroup(array('county', 'regionID', 'district', 'parish', 'fourFigure', 'elevation', 'woeid'), 'Spatial')->removeDecorator('HtmlTag'); $this->Spatial->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->Spatial->removeDecorator('DtDdWrapper'); $this->Spatial->setLegend('Spatial details: '); if (in_array($this->getRole(), $this->restricted)) { $this->addDisplayGroup(array('institution', 'idby', 'identifierID', 'recordby', 'recorderID', 'createdAfter', 'createdBefore', 'discovered'), 'Discovery')->removeDecorator('HtmlTag'); } else { $this->addDisplayGroup(array('institution', 'finder', 'idby', 'identifierID', 'recordby', 'recorderID', 'createdAfter', 'createdBefore', 'discovered'), 'Discovery')->removeDecorator('HtmlTag'); } $this->Discovery->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul')))); $this->Discovery->removeDecorator('DtDdWrapper'); $this->Discovery->setLegend('Discovery details: '); //$this->setLegend('Perform an advanced search on our database: '); $this->addDisplayGroup(array('submit'), 'submit'); $this->submit->removeDecorator('DtDdWrapper'); $this->submit->removeDecorator('HtmlTag'); }
/** Display list of decoration styles */ public function decorationstylesAction() { $decs = new Decstyles(); $this->view->decs = $decs->getDecStyles(); }