Ejemplo n.º 1
0
 public function __construct($options = null)
 {
     $periods = new Periods();
     $period_options = $periods->getMedievalCoinsPeriodList();
     $cats = new CategoriesCoins();
     $cat_options = $cats->getCategoriesAll();
     $rulers = new Rulers();
     $ruler_options = $rulers->getAllMedRulers();
     parent::__construct($options);
     $this->setAttrib('accept-charset', 'UTF-8');
     $this->setName('medievaltype');
     $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')));
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Coin type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addErrorMessage('You must enter a type name.')->setDecorators($decorators);
     $periodID = new Zend_Form_Element_Select('periodID');
     $periodID->setLabel('Medieval period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a period for this type')->addMultioptions(array(NULL => NULL, 'Choose a period' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int')->setDecorators($decorators);
     $rulerID = new Zend_Form_Element_Select('rulerID');
     $rulerID->setLabel('Ruler assigned: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultioptions(array(NULL => NULL, 'Choose a ruler' => $ruler_options))->addValidator('InArray', false, array(array_keys($ruler_options)))->addValidator('Int')->setDecorators($decorators);
     $datefrom = new Zend_Form_Element_Text('datefrom');
     $datefrom->setLabel('Date in use from: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators);
     $dateto = new Zend_Form_Element_Text('dateto');
     $dateto->setLabel('Date in use until: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits')->setDecorators($decorators);
     $categoryID = new Zend_Form_Element_Select('categoryID');
     $categoryID->setLabel('Coin category: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose a category' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)))->addValidator('Int')->setDecorators($decorators);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper');
     $this->addElements(array($type, $rulerID, $periodID, $categoryID, $datefrom, $dateto, $submit));
     $this->addDisplayGroup(array('periodID', 'type', 'categoryID', 'rulerID', 'datefrom', 'dateto', 'submit'), 'details')->removeDecorator('HtmlTag');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->setLegend('Mint details: ');
     $this->details->removeDecorator('DtDdWrapper');
     $this->details->removeDecorator('HtmlTag');
 }
Ejemplo n.º 2
0
 /** Construct the form
  * @access public
  * @param type $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $cats = new CategoriesCoins();
     $cat_options = $cats->getCategoriesAll();
     $rulers = new Rulers();
     $ruler_options = $rulers->getAllMedRulers();
     parent::__construct($options);
     $this->setName('MedievalType');
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Medieval type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('class' => 'textInput', 'class' => 'span8'));
     $broadperiod = new Zend_Form_Element_Select('periodID');
     $broadperiod->setLabel('Broadperiod for type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addMultioptions(array(null => 'Choose broadperiod', 'Available options' => array(47 => 'Early Medieval', 29 => 'Medieval', 36 => 'Post Medieval')));
     $category = new Zend_Form_Element_Select('categoryID');
     $category->setLabel('Coin category: ')->setAttribs(array('class' => 'textInput'))->addFilter('StringTrim')->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addMultioptions(array(null => 'Choose a category', 'Available options' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)));
     $ruler = new Zend_Form_Element_Select('rulerID');
     $ruler->setLabel('Ruler assigned to: ')->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addFilter('StringTrim')->addMultioptions(array(null => 'Choose a ruler', 'Available options' => $ruler_options))->addValidator('inArray', false, array(array_keys($ruler_options)));
     $datefrom = new Zend_Form_Element_Text('datefrom');
     $datefrom->setLabel('Date type in use from: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'));
     $dateto = new Zend_Form_Element_Text('dateto');
     $dateto->setLabel('Date type in use until: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'));
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Submit details for medieval coin type');
     $this->addElements(array($type, $broadperiod, $category, $ruler, $datefrom, $dateto, $submit))->setLegend('Add an active type of Medieval coin')->setMethod('post');
     parent::init();
 }
Ejemplo n.º 3
0
 public function __construct($options = null)
 {
     $cats = new CategoriesCoins();
     $cat_options = $cats->getCategoriesAll();
     $rulers = new Rulers();
     $ruler_options = $rulers->getAllMedRulers();
     parent::__construct($options);
     $this->setAttrib('accept-charset', 'UTF-8');
     $this->setDecorators(array('FormElements', 'Form'));
     $this->setName('MedievalType');
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Medieval type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('class' => 'textInput', 'size' => 60));
     $broadperiod = new Zend_Form_Element_Select('periodID');
     $broadperiod->setLabel('Broadperiod for type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setAttribs(array('class' => 'textInput'))->addMultioptions(array(NULL => NULL, 'Choose broadperiod' => array('47' => 'Early Medieval', '29' => 'Medieval', '36' => 'Post Medieval')));
     $category = new Zend_Form_Element_Select('categoryID');
     $category->setLabel('Coin category: ')->setAttribs(array('class' => 'textInput'))->addValidator('Int')->addFilter('StringTrim')->addMultioptions(array(NULL => NULL, 'Choose a category' => $cat_options))->addValidator('InArray', true, array($cat_options));
     $ruler = new Zend_Form_Element_Select('rulerID');
     $ruler->setLabel('Ruler assigned to: ')->setAttribs(array('class' => 'textInput'))->addValidator('Int')->addFilter('StringTrim')->addMultioptions(array(NULL => NULL, 'Choose a category' => $ruler_options))->addValidator('inArray', true, array($ruler_options));
     $datefrom = new Zend_Form_Element_Text('datefrom');
     $datefrom->setLabel('Date type in use from: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setAttribs(array('class' => 'textInput'));
     $dateto = new Zend_Form_Element_Text('dateto');
     $dateto->setLabel('Date type in use until: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setAttribs(array('class' => 'textInput'));
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Submit details for medieval coin type')->setAttribs(array('class' => 'large'));
     $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->addElements(array($type, $broadperiod, $category, $ruler, $datefrom, $dateto, $submit))->setLegend('Add an active type of Medieval coin')->setMethod('post')->addDecorators(array('Fieldset', 'form', array('HtmlTag', array('tag' => 'div'))));
 }
Ejemplo n.º 4
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $periods = new Periods();
     $period_options = $periods->getMedievalCoinsPeriodList();
     $cats = new CategoriesCoins();
     $cat_options = $cats->getCategoriesAll();
     $rulers = new Rulers();
     $ruler_options = $rulers->getAllMedRulers();
     parent::__construct($options);
     $this->setName('medievaltype');
     $type = new Zend_Form_Element_Text('type');
     $type->setLabel('Coin type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('size', 60)->addErrorMessage('You must enter a type name.');
     $periodID = new Zend_Form_Element_Select('periodID');
     $periodID->setLabel('Medieval period: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addErrorMessage('You must enter a period for this type')->addMultioptions(array(null => 'Choose a period', 'Available periods' => $period_options))->addValidator('InArray', false, array(array_keys($period_options)))->addValidator('Int');
     $rulerID = new Zend_Form_Element_Select('rulerID');
     $rulerID->setLabel('Ruler assigned: ')->setRequired(true)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addMultioptions(array(null => 'Choose a ruler', 'Available rulers' => $ruler_options))->addValidator('InArray', false, array(array_keys($ruler_options)))->addValidator('Int');
     $datefrom = new Zend_Form_Element_Text('datefrom');
     $datefrom->setLabel('Date in use from: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $dateto = new Zend_Form_Element_Text('dateto');
     $dateto->setLabel('Date in use until: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Digits');
     $categoryID = new Zend_Form_Element_Select('categoryID');
     $categoryID->setLabel('Coin category: ')->setRequired(true)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose a category', 'Available categories' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)))->addValidator('Int');
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($type, $rulerID, $periodID, $categoryID, $datefrom, $dateto, $submit));
     $this->addDisplayGroup(array('periodID', 'type', 'categoryID', 'rulerID', 'datefrom', 'dateto', 'submit'), 'details');
     $this->details->setLegend('Medieval type details: ');
     parent::init();
 }
Ejemplo n.º 5
0
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $cats = new CategoriesCoins();
     $cat_options = $cats->getPeriodEarlyMed();
     $denominations = new Denominations();
     $denomination_options = $denominations->getOptionsEarlyMedieval();
     $statuses = new Statuses();
     $status_options = $statuses->getCoinStatus();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new WearTypes();
     $wear_options = $wears->getWears();
     $rulers = new Rulers();
     $ro = $rulers->getEarlyMedRulers();
     $mints = new Mints();
     $mo = $mints->getEarlyMedievalMints();
     parent::__construct($options);
     $this->setName('earlymedievalcoin');
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->addValidators(array('NotEmpty'))->addMultiOptions(array(null => 'Choose denomination', 'Available denominations' => $denomination_options))->addValidator('InArray', false, array(array_keys($denomination_options)))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow');
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Int');
     $categoryID = new Zend_Form_Element_Select('categoryID');
     $categoryID->setLabel('Category of coin: ')->addValidators(array('NotEmpty'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose category', 'Available categories' => $cat_options))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $ruler_id = new Zend_Form_Element_Select('ruler_id');
     $ruler_id->setLabel('Ruler: ')->addValidator('InArray', false, array(array_keys($ro)))->addMultiOptions(array(null => 'Choose a ruler', 'Available rulers' => $ro))->addValidator('Int')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'));
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''));
     $mint_id = new Zend_Form_Element_Select('mint_id');
     $mint_id->setLabel('Issuing mint: ')->addValidator('InArray', false, array(array_keys($mo)))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Please choose a mint', 'Available mints' => $mo));
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel('Status: ')->setRegisterInArrayValidator(false)->setValue(1)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(null => 'Choose coin status', 'Available status' => $status_options));
     $status_qualifier = new Zend_Form_Element_Radio('status_qualifier');
     $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''));
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->setRegisterInArrayValidator(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose a degree of wear', 'Available options' => $wear_options))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setAttrib('class', 'span6')->addFilters(array('StripTags', 'StringTrim'));
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->setAttrib('class', 'span6')->addFilters(array('StripTags', 'StringTrim'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'))->addFilters(array('StripTags', 'StringTrim'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'));
     $rev_mm = new Zend_Form_Element_Textarea('reverse_mintmark');
     $rev_mm->setLabel('Reverse mint mark: ')->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'));
     $initial = new Zend_Form_Element_Textarea('initial_mark');
     $initial->setLabel('Initial mark: ')->addValidators(array('NotEmpty'))->setAttribs(array('rows' => 5, 'cols' => 40, 'class' => 'span6'))->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'));
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose die axis', 'Available options' => $die_options));
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Int');
     $typeID = new Zend_Form_Element_Select('typeID');
     $typeID->setLabel('Coin type: ')->setRegisterInArrayValidator(false)->addValidator('Int')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'));
     $submit = new Zend_Form_Element_Submit('submit');
     $this->addElements(array($ruler_id, $ruler_qualifier, $denomination, $denomination_qualifier, $mint_id, $typeID, $status, $categoryID, $status_qualifier, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $submit, $rev_mm, $initial));
     $this->addDisplayGroup(array('categoryID', 'ruler_id', 'typeID', 'ruler_qualifier', 'denomination', 'denomination_qualifier', 'mint_id', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'reverse_mintmark', 'initial_mark', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
Ejemplo n.º 6
0
 /** Set up the foreign rulers page
  */
 public function foreignAction()
 {
     $names = new CategoriesCoins();
     $this->view->names = $names->getCategoryName();
     $this->view->francia = $this->_rulers->getEarlyMedievalRulers(1);
     $this->view->islamic = $this->_rulers->getEarlyMedievalRulers(10);
     $this->view->hiberno = $this->_rulers->getEarlyMedievalRulers(28);
 }
Ejemplo n.º 7
0
 /** Individual category page
  * @access public
  * @return void
  * @throws Pas_Exception_Param
  */
 public function categoryAction()
 {
     if ($this->getParam('id', false)) {
         $this->view->categories = $this->_categories->getCategory($this->getParam('id'));
         $this->view->rulers = $this->_categories->getMedievalRulersToType($this->getParam('id'));
         $types = new MedievalTypes();
         $this->view->types = $types->getCoinTypeCategory($this->getParam('id'));
     } else {
         throw new Pas_Exception_Param($this->_missingParameter, 500);
     }
 }
 /** The constructor
  * @access public
  * @param array $options
  * @return void
  */
 public function __construct(array $options = null)
 {
     $institutions = new Institutions();
     $inst_options = $institutions->getInsts();
     $rallies = new Rallies();
     $rally_options = $rallies->getRallies();
     $counties = new OsCounties();
     $county_options = $counties->getCountiesID();
     $rulers = new Rulers();
     $ruler_options = $rulers->getEarlyMedRulers();
     $denominations = new Denominations();
     $denomination_options = $denominations->getOptionsEarlyMedieval();
     $mints = new Mints();
     $mint_options = $mints->getEarlyMedievalMints();
     $axis = new Dieaxes();
     $axis_options = $axis->getAxes();
     $types = new MedievalTypes();
     $type_options = $types->getMedievalTypesForm(47);
     $cats = new CategoriesCoins();
     $cat_options = $cats->getPeriodEarlyMed();
     $regions = new OsRegions();
     $region_options = $regions->getRegionsID();
     parent::__construct($options);
     $this->setName('earlymedsearch');
     $old_findID = new Zend_Form_Element_Text('old_findID');
     $old_findID->setLabel('Find number: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid number!');
     $description = new Zend_Form_Element_Text('description');
     $description->setLabel('Object description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term');
     $workflow = new Zend_Form_Element_Select('workflow');
     $workflow->setLabel('Workflow stage: ')->setRequired(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addValidator('Int');
     if (in_array($this->_role, $this->_higherlevel)) {
         $workflow->addMultiOptions(array(null => 'Available Workflow stages', 'Choose Worklow stage' => array('1' => 'Quarantine', '2' => 'On review', '4' => 'Awaiting validation', '3' => 'Published')));
     }
     if (in_array($this->_role, $this->_restricted)) {
         $workflow->addMultiOptions(array(null => 'Available Workflow stages', 'Choose Worklow stage' => array('4' => 'Awaiting validation', '3' => 'Published')));
     }
     //Rally details
     $rally = new Zend_Form_Element_Checkbox('rally');
     $rally->setLabel('Rally find: ')->setRequired(false)->addValidator('Int')->addFilters(array('StringTrim', 'StripTags'))->setUncheckedValue(null);
     $rallyID = new Zend_Form_Element_Select('rallyID');
     $rallyID->setLabel('Found at this rally: ')->setRequired(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(null => 'Choose a rally', 'Available rallies' => $rally_options));
     $county = new Zend_Form_Element_Select('countyID');
     $county->setLabel('County: ')->addValidators(array('NotEmpty'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(null => 'Choose county', 'Available counties' => $county_options));
     $district = new Zend_Form_Element_Select('districtID');
     $district->setLabel('District: ')->addMultiOptions(array(null => 'Choose district after county'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->setRegisterInArrayValidator(false)->addFilters(array('StringTrim', 'StripTags'))->setDisableTranslator(true);
     $parish = new Zend_Form_Element_Select('parishID');
     $parish->setLabel('Parish: ')->setRegisterInArrayValidator(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(null => 'Choose parish after county'))->setDisableTranslator(true);
     $regionID = new Zend_Form_Element_Select('regionID');
     $regionID->setLabel('European region: ')->setRegisterInArrayValidator(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('Int')->addMultiOptions(array(null => 'Choose a region for a wide result', 'Choose region' => $region_options));
     $gridref = new Zend_Form_Element_Text('gridref');
     $gridref->setLabel('Grid reference: ')->addValidators(array('NotEmpty', 'ValidGridRef'))->addFilters(array('StringTrim', 'StripTags'));
     $fourFigure = new Zend_Form_Element_Text('fourFigure');
     $fourFigure->setLabel('Four figure grid reference: ')->addValidators(array('NotEmpty'))->addFilters(array('StringTrim', 'StripTags'));
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('Int')->addMultiOptions(array(null => 'Choose denomination type', 'Available denominations' => $denomination_options));
     $cat = new Zend_Form_Element_Select('category');
     $cat->setLabel('Category: ')->setRequired(false)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose an Early Medieval category', 'Available categories' => $cat_options));
     $type = new Zend_Form_Element_Select('type');
     $type->setLabel('Coin type: ')->setRequired(false)->addValidator('Int')->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(null => 'Choose type after choosing ruler', 'Available types' => $type_options))->addValidator('InArray', false, array(array_keys($type_options)));
     //Primary ruler
     $ruler = new Zend_Form_Element_Select('ruler');
     $ruler->setLabel('Ruler / issuer: ')->setRequired(false)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose primary ruler', 'Available options' => $ruler_options))->addValidator('InArray', false, array(array_keys($ruler_options)));
     //Mint
     $mint = new Zend_Form_Element_Select('mint');
     $mint->setLabel('Issuing mint: ')->setRequired(false)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addMultiOptions(array(null => 'Choose issuing mint', 'Available mints' => $mint_options));
     //Obverse inscription
     $obverseinsc = new Zend_Form_Element_Text('obverseLegend');
     $obverseinsc->setLabel('Obverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term');
     //Obverse description
     $obversedesc = new Zend_Form_Element_Text('obverseDescription');
     $obversedesc->setLabel('Obverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term');
     //reverse inscription
     $reverseinsc = new Zend_Form_Element_Text('reverseLegend');
     $reverseinsc->setLabel('Reverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term');
     //reverse description
     $reversedesc = new Zend_Form_Element_Text('reverseDescription');
     $reversedesc->setLabel('Reverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term');
     //Die axis
     $axis = new Zend_Form_Element_Select('axis');
     $axis->setLabel('Die axis measurement: ')->setRegisterInArrayValidator(false)->setRequired(false)->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(null => 'Choose a die axis measurement', 'Available options' => $axis_options));
     $objecttype = new Zend_Form_Element_Hidden('objecttype');
     $objecttype->setValue('coin')->addFilter('StringToUpper');
     $broadperiod = new Zend_Form_Element_Hidden('broadperiod');
     $broadperiod->setValue('Early Medieval')->addFilter('StringToUpper');
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $institution = new Zend_Form_Element_Select('institution');
     $institution->setLabel('Recording institution: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->setAttrib('class', 'input-xxlarge selectpicker show-menu-arrow')->addValidator('Alpha', true)->addMultiOptions(array(null => 'Choose an institution', 'Available institutions' => $inst_options));
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(4800);
     $this->addElements(array($old_findID, $type, $description, $workflow, $rally, $rallyID, $county, $regionID, $district, $parish, $fourFigure, $gridref, $denomination, $ruler, $mint, $axis, $obverseinsc, $obversedesc, $reverseinsc, $reversedesc, $objecttype, $broadperiod, $cat, $submit, $institution, $hash));
     $this->addDisplayGroup(array('category', 'ruler', 'type', 'denomination', 'mint', 'moneyer', 'axis', 'obverseLegend', 'obverseDescription', 'reverseLegend', 'reverseDescription'), 'numismatics');
     $this->numismatics->setLegend('Numismatic details: ');
     $this->addDisplayGroup(array('old_findID', 'description', 'rally', 'rallyID', 'workflow'), 'details');
     $this->details->setLegend('Object details: ');
     $this->addDisplayGroup(array('countyID', 'regionID', 'districtID', 'parishID', 'gridref', 'fourFigure', 'institution'), 'spatial');
     $this->spatial->setLegend('Spatial details: ');
     $this->addDisplayGroup(array('submit'), 'buttons');
     parent::init();
 }
 public function __construct($options = null)
 {
     // Construct the select menu data
     $cats = new CategoriesCoins();
     $cat_options = $cats->getPeriodEarlyMed();
     $denominations = new Denominations();
     $denomination_options = $denominations->getOptionsEarlyMedieval();
     $statuses = new Statuses();
     $status_options = $statuses->getCoinStatus();
     $dies = new Dieaxes();
     $die_options = $dies->getAxes();
     $wears = new Weartypes();
     $wear_options = $wears->getWears();
     $rulers = new Rulers();
     $ro = $rulers->getEarlyMedRulers();
     $mints = new Mints();
     $mo = $mints->getEarlyMedievalMints();
     parent::__construct($options);
     $this->setName('earlymedievalcoin');
     $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')));
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->addValidators(array('NotEmpty'))->addMultiOptions(array(NULL => NULL, 'Choose denomination' => $denomination_options))->setDecorators($decorators);
     $denomination_qualifier = new Zend_Form_Element_Radio('denomination_qualifier');
     $denomination_qualifier->setLabel('Denomination qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators)->addValidator('Int');
     $categoryID = new Zend_Form_Element_Select('categoryID');
     $categoryID->setLabel('Category of coin: ')->addValidators(array('NotEmpty'))->addMultiOptions(array(NULL => NULL, 'Choose category' => $cat_options))->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $ruler_id = new Zend_Form_Element_Select('ruler');
     $ruler_id->setLabel('Ruler: ')->setRegisterInArrayValidator(false)->setDecorators($decorators)->addMultiOptions(array(NULL => NULL, 'Please choose a ruler' => $ro))->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'));
     $ruler_qualifier = new Zend_Form_Element_Radio('ruler_qualifier');
     $ruler_qualifier->setLabel('Issuer qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $mint_id = new Zend_Form_Element_Select('mint_id');
     $mint_id->setLabel('Issuing mint: ')->setRegisterInArrayValidator(false)->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(NULL => NULL, 'Please choose a mint' => $mo));
     $status = new Zend_Form_Element_Select('status');
     $status->setLabel('Status: ')->setRegisterInArrayValidator(false)->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $status_options))->setDecorators($decorators);
     $status_qualifier = new Zend_Form_Element_Radio('status_qualifier');
     $status_qualifier->setLabel('Status qualifier: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->setValue(1)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setOptions(array('separator' => ''))->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $degree_of_wear = new Zend_Form_Element_Select('degree_of_wear');
     $degree_of_wear->setLabel('Degree of wear: ')->setRegisterInArrayValidator(false)->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $wear_options))->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int');
     $obverse_inscription = new Zend_Form_Element_Text('obverse_inscription');
     $obverse_inscription->setLabel('Obverse inscription: ')->setDecorators($decorators)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'));
     $reverse_inscription = new Zend_Form_Element_Text('reverse_inscription');
     $reverse_inscription->setLabel('Reverse inscription: ')->setDecorators($decorators)->setAttrib('size', 60)->addFilters(array('StripTags', 'StringTrim'));
     $obverse_description = new Zend_Form_Element_Textarea('obverse_description');
     $obverse_description->setLabel('Obverse description: ')->setAttrib('rows', 3)->setAttrib('cols', 80)->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'))->setAttrib('class', 'expanding')->addFilters(array('StripTags', 'StringTrim'));
     $reverse_description = new Zend_Form_Element_Textarea('reverse_description');
     $reverse_description->setLabel('Reverse description: ')->setAttrib('rows', 3)->setAttrib('cols', 80)->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'))->setAttrib('class', 'expanding');
     $rev_mm = new Zend_Form_Element_Textarea('reverse_mintmark');
     $rev_mm->setLabel('Reverse mintmark: ')->setAttrib('rows', 3)->setAttrib('cols', 80)->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'))->setAttrib('class', 'expanding');
     $initial = new Zend_Form_Element_Textarea('initial_mark');
     $initial->setLabel('Initial mark: ')->addValidators(array('NotEmpty'))->setAttrib('rows', 3)->setAttrib('cols', 80)->addFilters(array('StripTags', 'EmptyParagraph', 'StringTrim'))->setAttrib('class', 'expanding');
     $die_axis_measurement = new Zend_Form_Element_Select('die_axis_measurement');
     $die_axis_measurement->setLabel('Die axis measurement: ')->setRegisterInArrayValidator(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose coin status' => $die_options))->setDecorators($decorators);
     $die_axis_certainty = new Zend_Form_Element_Radio('die_axis_certainty');
     $die_axis_certainty->setLabel('Die axis certainty: ')->addMultiOptions(array('1' => 'Certain', '2' => 'Probably', '3' => 'Possibly'))->addFilters(array('StripTags', 'StringTrim'))->setOptions(array('separator' => ''))->addValidator('Int')->addDecorator('HtmlTag', array('placement' => 'prepend', 'tag' => 'div', 'id' => 'radios'))->setDecorators($decorators);
     $typeID = new Zend_Form_Element_Select('typeID');
     $typeID->setLabel('Coin type: ')->setRegisterInArrayValidator(false)->setRequired(false)->addValidator('Int')->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setAttrib('class', 'large');
     $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->addElements(array($ruler_id, $ruler_qualifier, $denomination, $denomination_qualifier, $mint_id, $typeID, $status, $categoryID, $status_qualifier, $degree_of_wear, $obverse_description, $obverse_inscription, $reverse_description, $reverse_inscription, $die_axis_measurement, $die_axis_certainty, $submit, $rev_mm, $initial));
     $this->addDisplayGroup(array('categoryID', 'ruler', 'typeID', 'ruler_qualifier', 'denomination', 'denomination_qualifier', 'mint_id', 'status', 'status_qualifier', 'degree_of_wear', 'obverse_description', 'obverse_inscription', 'reverse_description', 'reverse_inscription', 'reverse_mintmark', 'initial_mark', 'die_axis_measurement', 'die_axis_certainty'), 'details');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('submit'), 'submit');
     $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     if ($action == 'editcoin') {
         $rulers = new Rulers();
         $ruler_options = $rulers->getEarlyMedRulers();
         $ruler_id->addMultiOptions(array(NULL => NULL, 'Choose ruler' => $ruler_options));
         $mints = new Mints();
         $mint_options = $mints->getEarlyMedievalMints();
         $mint_id->addMultiOptions(array(NULL => NULL, 'Choose Medieval mint' => $mint_options));
     }
 }
Ejemplo n.º 10
0
 public function catsperiodAction()
 {
     if ($this->_getParam('term', false)) {
         $cats = new CategoriesCoins();
         $response = $cats->getCategoriesPeriod($this->_getParam('term'));
     } else {
         $response = array(array('id' => NULL, 'term' => 'No period specified'));
     }
     echo Zend_Json::encode($response);
 }
 public function __construct($options = null)
 {
     $primaries = new Materials();
     $primary_options = $primaries->getPrimaries();
     //Get data to form select menu for periods
     //Get Rally data
     $rallies = new Rallies();
     $rally_options = $rallies->getRallies();
     //Get Hoard data
     $hoards = new Hoards();
     $hoard_options = $hoards->getHoards();
     $counties = new Counties();
     $county_options = $counties->getCountyName2();
     $rulers = new Rulers();
     $ruler_options = $rulers->getMedievalRulers();
     $denominations = new Denominations();
     $denomination_options = $denominations->getOptionsMedieval();
     $mints = new Mints();
     $mint_options = $mints->getMedievalMints();
     $axis = new Dieaxes();
     $axis_options = $axis->getAxes();
     $cats = new CategoriesCoins();
     $cat_options = $cats->getPeriodMed();
     $regions = new Regions();
     $region_options = $regions->getRegionName();
     $institutions = new Institutions();
     $inst_options = $institutions->getInsts();
     $axis = new Dieaxes();
     $axis_options = $axis->getAxes();
     parent::__construct($options);
     $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')));
     $this->setName('medNumismaticsSearch');
     $old_findID = new Zend_Form_Element_Text('old_findID');
     $old_findID->setLabel('Find number: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid number!')->setDecorators($decorators);
     $description = new Zend_Form_Element_Text('description');
     $description->setLabel('Object description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators);
     $workflow = new Zend_Form_Element_Select('workflow');
     $workflow->setLabel('Workflow stage: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose Worklow stage' => array('1' => 'Quarantine', '2' => 'On review', '3' => 'Awaiting validation', '4' => 'Published')))->setDecorators($decorators);
     //Rally details
     $rally = new Zend_Form_Element_Checkbox('rally');
     $rally->setLabel('Rally find: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setUncheckedValue(NULL)->setDecorators($decorators);
     $rallyID = new Zend_Form_Element_Select('rallyID');
     $rallyID->setLabel('Found at this rally: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose rally name' => $rally_options))->addValidator('InArray', false, array(array_keys($rally_options)))->setDecorators($decorators);
     $hoard = new Zend_Form_Element_Checkbox('hoard');
     $hoard->setLabel('Hoard find: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addValidator('Int')->setUncheckedValue(NULL)->setDecorators($decorators);
     $hoardID = new Zend_Form_Element_Select('hID');
     $hoardID->setLabel('Part of this hoard: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose rally name' => $hoard_options))->addValidator('InArray', false, array(array_keys($hoard_options)))->setDecorators($decorators);
     $county = new Zend_Form_Element_Select('county');
     $county->setLabel('County: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => NULL, 'Choose county' => $county_options))->addValidator('InArray', false, array(array_keys($county_options)))->setDecorators($decorators);
     $district = new Zend_Form_Element_Select('district');
     $district->setLabel('District: ')->addMultiOptions(array(NULL => 'Choose district after county'))->setRegisterInArrayValidator(false)->setDecorators($decorators);
     $parish = new Zend_Form_Element_Select('parish');
     $parish->setLabel('Parish: ')->setRegisterInArrayValidator(false)->addMultiOptions(array(NULL => 'Choose parish after county'))->setDecorators($decorators);
     $regionID = new Zend_Form_Element_Select('regionID');
     $regionID->setLabel('European region: ')->setRegisterInArrayValidator(false)->addMultiOptions(array(NULL => 'Choose a region for a wide result', 'Choose region' => $region_options))->setDecorators($decorators);
     $gridref = new Zend_Form_Element_Text('gridref');
     $gridref->setLabel('Grid reference: ')->addValidators(array('NotEmpty', 'ValidGridRef'))->setDecorators($decorators);
     $fourFigure = new Zend_Form_Element_Text('fourFigure');
     $fourFigure->setLabel('Four figure grid reference: ')->addValidators(array('NotEmpty', 'ValidGridRef'))->setDecorators($decorators);
     ###
     ##Numismatic data
     ###
     //	Denomination
     $denomination = new Zend_Form_Element_Select('denomination');
     $denomination->setLabel('Denomination: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a denomination', 'Available denominations' => $denomination_options))->addValidator('InArray', false, array(array_keys($denomination_options)))->setDecorators($decorators);
     $cat = new Zend_Form_Element_Select('category');
     $cat->setLabel('Category: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a category', 'Available categories' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)))->setDecorators($decorators);
     $type = new Zend_Form_Element_Select('typeID');
     $type->setLabel('Coin type: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->setDecorators($decorators);
     //Primary ruler
     $ruler = new Zend_Form_Element_Select('ruler');
     $ruler->setLabel('Ruler / issuer: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose a ruler', 'Available issuers' => $ruler_options))->addValidator('InArray', false, array(array_keys($ruler_options)))->setDecorators($decorators);
     //Mint
     $mint = new Zend_Form_Element_Select('mint');
     $mint->setLabel('Issuing mint: ')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->addMultiOptions(array(NULL => 'Choose a mint', 'Available mints' => $mint_options))->addValidator('InArray', false, array(array_keys($mint_options)))->setDecorators($decorators);
     //Obverse inscription
     $obverseinsc = new Zend_Form_Element_Text('obinsc');
     $obverseinsc->setLabel('Obverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators);
     //Obverse description
     $obversedesc = new Zend_Form_Element_Text('obdesc');
     $obversedesc->setLabel('Obverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators);
     //reverse inscription
     $reverseinsc = new Zend_Form_Element_Text('revinsc');
     $reverseinsc->setLabel('Reverse inscription contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators);
     //reverse description
     $reversedesc = new Zend_Form_Element_Text('revdesc');
     $reversedesc->setLabel('Reverse description contains: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('Please enter a valid term')->setDecorators($decorators);
     //Die axis
     $axis = new Zend_Form_Element_Select('axis');
     $axis->setLabel('Die axis measurement: ')->setRequired(false)->addFilters(array('StripTags', 'StringTrim'))->addMultiOptions(array(NULL => 'Choose an axis', 'Available measurements' => $axis_options))->addValidator('InArray', false, array(array_keys($axis_options)))->setDecorators($decorators);
     $objecttype = new Zend_Form_Element_Hidden('objecttype');
     $objecttype->setValue('COIN')->addFilters(array('StripTags', 'StringTrim'))->setAttrib('class', 'none')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->addValidator('Alpha');
     $broadperiod = new Zend_Form_Element_Hidden('broadperiod');
     $broadperiod->setValue('MEDIEVAL')->setAttrib('class', 'none')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->addFilters(array('StripTags', 'StringTrim'))->addValidator('Alpha');
     //Submit button
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton')->removeDecorator('label')->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper')->setLabel('Submit')->setAttrib('class', 'large');
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(4800);
     $this->addElement($hash);
     $institution = new Zend_Form_Element_Select('institution');
     $institution->setLabel('Recording institution: ')->setRequired(false)->addFilters(array('StringTrim', 'StripTags'))->addMultiOptions(array(NULL => 'Choose an institution', 'Available institutions' => $inst_options))->setDecorators($decorators);
     $this->addElements(array($old_findID, $type, $description, $workflow, $rally, $rallyID, $hoard, $hoardID, $county, $regionID, $district, $parish, $fourFigure, $gridref, $denomination, $ruler, $mint, $axis, $obverseinsc, $obversedesc, $reverseinsc, $reversedesc, $objecttype, $broadperiod, $cat, $submit, $hash, $institution));
     $this->addDisplayGroup(array('category', 'ruler', 'typeID', 'denomination', 'mint', 'moneyer', 'axis', 'obinsc', 'obdesc', 'revinsc', 'revdesc'), 'numismatics')->removeDecorator('HtmlTag');
     $this->numismatics->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->numismatics->removeDecorator('DtDdWrapper');
     $this->numismatics->setLegend('Numismatic details: ');
     $this->addDisplayGroup(array('old_findID', 'description', 'rally', 'rallyID', 'hoard', 'hID', 'workflow'), 'details')->removeDecorator('HtmlTag');
     $this->details->setLegend('Object details:');
     $this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->details->removeDecorator('DtDdWrapper');
     $this->addDisplayGroup(array('county', 'regionID', 'district', 'parish', 'gridref', 'fourFigure', 'institution'), 'spatial')->removeDecorator('HtmlTag');
     $this->spatial->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
     $this->spatial->removeDecorator('DtDdWrapper');
     $this->spatial->setLegend('Spatial details: ');
     $this->setLegend('Perform an advanced search on our database: ');
     $this->addDisplayGroup(array('submit'), 'submit');
 }
Ejemplo n.º 12
0
 /** The configuration
  * @access public
  * @return void
  */
 public function configurationAction()
 {
     $content = new Content();
     $this->view->conservation = $content->getConservationNotes();
     $this->view->treasure = $content->getTreasureContent();
     $denoms = new Denominations();
     $this->view->romanDenoms = $denoms->getDenominationsSitemap('21');
     $this->view->ironageDenoms = $denoms->getDenominationsSitemap('16');
     $this->view->earlymedDenoms = $denoms->getDenominationsSitemap('47');
     $this->view->medievalDenoms = $denoms->getDenominationsSitemap('29');
     $this->view->byzantineDenoms = $denoms->getDenominationsSitemap('67');
     $this->view->greekDenoms = $denoms->getDenominationsSitemap('66');
     $this->view->postMedDenoms = $denoms->getDenominationsSitemap('36');
     $emperors = new Emperors();
     $this->view->emperors = $emperors->getEmperorsSiteMap();
     $rulers = new Rulers();
     $this->view->medrulers = $rulers->getMedievalRulersList();
     $this->view->earlymedrulers = $rulers->getEarlyMedievalRulersList();
     $this->view->postmedrulers = $rulers->getPostMedievalRulersList();
     $this->view->ironagerulers = $rulers->getIARulersList();
     $this->view->byzantinerulers = $rulers->getByzRulersList();
     $this->view->greekrulers = $rulers->getGreekRulersList();
     $mints = new Mints();
     $this->view->romanMints = $mints->getMintsSiteMap(21);
     $this->view->ironageMints = $mints->getMintsSiteMap(16);
     $this->view->byzantineMints = $mints->getMintsSiteMap(67);
     $this->view->earlymedMints = $mints->getMintsSiteMap(47);
     $this->view->medMints = $mints->getMintsSiteMap(29);
     $this->view->postmedMints = $mints->getMintsSiteMap(36);
     $this->view->greekMints = $mints->getMintsSiteMap(66);
     $reeces = new Reeces();
     $this->view->reeces = $reeces->getSiteMap();
     $types = new MedievalTypes();
     $this->view->medtypes = $types->getTypesSiteMap(29);
     $this->view->postmedtypes = $types->getTypesSiteMap(36);
     $this->view->earlymedtypes = $types->getTypesSiteMap(47);
     $cats = new CategoriesCoins();
     $this->view->medcats = $cats->getCatsSiteMap(29);
     $this->view->earlymedcats = $cats->getCatsSiteMap(47);
     $this->view->postmedcats = $cats->getCatsSiteMap(36);
     $tribes = new Tribes();
     $this->view->tribes = $tribes->getSitemap();
     $news = new News();
     $this->view->news = $news->getSitemapNews();
 }
Ejemplo n.º 13
0
 /** Delete a medieval category
  * @access public
  * @return void
  */
 public function deletecategoryAction()
 {
     if ($this->_request->isPost()) {
         $id = (int) $this->_request->getPost('id');
         $del = $this->_request->getPost('del');
         if ($del == 'Yes' && $id > 0) {
             $cats = new CategoriesCoins();
             $where = 'id = ' . $id;
             $cats->delete($where);
         }
         $this->getFlash()->addMessage('Medieval category deleted!');
         $this->redirect($this->_redirecturl . 'categories');
     } else {
         $id = (int) $this->_request->getParam('id');
         if ($id > 0) {
             $cats = new CategoriesCoins();
             $this->view->cats = $cats->fetchRow('id =' . $id);
         }
     }
 }