本文整理汇总了PHP中Zend_Form_Element_Submit::setAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Submit::setAttribs方法的具体用法?PHP Zend_Form_Element_Submit::setAttribs怎么用?PHP Zend_Form_Element_Submit::setAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Submit
的用法示例。
在下文中一共展示了Zend_Form_Element_Submit::setAttribs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AllAction
public function AllAction($data = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$newElement = new Zend_Form_Element_Submit('New');
$newElement->setLabel($tr->translate("NEW"));
$this->addElement($newElement);
$saveElement = new Zend_Form_Element_Submit('Save');
$saveElement->setAttribs(array('class' => 'save'));
$saveElement->setLabel($tr->translate("SAVE_CLOSE"));
$this->addElement($saveElement);
$saveNewElement = new Zend_Form_Element_Submit('SaveNew');
$saveNewElement->setAttribs(array('class' => 'savenew'));
$saveNewElement->setLabel($tr->translate("SAVE_NEW"));
$this->addElement($saveNewElement);
$updateElement = new Zend_Form_Element_Submit('Update');
$updateElement->setAttribs(array('class' => 'update'));
$updateElement->setLabel($tr->translate("UPDATE"));
$this->addElement($updateElement);
$deactiveElement = new Zend_Form_Element_Submit('Deactive');
$deactiveElement->setAttribs(array('class' => 'deactive'));
$deactiveElement->setLabel($tr->translate("DEACTIVE"));
$this->addElement($deactiveElement);
$activeElement = new Zend_Form_Element_Submit('Active');
$activeElement->setAttribs(array('class' => 'activate'));
$activeElement->setLabel($tr->translate("ACTIVE"));
$this->addElement($activeElement);
$CancelElement = new Zend_Form_Element_Submit('Cancel');
$CancelElement->setAttribs(array('class' => 'cancel'));
$this->addElement($CancelElement);
return $this;
}
示例2: editUserPassword
function editUserPassword()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'formAccountEditPassword', 'class' => ''));
$filters = array(new Zend_Filter_StringTrim(), new Zend_Filter_StripTags());
$control = new Zend_Form_Element_Hidden('control');
$control->setValue('editPassword');
$this->addElement($control);
$oldPassword = new Zend_Form_Element_Password('oldPassword');
$oldPassword->setLabel('Old password');
$oldPassword->addValidator(new Zend_Validate_StringLength(6, 32));
$oldPassword->setAttribs(array('class' => 'text validate[required,minSize[6],maxSize[32]] rightAdd', 'minlenght' => '6', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'data-prompt-position' => 'topLeft:0'));
$oldPassword->setRequired(true);
$this->addElement($oldPassword);
$password = new Zend_Form_Element_Password('password');
$password->setLabel(Zend_Registry::get('translate')->_('admin_administrators_new_password'));
$password->addValidator(new Zend_Validate_StringLength(6, 32));
$password->setAttribs(array('class' => 'text validate[required] rightAdd', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'ondrop' => 'return false', 'onpaste' => 'return false'));
$password->setRequired(true);
$this->addElement($password);
$retypePassword = new Zend_Form_Element_Password('retypePassword');
$retypePassword->setLabel(Zend_Registry::get('translate')->_('admin_administrators_retype_new_password'));
$retypePassword->addValidator(new Zend_Validate_Identical('password'));
$retypePassword->addValidator(new Zend_Validate_StringLength(6, 32));
$retypePassword->setAttribs(array('class' => 'text validate[required] rightAdd', 'maxlenght' => '32', 'autocomplete' => 'off', 'oncontextmenu' => 'return false', 'ondrop' => 'return false', 'onpaste' => 'return false'));
$retypePassword->setRequired(true);
$retypePassword->setIgnore(true);
$this->addElement($retypePassword);
$submit = new Zend_Form_Element_Submit('savePassword');
$submit->setValue(Zend_Registry::get('translate')->_('apply_password'));
$submit->setAttribs(array('class' => 'submit tsSubmitLogin fL'));
$submit->setIgnore(true);
$this->addElement($submit);
$this->setElementFilters($filters);
}
示例3: init
function init()
{
// Set the method for the display form to POST
$this->setMethod('post');
$this->addAttribs(array('id' => 'addGroup', 'class' => ''));
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$control = new Zend_Form_Element_Hidden('control');
$control->setValue('addGroup');
$this->addElement($control);
// begin inputs
$name = new Zend_Form_Element_Text('name');
$name->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_category_name')));
$name->setRequired(true);
$this->addElement($name);
// begin inputs
$color = new Zend_Form_Element_Text('color');
$color->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_color_for_charts')));
$color->setRequired(true);
$this->addElement($color);
// begin inputs
$type = new Zend_Form_Element_Select('type');
$options = array('' => Zend_Registry::get('translate')->_('admin_category_select_type'), '0' => Zend_Registry::get('translate')->_('admin_expenses'), '1' => Zend_Registry::get('translate')->_('admin_income'));
$type->setMultiOptions($options);
$type->addValidator(new Zend_Validate_InArray(array_keys($options)));
$type->setAttribs(array('class' => 'select', 'id' => 'type'));
$type->setRequired(true);
$this->addElement($type);
$submit = new Zend_Form_Element_Submit('submit');
$submit->setValue(Zend_Registry::get('translate')->_('admin_add'));
$submit->setAttribs(array('class' => 'submit'));
$submit->setIgnore(true);
$this->addElement($submit);
}
示例4: init
public function init()
{
// submit default
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel("Enviar");
$submit->setAttribs(array('class' => 'btn btn-success btn-group-justified'));
$this->addElement($submit);
}
示例5: init
public function init()
{
parent::init();
// add submit
$submit = new Zend_Form_Element_Submit("submit");
$submit->setLabel("Enviar");
$submit->setAttribs(array('class' => 'btn btn-primary form-control'));
$this->addElement($submit);
$this->setElementsDefaultAttribs();
}
示例6: init
public function init()
{
//servico_tag
$servico_tag = new Zend_Form_Element_Text("servico_tag");
$servico_tag->setLabel("Serviço");
$servico_tag->setRequired();
$servico_tag->setAttribs(array('class' => 'form-control'));
// submit
$submit = new Zend_Form_Element_Submit("submit");
$submit->setLabel("Enviar");
$submit->setAttribs(array('class' => 'form-control btn btn-sm btn-success'));
$this->addElements(array($servico_tag, $submit));
}
示例7: init
public function init()
{
$this->name = new Zend_Form_Element_Text('name');
$this->new_password = new Zend_Form_Element_Password('new_password');
$this->confirm_password = new Zend_Form_Element_Password('confirm_password');
$this->email = new Zend_Form_Element_Text('email');
$this->biography = new Zend_Form_Element_Textarea('biography');
$this->submit = new Zend_Form_Element_Submit('submit');
$email_validator = new Zend_Validate_EmailAddress();
$email_validator->setDeepMxCheck(false);
$email_validator->setDomainCheck(false);
$email_validator->setMessages(array(Zend_Validate_EmailAddress::INVALID_FORMAT => "Format Email Salah"));
$confirm_password_validator = new Zend_Validate_Identical();
$confirm_password_validator->setMessage("Kata sandi tidak cocok.");
$this->biography->setAttribs(array('style' => 'width:100%;height:240px'));
$this->name->setAttribs(array('class' => 'span6', 'placeholder' => 'Nama lengkap anda'));
$this->email->addValidator($email_validator)->setAttribs(array('class' => 'span4', 'placeholder' => 'pengguna@contoh.com'));
$this->submit->setAttribs(array('class' => 'btn btn-success'))->setLabel('Simpan');
$this->confirm_password->addValidator($confirm_password_validator);
$this->addElements(array($this->name, $this->new_password, $this->confirm_password, $this->email, $this->biography, $this->submit));
$this->setElementDecorators(array('ViewHelper', 'Errors'));
}
示例8: init
function init()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'addUser', 'class' => ''));
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$action = new Zend_Form_Element_Hidden('action');
$action->setValue('add');
$this->addElement($action);
// BEGIN: Name
$name = new Zend_Form_Element_Text('name');
$name->setAttribs(array('class' => 'text large rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_full_name'), 'id' => 'name'));
$name->setRequired(true);
$this->addElement($name);
// END: Name
// BEGIN: Account Name
$accountName = new Zend_Form_Element_Text('accountName');
$accountName->setAttribs(array('class' => 'text large rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_account_name'), 'id' => 'accountName'));
$accountName->setRequired(true);
$this->addElement($accountName);
// END: Account Name
// BEGIN: Email
$email = new Zend_Form_Element_Text('email');
$email->setAttribs(array('class' => 'text large rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_email_address'), 'id' => 'email'));
$validatorEmail = new Zend_Validate_Db_NoRecordExists('users', 'email');
$email->addValidator($validatorEmail);
$email->setRequired(true);
$this->addElement($email);
// END: Email
//BEGIN:Level
$idLevel = new Zend_Form_Element_Select('idRole');
$options = array('' => Zend_Registry::get('translate')->_('admin_select_user_level'));
$levels = new Default_Model_Role();
$select = $levels->getMapper()->getDbTable()->select()->where('id != ?', 1)->where('NOT deleted')->order('id DESC');
$result = $levels->fetchAll($select);
if (NULL != $result) {
foreach ($result as $value) {
$options[$value->getId()] = $value->getName();
}
}
$idLevel->addMultiOptions($options);
$idLevel->addValidator(new Zend_Validate_InArray(array_keys($options)));
$idLevel->setAttribs(array('class' => 'rightAdd', 'id' => 'idRole'));
$idLevel->setRequired(false);
$this->addElement($idLevel);
//END:Level
$add = new Zend_Form_Element_Submit('add');
$add->setValue(Zend_Registry::get('translate')->_('admin_add_user'));
$add->setAttribs(array('class' => 'submit', 'id' => ''));
$add->setIgnore(true);
$this->addElement($add);
}
示例9: init
function init()
{
// Set the method for the display form to POST
$this->setMethod('post');
$this->setAction(WEBROOT . 'logs');
$this->addAttribs(array('id' => 'searchLogs', 'class' => ''));
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
//BEGIN:Module
$id = new Zend_Form_Element_Select('modul');
$options = array('' => 'Selectati modulul');
$module = new Default_Model_Logs();
$select = $module->getMapper()->getDbTable()->select()->group('modul')->order('created DESC');
$result = $module->fetchAll($select);
if (NULL != $result) {
foreach ($result as $value) {
$options[$value->getModul()] = $value->getModul();
}
}
$id->addMultiOptions($options);
$this->addElement($id);
//END:Module
//BEGIN:ActionType
$id = new Zend_Form_Element_Select('actionType');
$options = array('' => 'Selectati tipul actiunii');
$module = new Default_Model_Logs();
$select = $module->getMapper()->getDbTable()->select()->group('actionType')->order('created DESC');
$result = $module->fetchAll($select);
if (NULL != $result) {
foreach ($result as $value) {
$options[$value->getActionType()] = $value->getActionType();
}
}
$id->addMultiOptions($options);
$this->addElement($id);
//END:ActionType
// BEGIN: data
$data_inceput = new Zend_Form_Element_Text('data_inceput');
$data_inceput->setAttribs(array('class' => 'data_inceput', 'placeholder' => 'Data inceput'));
$this->addElement($data_inceput);
$data_sfarsit = new Zend_Form_Element_Text('data_sfarsit');
$data_sfarsit->setAttribs(array('class' => 'data_sfarsit', 'placeholder' => 'Data sfarsit'));
$this->addElement($data_sfarsit);
// END: data
$submit = new Zend_Form_Element_Submit('submit');
$submit->setValue('Cauta');
$submit->setAttribs(array('class' => 'submit'));
$submit->setIgnore(true);
$this->addElement($submit);
}
示例10: init
function init()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'comments_form', 'class' => ''));
$description = new Zend_Form_Element_Textarea('description');
$description->setLabel('Comment text');
$description->setAttribs(array('class' => 'mess_textarea validate[required]', 'placeholder' => trim(Zend_Registry::get('translate')->_('Comment text')), 'data-prompt-position' => 'topLeft:6'));
$description->setRequired(true);
$this->addElement($description);
$button = new Zend_Form_Element_Submit('button');
$button->setValue(trim(Zend_Registry::get('translate')->_('Send Comment')));
$button->setAttribs(array('class' => 'comments_submit'));
$button->setIgnore(true);
$this->addElement($button);
}
示例11: init
function init()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'intrebare_form', 'class' => ''));
$nume = new Zend_Form_Element_Text('tabel');
$nume->setLabel('Nume Tabel');
$nume->setAttribs(array('class' => 'text_input validate[required]', 'placeholder' => trim(Zend_Registry::get('translate')->_('Nume Tabel')), 'data-prompt-position' => 'topRight:-187'));
$nume->setRequired(true);
$this->addElement($nume);
$button = new Zend_Form_Element_Submit('button');
$button->setValue(trim(Zend_Registry::get('translate')->_('Generate Model')));
$button->setAttribs(array('class' => 'question_submit'));
$button->setIgnore(true);
$this->addElement($button);
}
示例12: init
function init()
{
// Set the method for the display form to POST
$this->setMethod('post');
$this->addAttribs(array('id' => 'addExpense', 'class' => ''));
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
$control = new Zend_Form_Element_Hidden('control');
$control->setValue('addExpense');
$this->addElement($control);
// begin inputs
$name = new Zend_Form_Element_Text('name');
$name->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_recurrent_expense_description')));
$name->setRequired(true);
$this->addElement($name);
$price = new Zend_Form_Element_Text('price');
$price->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_price')));
$price->setRequired(true);
$this->addElement($price);
//BEGIN: Date
$date = new Zend_Form_Element_Text('date');
$date->setAttribs(array('class' => 'rightAdd dateSearch w_315', 'placeholder' => 'Date'));
$date->setLabel('Select day');
$this->addElement($date);
// END: Date
//BEGIN:Id Group
$idGroup = new Zend_Form_Element_Select('idGroup');
$options = array();
$pm = new Default_Model_Groups();
$select = $pm->getMapper()->getDbTable()->select()->where('NOT deleted')->order('name ASC');
$result = $pm->fetchAll($select);
if (NULL != $result) {
foreach ($result as $value) {
$options[$value->getId()] = $value->getName();
}
}
$idGroup->addMultiOptions($options);
$idGroup->addValidator(new Zend_Validate_InArray(array_keys($options)));
$idGroup->setAttribs(array('class' => 'select'));
$idGroup->setRequired(false);
$this->addElement($idGroup);
//END:Id Group
$submit = new Zend_Form_Element_Submit('submit');
$submit->setValue(Zend_Registry::get('translate')->_('admin_add_recurrent_expense'));
$submit->setAttribs(array('class' => 'submit'));
$submit->setIgnore(true);
$this->addElement($submit);
}
示例13: init
function init()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'file-manager', 'class' => ''));
$action = new Zend_Form_Element_Hidden('action');
$action->setValue('add');
$this->addElement($action);
$description = new Zend_Form_Element_Textarea('description');
$description->setLabel('Description');
$description->setAttribs(array('class' => 'mess_textarea validate[required]', 'placeholder' => 'Description', 'style' => 'width:272px'));
$this->addElement($description);
$button = new Zend_Form_Element_Submit('rightSubmit');
$button->setValue('UPLOAD FILE');
$button->setAttribs(array('class' => 'comments_submit'));
$button->setIgnore(true);
$this->addElement($button);
}
示例14: init
function init()
{
$this->setMethod('post');
$this->addAttribs(array('id' => 'filterForm', 'class' => ''));
$this->setAction(WEBROOT . 'recurrent-expenses');
// BEGIN: nume text
$nameSearch = new Zend_Form_Element_Text('nameSearch');
$nameSearch->setAttribs(array('class' => 'text large', 'placeholder' => Zend_Registry::get('translate')->_('admin_name')));
$nameSearch->setRequired(false);
$this->addElement($nameSearch);
// END: nume text
// BEGIN: prenume text
$idGroupSearch = new Zend_Form_Element_Select('idGroupSearch');
$options = array('' => Zend_Registry::get('translate')->_('admin_select_expense'));
$groups = new Default_Model_Groups();
$select = $groups->getMapper()->getDbTable()->select()->where('type=?', 0)->where('NOT deleted')->order('name ASC');
$result = $groups->fetchAll($select);
if (NULL != $result) {
foreach ($result as $value) {
$options[$value->getId()] = $value->getName();
}
}
$idGroupSearch->addMultiOptions($options);
$idGroupSearch->addValidator(new Zend_Validate_InArray(array_keys($options)));
$idGroupSearch->setAttribs(array('class' => 'select uniformSelect filter_selector'));
$idGroupSearch->setRequired(false);
$this->addElement($idGroupSearch);
// END: prenume text
// BEGIN: fromDate text
$fromDate = new Zend_Form_Element_Text('fromDate');
$fromDate->setAttribs(array('class' => 'text large', 'placeholder' => Zend_Registry::get('translate')->_('admin_from_date')));
$fromDate->setRequired(false);
$this->addElement($fromDate);
// END: fromDate text
// BEGIN: toDate text
$toDate = new Zend_Form_Element_Text('toDate');
$toDate->setAttribs(array('class' => 'text large', 'placeholder' => Zend_Registry::get('translate')->_('admin_to_date')));
$toDate->setRequired(false);
$this->addElement($toDate);
// END: toDate text
$search = new Zend_Form_Element_Submit('searchProduct');
$search->setValue(Zend_Registry::get('translate')->_('admin_filter'));
$search->setAttribs(array('class' => 'submit'));
$search->setIgnore(true);
$this->addElement($search);
}
示例15: init
public function init()
{
// administrador_email
$administrador_email = new Zend_Form_Element_Text("administrador_email");
$administrador_email->setLabel("E-mail");
$administrador_email->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o email'));
$administrador_email->setRequired();
// administrador_senha
$administrador_senha = new Zend_Form_Element_Password("administrador_senha");
$administrador_senha->setLabel("Senha");
$administrador_senha->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe a senha'));
$administrador_senha->setRequired();
// submit
$submit = new Zend_Form_Element_Submit("submit");
$submit->setLabel("Enviar");
$submit->setAttribs(array('class' => 'form-control btn btn-sm btn-success'));
$this->addElements(array($administrador_email, $administrador_senha, $submit));
}