本文整理汇总了PHP中Zend_Form_Element_Button::removeDecorator方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Button::removeDecorator方法的具体用法?PHP Zend_Form_Element_Button::removeDecorator怎么用?PHP Zend_Form_Element_Button::removeDecorator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Button
的用法示例。
在下文中一共展示了Zend_Form_Element_Button::removeDecorator方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setButton
protected function setButton()
{
$submit = new Zend_Form_Element_Submit("submit", array("label" => "Salvar"));
$submit->removeDecorator('DtDdWrapper');
$submit->addDecorator(array("opentd" => 'HtmlTag'), array('class' => 'form_control_left', 'tag' => 'td'));
$submit->addDecorator(array("opentr" => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::PREPEND));
$submit->setOrder(100);
$this->addElement($submit);
$back = new Zend_Form_Element_Button("cancel", array("label" => "Cancelar"));
$back->setAttrib("onclick", "location.href='javascript:history.back();'");
$back->removeDecorator('DtDdWrapper');
$back->addDecorator(array("closetd" => 'HtmlTag'), array('class' => 'form_control_right', 'tag' => 'td'));
$back->addDecorator(array("closetr" => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::APPEND));
$back->setOrder(101);
$this->addElement($back);
}
示例2: __construct
public function __construct()
{
$config_file = "modules/default/forms/filter.xml";
$config = new Zend_Config_Xml($config_file, null, true);
parent::__construct($config);
$i18n = Zend_Registry::get("i18n");
$this->setElementDecorators(array('ViewHelper', 'Label'));
$this->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form')), 'Form'));
$submit = new Zend_Form_Element_Submit("submit", array("label" => $i18n->translate("Filter")));
$submit->removeDecorator('DtDdWrapper');
$this->submit = $submit;
// Botão Lista Completa
$reset = new Zend_Form_Element_Button("buttom", array("label" => $i18n->translate("Cancel")));
$reset->removeDecorator('DtDdWrapper');
$this->reset = $reset;
$this->addElement($submit);
$this->addElement($reset);
}
示例3: setSelectBox
/**
* Inserts two selections and buttons to control the elements between them.
*
* @param string $name - Define elements id. Important to javascript interaction
* @param string $label
* @param array $start_itens
* @param array $end_itens
*/
public function setSelectBox($name, $label, $start_itens, $end_itens = false)
{
$i18n = Zend_Registry::get("i18n");
$header = new Zend_Form_Element_Hidden('elementHeader');
$header->removeDecorator("DtDdWrapper")->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'selects', 'openOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::PREPEND));
$start_box = new Zend_Form_Element_Multiselect("box");
$start_box->setLabel($i18n->translate($label))->setMultiOptions($start_itens)->removeDecorator('DtDdWrapper')->setAttrib('id', $name . '_box')->setRegisterInArrayValidator(false);
$end_box = new Zend_Form_Element_Multiselect("box_add");
if ($end_itens) {
$end_box->setMultiOptions($end_itens);
$end_box->setValue(array_keys($end_itens));
}
$end_box->removeDecorator('DtDdWrapper')->removeDecorator('Label')->setAttrib('id', $name . '_box_add')->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'selects', 'closeOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::APPEND))->setRegisterInArrayValidator(false);
$add_action = new Zend_Form_Element_Button($i18n->translate('Add'));
$add_action->removeDecorator("DtDdWrapper")->addDecorator('HtmlTag', array('tag' => 'li'))->setAttrib('id', $name . '_add_bt')->setAttrib('class', 'add_item')->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'selectActions', 'openOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::PREPEND));
$remove_action = new Zend_Form_Element_Button($i18n->translate('Remove'));
$remove_action->removeDecorator("DtDdWrapper")->addDecorator('HtmlTag', array('tag' => 'li'))->setAttrib('id', $name . '_remove_bt')->setAttrib('class', 'remove_item')->addDecorator('HtmlTag', array('tag' => 'div', 'id' => 'selectActions', 'closeOnly' => true, 'placement' => Zend_Form_Decorator_Abstract::APPEND));
$this->addElements(array($header, $start_box, $add_action, $remove_action, $end_box));
}
示例4: childcategoryselectindoAction
$save_btn->setAttrib('onclick', 'saveCategory(' . $poi_id . ',$("#CategoryChild' . $poi_id . '").val(),' . $index . ');');
$save_btn->removeDecorator('HtmlTag');
$save_btn->removeDecorator('DtDdWrapper');
$save_btn->removeDecorator('Label');
$save_btn->setAttrib('class', 'btn radius');
$this->view->savebutton = $save_btn;
$cancel_btn = new Zend_Form_Element_Button('CancelCategory' . $poi_id, 'cancel');
$cancel_btn->setAttrib('onclick', 'CancelCategory(' . $index . ',' . $poi_id . ',' . $index . ')');
$cancel_btn->removeDecorator('HtmlTag');
$cancel_btn->removeDecorator('DtDdWrapper');
$cancel_btn->removeDecorator('Label');
$cancel_btn->setAttrib('class', 'btn radius');
$this->view->cancelbutton = $cancel_btn;
} else {
$this->view->list = FALSE;
}
} else {
$Category = new Zend_Form_Element_Select('CategoryChild', $data);
}
$Category->removeDecorator('HtmlTag');
$Category->removeDecorator('DtDdWrapper');
$Category->removeDecorator('Label');
$this->view->selectbox = $Category;
$this->view->category_id = $cat_id;
}
public function childcategoryselectindoAction()
{
$language_id = 2;
$cat_id = $this->_getParam('catid');
$tablecategory = new Model_DbTable_Category();
$data = $tablecategory->getAllChildIdNameByParentIdLangId($cat_id, $language_id);
$type = $this->_getParam('type');
if (isset($type)) {
$poi_id = $this->_getParam('poi');
$index = $this->_getParam('index');
if ($type == 'list') {
$this->view->list = TRUE;
$Category = new Zend_Form_Element_Select('CategoryChild' . $poi_id, $data);
$save_btn = new Zend_Form_Element_Button('SaveCategory' . $poi_id, 'save');
示例5: init
public function init()
{
/* Form Elements & Other Definitions Here ... */
$this->setAttrib('enctype', 'multipart/form-data');
$this->setName('FormularioCompra');
$ID_PROJETO = new Zend_Form_Element_Hidden('ID_PROJETO');
$ID_PROJETO->addFilter('Int');
$ID_PROJETO->removeDecorator('Label');
$NM_PROJETO = new Zend_Form_Element_Text('NM_PROJETO');
$NM_PROJETO->setLabel('NOME PROJETO')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('placeholder', 'Enter nome ');
$DT_CADASTRO = new Zend_Form_Element_Text('DT_CADASTRO');
$DT_CADASTRO->setLabel('DATA CADASTRO')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control');
$FK_AGENCIA_AMBIENTAL = new Zend_Form_Element_Select('FK_AGENCIA_AMBIENTAL');
$agenciaAmbiental = new Application_Model_DbTable_AgenciaAmbiental();
$FK_AGENCIA_AMBIENTAL->setLabel('AGÊNCIA AMBIENTAL');
$FK_AGENCIA_AMBIENTAL->setMultiOptions($agenciaAmbiental->getAgenciaAmbientalCombo())->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
$NR_CONTRATO = new Zend_Form_Element_Text('NR_CONTRATO');
$NR_CONTRATO->setLabel('Nº CONTRATO')->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('placeholder', 'Enter nº contrato ');
$TX_OBSERVACAO = new Zend_Form_Element_Textarea('TX_OBSERVACAO');
$TX_OBSERVACAO->setLabel('OBSERVAÇÃO')->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control')->setAttrib('rows', '20');
$FK_CLIENTE = new Zend_Form_Element_Select('FK_CLIENTE');
$cliente = new Application_Model_DbTable_Cliente();
$FK_CLIENTE->setLabel('CLIENTE');
$FK_CLIENTE->setMultiOptions($cliente->getClienteCombo())->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
$FK_STATUS_PROJETO = new Zend_Form_Element_Select('FK_STATUS_PROJETO');
$statusProjeto = new Application_Model_DbTable_StatusProjeto();
$FK_STATUS_PROJETO->setLabel('STATUS');
$FK_STATUS_PROJETO->setMultiOptions($statusProjeto->getStatusProjetoCombo())->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
/*$tiposNoticia = array("1"=>"SIM", "2"=>"NÃO);
$FL_ATIVO = new Zend_Form_Element_Select( 'FL_ATIVO' );
$FL_ATIVO->setLabel('ATIVO')
->setRequired(true)
->addMultiOptions($tiposNoticia)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->removeDecorator('DtDdWrapper')
->removeDecorator('HtmlTag')
->removeDecorator('Label')
->setAttrib('class', 'form-control select2') ->setAttrib('placeholder', "Enter tipo not�cia");;*/
$FK_INDICACAO = new Zend_Form_Element_Select('FK_INDICACAO');
$statusIndicacao = new Application_Model_DbTable_Indicacao();
$FK_INDICACAO->setLabel('INDICAÇÃO');
$FK_INDICACAO->setMultiOptions($statusIndicacao->getIndicacaoCombo())->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
$Fk_GESTOR = new Zend_Form_Element_Select('Fk_GESTOR');
$gestor = new Application_Model_DbTable_Operador();
$Fk_GESTOR->setLabel('GESTOR');
$Fk_GESTOR->setMultiOptions($gestor->getOperadorCombo())->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
$FK_TIPO_PROJETO = new Zend_Form_Element_Select('FK_TIPO_PROJETO');
$tipoProjeto = new Application_Model_DbTable_TipoProjeto();
$FK_TIPO_PROJETO->setLabel('TIPO PROJETO');
$FK_TIPO_PROJETO->setMultiOptions($tipoProjeto->getTipoProjetoCombo())->setRequired(true)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('Label')->setAttrib('class', 'form-control select2');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel("Adiconar");
$submit->setAttrib('id', 'submitbutton');
$submit->removeDecorator('DtDdWrapper')->setAttrib('class', 'btn btn-info pull-right')->removeDecorator('HtmlTag')->removeDecorator('Label');
$ADICIONAR = new Zend_Form_Element_Button('ADICIONAR');
$ADICIONAR->setLabel("Adiconar");
$ADICIONAR->setAttrib('id', 'submitbutton');
$ADICIONAR->setAttrib('data-toggle', 'modal');
$ADICIONAR->setAttrib('data-target', '#myModal');
$ADICIONAR->removeDecorator('DtDdWrapper')->setAttrib('class', 'btn btn-info btn-flat')->removeDecorator('HtmlTag')->removeDecorator('Label');
$this->addElements(array($ID_PROJETO, $NM_PROJETO, $DT_CADASTRO, $FK_AGENCIA_AMBIENTAL, $NR_CONTRATO, $FK_CLIENTE, $TX_OBSERVACAO, $FK_STATUS_PROJETO, $FK_INDICACAO, $Fk_GESTOR, $FK_TIPO_PROJETO, $submit, $ADICIONAR));
$this->setDecorators(array(array('ViewScript', array('viewScript' => '/forms/formularioProjeto.phtml'))));
}
示例6: __construct
//.........这里部分代码省略.........
$identifier1ID = new Zend_Form_Element_Hidden('identifier1ID');
$identifier1ID->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(27);
$id2by = new Zend_Form_Element_Text('id2by');
$id2by->setLabel('Secondary Identifier: ')->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(28);
//Secondary Identifier
$identifier2ID = new Zend_Form_Element_Hidden('identifier2ID');
$identifier2ID->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(29);
## DISCOVERER DETAILS ##
//Finder
$finder1ID = new Zend_Form_Element_Hidden('finder1ID');
$finder1ID->setRequired(false)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(30);
$hiddenfield = new Zend_Form_Element_Hidden('hiddenfield');
$hiddenfield->setValue(2)->setOrder(31);
$finder1 = new Zend_Form_Element_Text('finder1');
$finder1->setLabel('Found by: ')->addFilters(array('StripTags', 'StringTrim', 'Null'))->setDescription('To make a new finder/identifier appear, you ' . 'first need to create them from the people menu on ' . 'the left hand side')->setOrder(32);
$addFinderButton = new Zend_Form_Element_Button('addFinder');
$addFinderButton->setLabel('Add Additional Finder')->setAttribs(array('class' => 'btn btn-info'));
$addFinderButton->setOrder(50);
$removeFinderButton = new Zend_Form_Element_Button('removeFinder');
$removeFinderButton->setLabel('Remove Last Finder')->setAttribs(array('class' => 'btn btn-warning hidden'));
$removeFinderButton->setOrder(51);
## DISCOVERY INFORMATION ##
//Discovery method
$discmethod = new Zend_Form_Element_Select('discmethod');
$discmethod->setLabel('Discovery method: ')->setRequired(false)->setValue(1)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->addValidator('inArray', true, array(array_keys($disc_options)))->addMultiOptions(array(null => 'Choose method of discovery', 'Available methods' => $disc_options))->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->setOrder(52);
//Discovery circumstances
$disccircum = new Zend_Form_Element_Text('disccircum');
$disccircum->setLabel('Discovery circumstances: ')->setAttrib('size', 50)->setAttrib('class', 'span6')->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(53);
//Date found from
$datefound1 = new Zend_Form_Element_Text('datefound1');
$datefound1->setLabel('First discovery date: ')->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(54);
//Date found to
$datefound2 = new Zend_Form_Element_Text('datefound2');
$datefound2->setLabel('Second discovery date: ')->setAttrib('size', 10)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(55);
//Rally details
$rally = new Zend_Form_Element_Checkbox('rally');
$rally->setLabel('Rally find: ')->setCheckedValue('1')->setUncheckedValue(null)->addFilters(array('StripTags', 'StringTrim', 'Null'))->addValidator('Int')->setOrder(56);
$rallyID = new Zend_Form_Element_Select('rallyID');
$rallyID->setLabel('Found at this rally: ')->addFilters(array('StripTags', 'StringTrim', 'Null'))->addMultiOptions(array(null => 'Choose rally name', 'Available rallies' => $rally_options))->addValidator('InArray', false, array(array_keys($rally_options)))->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addValidator('Int')->setOrder(57);
## OTHER REFERENCE NUMBERS ##
//Legacy hoard ID
$legacy_ref = new Zend_Form_Element_Text('legacyID');
$legacy_ref->setLabel('Legacy hoard ID: ')->setAttrib('size', 5)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(58)->disabled = true;
//Other reference number
$other_ref = new Zend_Form_Element_Text('other_ref');
$other_ref->setLabel('Other reference: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(59);
//HER reference number
$smrrefno = new Zend_Form_Element_Text('smrrefno');
$smrrefno->setLabel('Historic Environment Record number: ')->setAttrib('size', 30)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(60);
//Museum accession number
$musaccno = new Zend_Form_Element_Text('musaccno');
$musaccno->setLabel('Museum accession number: ')->setAttrib('size', 50)->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(61);
//Current location of object
$curr_loc = new Zend_Form_Element_Text('curr_loc');
$curr_loc->setLabel('Current location: ')->setAttrib('class', 'span6')->addFilters(array('StripTags', 'StringTrim', 'Null'))->setOrder(62);
//Current location of object
$subs_action = new Zend_Form_Element_Select('subs_action');
$subs_action->setLabel('Subsequent action: ')->addFilters(array('StripTags', 'StringTrim', 'Null'))->setAttrib('class', 'span6')->addMultiOptions(array(null => 'Choose a subsequent action', 'Available options' => $actionsDD))->setValue(1)->addValidator('InArray', false, array(array_keys($actionsDD)))->addValidator('Int')->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->setOrder(63);
## Quantities ##
$quantityCoins = new Zend_Form_Element_Text('quantityCoins');
$quantityCoins->setLabel('Quantity of coins: ')->addValidator('Int')->setValue(null);
$quantityArtefacts = new Zend_Form_Element_Text('quantityArtefacts');
$quantityArtefacts->setLabel('Quantity of artefacts: ')->addValidator('Int')->setValue(null);
$quantityContainers = new Zend_Form_Element_Text('quantityContainers');
$quantityContainers->setLabel('Quantity of containers: ')->addValidator('Int')->setValue(null);
## SUBMIT BUTTON ##
$submit = new Zend_Form_Element_Submit('submit');
$submit->setOrder(67);
$this->addElements(array($secuid, $old_hoardID, $broadperiod, $hoardperiod1, $hoardperiod2, $hoardsubperiod1, $hoardsubperiod2, $numdate1, $numdate2, $lastruler, $lastreeceperiod, $terminaldate1, $terminaldate2, $terminalreason, $description, $notes, $coindataquality, $findofnote, $findofnotereason, $treasure, $treasureID, $quantityArtefacts, $quantityCoins, $quantityContainers, $materials, $recorderID, $recordername, $idBy, $id2by, $identifier1ID, $identifier2ID, $finder1, $finder1ID, $hiddenfield, $addFinderButton, $removeFinderButton, $discmethod, $disccircum, $datefound1, $datefound2, $rally, $rallyID, $legacy_ref, $other_ref, $smrrefno, $musaccno, $curr_loc, $subs_action, $submit));
$this->addDisplayGroup(array('broadperiod', 'subperiod1', 'period1', 'subperiod2', 'period2', 'numdate1', 'numdate2'), 'hoarddating');
$this->hoarddating->setLegend('Hoard dating');
$this->addDisplayGroup(array('lastrulerID', 'reeceID', 'terminalyear1', 'terminalyear2', 'terminalreason'), 'coindating');
$this->coindating->setLegend('Coin dating');
$this->addDisplayGroup(array('description', 'notes', 'qualityrating', 'findofnote', 'findofnotereason', 'treasure', 'treasureID'), 'hoarddetails');
$this->hoarddetails->setLegend('Hoard details');
$this->addDisplayGroup(array('quantityCoins', 'quantityArtefacts', 'quantityContainers'), 'quantities');
$this->quantities->setLegend('Quantities');
$this->addDisplayGroup(array('materials'), 'primarymaterials');
$this->primarymaterials->setLegend('Materials');
$this->addDisplayGroup(array('recordername', 'recorderID', 'idBy', 'identifier1ID', 'id2by', 'identifier2ID'), 'recorders');
$this->recorders->setLegend('Recording details');
$this->addDisplayGroup(array('finder1', 'finder1ID', 'hiddenfield', 'addFinder', 'removeFinder'), 'discoverers');
$this->discoverers->setLegend('Discoverer details');
$this->addDisplayGroup(array('disccircum', 'discmethod', 'datefound1', 'datefound2', 'rally', 'rallyID'), 'discovery');
$this->discovery->setLegend('Discovery details');
$this->addDisplayGroup(array('legacyID', 'other_ref', 'smrrefno', 'musaccno', 'curr_loc', 'subs_action'), 'references');
$this->references->setLegend('Reference numbers');
$this->addDisplayGroup(array('submit'), 'buttons');
parent::init();
$addFinderButton->removeDecorator('Label');
$addFinderButtonDecorator = $addFinderButton->getDecorator('HtmlTag');
$addFinderButtonDecorator->setOption('id', 'addFinderDiv');
$removeFinderButton->removeDecorator('Label');
$person = new Pas_User_Details();
$role = $person->getRole();
$projectTeam = array('hoard', 'admin');
if (!in_array($role, $projectTeam)) {
$coindataquality->disabled = true;
}
}