当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Password::setAttrib方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Password::setAttrib方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Password::setAttrib方法的具体用法?PHP Zend_Form_Element_Password::setAttrib怎么用?PHP Zend_Form_Element_Password::setAttrib使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Password的用法示例。


在下文中一共展示了Zend_Form_Element_Password::setAttrib方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $this->setMethod('post');
     //        $this->setAction('/index/login');
     $this->setAttrib('id', 'msform');
     $email = new Zend_Form_Element_Text('email');
     $email->setAttrib('placeholder', 'E-mail');
     $email->setAttrib('autocomplete', 'off');
     $email->addFilter('StripTags');
     $email->addFilter('HtmlEntities');
     $email->addFilter('StringTrim');
     $email->setRequired(true)->addErrorMessage('Username Required');
     $email->addValidator('EmailAddress')->addErrorMessage('Invalid Email used');
     $email->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field');
     $password = new Zend_Form_Element_Password('password');
     $password->setAttrib('placeholder', 'Password');
     $password->setAttrib('autocomplete', 'off');
     $password->addFilter('StripTags');
     $password->addFilter('HtmlEntities');
     $password->addFilter('StringTrim');
     $password->setRequired(true)->addErrorMessage('Password Required');
     $password->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field');
     $link = new Zend_Form_Element_Note('forgot_password', array('value' => '<a href="#" id="link">Forgot your password ?</a>'));
     $submit = new Zend_Form_Element_Submit('SignIn');
     $submit->setLabel('Sign In');
     $submit->setAttrib('class', 'btn btn-info');
     $register = new Zend_Form_Element_Button('register');
     $register->setLabel('Register');
     $register->setAttrib('class', 'btn btn-warning');
     $this->addElements(array($email, $password, $submit, $register, $link));
     $this->setElementDecorators(array('ViewHelper'));
     $submit->setDecorators(array('ViewHelper'));
     $register->setDecorators(array('ViewHelper'));
     $this->setDecorators(array('FormElements', 'Form'));
 }
开发者ID:bogdanmatra,项目名称:ibm-hackathon,代码行数:35,代码来源:Login.php

示例2: init

 public function init()
 {
     $obj = new Application_Model_DbTable_User();
     $primaryKey = $obj->getPrimaryKey();
     $this->setMethod('post');
     $this->setEnctype('multipart/form-data');
     $this->setAttrib('codempr', $primaryKey);
     $this->setAction('/admin/index/update-pass');
     $e = new Zend_Form_Element_Password('password');
     $e->setRequired(true);
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Contraseña actual');
     $this->addElement($e);
     $e = new Zend_Form_Element_Password('confirmone');
     $e->setRequired(true);
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Nueva Contraseña');
     $this->addElement($e);
     $e = new Zend_Form_Element_Password('confirmtwo');
     $e->setRequired(true);
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Repetir Nueva Contraseña');
     $this->addElement($e);
     $e = new Zend_Form_Element_Submit('Cambiar');
     $this->addElement($e);
     foreach ($this->getElements() as $element) {
         $element->removeDecorator('Label');
         $element->removeDecorator('DtDdWrapper');
         $element->removeDecorator('HtmlTag');
     }
 }
开发者ID:josmel,项目名称:adminwap,代码行数:31,代码来源:ChangePassword.php

示例3: getFormLogin

 private function getFormLogin()
 {
     $form = new Zend_Form(array('disableLoadDefaultDecorators' => true));
     $email = new Zend_Form_Element_Text('login', array('disableLoadDefaultDecorators' => true));
     $email->addDecorator('ViewHelper');
     $email->addDecorator('Errors');
     $email->setRequired(true);
     $email->setAttrib('class', 'form-control');
     $email->setAttrib('placeholder', 'Login');
     $email->setAttrib('required', 'required');
     $email->setAttrib('autofocus', 'autofocus');
     $password = new Zend_Form_Element_Password('password', array('disableLoadDefaultDecorators' => true));
     $password->addDecorator('ViewHelper');
     $password->addDecorator('Errors');
     $password->setRequired(true);
     $password->setAttrib('class', 'form-control');
     $password->setAttrib('placeholder', 'Hasło');
     $password->setAttrib('required', 'required');
     $password->setAttrib('autofocus', 'autofocus');
     $submit = new Zend_Form_Element_Submit('submit', array('disableLoadDefaultDecorators' => true));
     $submit->setAttrib('class', 'btn btn-lg btn-primary btn-block');
     $submit->setOptions(array('label' => 'Zaloguj'));
     $submit->addDecorator('ViewHelper')->addDecorator('Errors');
     $form->addElement($email)->addElement($password)->addElement($submit);
     return $form;
 }
开发者ID:dafik,项目名称:zf-scaffold,代码行数:26,代码来源:ControllerAuthLogin.php

示例4: init

 public function init()
 {
     $obj = new Application_Model_DbTable_User();
     $primaryKey = $obj->getPrimaryKey();
     $this->setMethod('post');
     $this->setEnctype('multipart/form-data');
     $this->setAttrib('iduser', $primaryKey);
     $this->setAction('/admin/usuarios/edit');
     $e = new Zend_Form_Element_Hidden($primaryKey);
     $this->addElement($e);
     $objType = new Admin_Model_Role();
     $e = new Zend_Form_Element_Select('idrol');
     $e->setMultiOptions($objType->getRoleAll());
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('email');
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Correo');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('login');
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'usuario');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('name');
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'nombre');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('apepat');
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Apellido Paterno');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('apemat');
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Apellido Materno');
     $this->addElement($e);
     $e = new Zend_Form_Element_Submit('Guardar');
     $this->addElement($e);
     $e = new Zend_Form_Element_Checkbox('state');
     $e->setValue(true);
     $this->addElement($e);
     $e = new Zend_Form_Element_Password('confirmone');
     $e->setRequired(false);
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Contraseña');
     $this->addElement($e);
     $e = new Zend_Form_Element_Password('confirmtwo');
     $e->setRequired(false);
     $e->setAttrib('class', 'inpt-medium');
     $e->setAttrib('placeholder', 'Repetir Contraseña');
     $this->addElement($e);
     foreach ($this->getElements() as $element) {
         $element->removeDecorator('Label');
         $element->removeDecorator('DtDdWrapper');
         $element->removeDecorator('HtmlTag');
     }
 }
开发者ID:josmel,项目名称:movistar,代码行数:55,代码来源:UserAdmin.php

示例5: init

 public function init()
 {
     /* Form Elements & Other Definitions Here ... */
     $this->setMethod("POST");
     $uid = new Zend_Form_Element_Hidden("user_id");
     //add firstname
     $f_name = new Zend_Form_Element_Text("f_name");
     $f_name->setRequired();
     $f_name->setLabel("first Name:");
     $f_name->setAttrib("placeholder", "Enter Your first Name");
     $f_name->addValidator(new Zend_Validate_Alnum("true"));
     $f_name->setAttrib("class", "form-control");
     $f_name->getDecorator("Label")->setOption("class", "control-label");
     $f_name->getDecorator("Errors")->setOption("class", "alert alert-danger");
     $f_name->getDecorator("Errors")->setOption("style", " list-style-type:none");
     //add lastname
     $l_name = new Zend_Form_Element_Text("l_name");
     $l_name->setRequired();
     $l_name->setLabel("Last Name");
     $l_name->setAttrib("placeholder", "Enter Your last Name");
     $l_name->addValidator(new Zend_Validate_Alnum("true"));
     $l_name->setAttrib("class", "form-control");
     $l_name->getDecorator("Label")->setOption("class", "control-label");
     $l_name->getDecorator("Errors")->setOption("class", "alert alert-danger");
     $l_name->getDecorator("Errors")->setOption("style", " list-style-type:none");
     //add mail
     $username = new Zend_Form_Element_Text("username");
     $username->setRequired();
     $username->setLabel("E-Mail");
     $username->setAttrib("placeholder", "Enter Your E-Mail");
     $username->addValidator(new Zend_Validate_EmailAddress());
     $username->getDecorator("Label")->setOption("class", "control-label");
     $username->getDecorator("Errors")->setOption("class", "alert alert-danger");
     $username->getDecorator("Errors")->setOption("style", " list-style-type:none");
     $password = new Zend_Form_Element_Password("password");
     $password->setRequired();
     $password->setLabel("Password");
     $password->setAttrib("placeholder", "Enter Your Password");
     $password->setAttrib("class", "form-control");
     $password->getDecorator("Label")->setOption("class", "control-label");
     $password->getDecorator("Errors")->setOption("class", "alert alert-danger");
     $password->getDecorator("Errors")->setOption("style", " list-style-type:none");
     $re_password = new Zend_Form_Element_Password("re_password");
     $re_password->setRequired();
     $re_password->setLabel("Retype Your Password");
     $re_password->addValidator('identical', false, array('token' => 'password'));
     $re_password->setAttrib("placeholder", "Re-enter Your Password");
     $re_password->setAttrib("class", "form-control");
     $re_password->getDecorator("Label")->setOption("class", "control-label");
     $re_password->getDecorator("Errors")->setOption("class", "alert alert-danger");
     $re_password->getDecorator("Errors")->setOption("style", " list-style-type:none");
     $submit = new Zend_Form_Element_Submit("submit");
     $submit->setAttrib("class", "btn btn-xl center-block");
     $this->addElements(array($uid, $f_name, $l_name, $username, $password, $re_password, $submit));
 }
开发者ID:abeinoo,项目名称:Zend,代码行数:55,代码来源:Registeration.php

示例6: _repetirNovaSenha

 private function _repetirNovaSenha()
 {
     $e = new Zend_Form_Element_Password('repetir_nova_senha');
     $e->setRequired(true);
     $e->addFilter('StripTags');
     $e->addFilter('StringTrim');
     $e->setAttrib('data-parsley-required', 'true');
     $e->setAttrib('data-parsley-equalto', '#nova_senha');
     $e->addValidator('stringLength', false, array(6, 15));
     $e->setAttrib('placeholder', _('Repeat New Password'));
     $e->setAttrib('class', 'form-control input-lg');
     return $e;
 }
开发者ID:jovanepires,项目名称:sige,代码行数:13,代码来源:DefinirSenha.php

示例7: setForm

		function setForm()
		{
			$form=new Zend_Form;
			 
			$form->setMethod('post')->setAction('');
			
			$user_login = new Zend_Form_Element_Text('user_login');
			$user_login->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Tên đăng nhập không được để trống'));
			
			$user_pass = new Zend_Form_Element_Password('user_pass');
			$user_pass->setAttrib('renderPassword', true);
			$user_pass->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Mật khẩu không được để trống'));
			
			$user_fullname = new Zend_Form_Element_Text('user_fullname');
			$user_fullname->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Tên người dùng không được để trống'));
			
			$user_email = new Zend_Form_Element_Text('user_email');
			$user_email->addValidator('EmailAddress',true,array('messages'=>'Địa chỉ email không hợp lệ'));
			$user_email->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Email không được để trống'));
			
			$user_address = new Zend_Form_Element_Text('user_address');
			$user_address->setRequired(true)->addValidator('NotEmpty',true,array('messages'=>'Địa chỉ không được để trống'));
			
			$user_login->removeDecorator('HtmlTag')->removeDecorator('Label');	
			$user_pass->removeDecorator('HtmlTag')->removeDecorator('Label');
			$user_fullname->removeDecorator('HtmlTag')->removeDecorator('Label');
			$user_email->removeDecorator('HtmlTag')->removeDecorator('Label');
			$user_address->removeDecorator('HtmlTag')->removeDecorator('Label');	
			
			$form->addElements(array($user_login,$user_pass,$user_fullname,$user_email,$user_address));
			return $form;
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:32,代码来源:EditController.php

示例8: init

 public function init()
 {
     $this->setName('LoginForm')->setMethod('post')->setAction('validate');
     $id = new Zend_Form_Element_Hidden('user_id');
     $id->addFilter('Int');
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Email address')->addValidator('EmailAddress')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     //$this->addElement(array($email_id));
     //->addFilter('stringtoLower');
     $email->setAttrib('class', 'input');
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel('Password')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     //->addValidator('StringLength',false,array(12));
     //->setRequired(true);
     //$this->addElement(array('$password'));
     $password->setAttrib('class', 'input');
     $submit = new Zend_Form_Element_Submit('Login');
     $submit->setLabel('Login here');
     $submit->setAttrib('id', 'submitbutton');
     //id=submitbutton
     /*$register = new Zend_Form_Element_Submit('Register');
     		$register->setLabel('Register here')
     		         ->setIgnore(true);
     		$register->setAttrib('id', 'submitbutton');*/
     $this->addElements(array($id, $email, $password, $submit));
 }
开发者ID:pshreez,项目名称:PHP,代码行数:26,代码来源:Users.php

示例9: __construct

 public function __construct($option = null)
 {
     parent::__construct($option);
     $this->setName('register');
     $this->setAttrib('class', 'input-group');
     $username = new Zend_Form_Element_Text('username');
     $username->setRequired(true)->setAttrib('class', "form-control")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_StringLength(4, 20))->addValidator('regex', true, array('/^[(a-zA-Z0-9)]+$/'))->setAttrib('placeholder', "Хэрэглэгчийн нэр")->addValidator('Db_NoRecordExists', true, array('table' => 'users', 'field' => 'username'))->setLabel("Дүн.мн хэрэглэгчийн бүртгүүлэх хэсэг");
     $password = new Zend_Form_Element_Password('password');
     $password->setRequired(true)->setAttrib('placeholder', "Нууц үг")->setAttrib('class', "form-control")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_StringLength(8, 20));
     $confirmPassword = new Zend_Form_Element_Password('confirm_password');
     $confirmPassword->setAttrib('class', "form-control");
     $token = Zend_Controller_Front::getInstance()->getRequest()->getPost('password');
     $confirmPassword->setRequired(true)->setAttrib('placeholder', "Нууц үгээ давтана уу?")->setAttrib('class', "form-control")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_Identical(trim($token)));
     $firstname = new Zend_Form_Element_Text('firstname');
     $firstname->setAttrib('placeholder', "Таны нэр")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_NotEmpty())->setAttrib('class', "form-control");
     $lastname = new Zend_Form_Element_Text('lastname');
     $lastname->setAttrib('placeholder', "Таны овог")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_NotEmpty())->setAttrib('class', "form-control");
     $date = new Zend_Form_Element_Text('date');
     $date->setAttrib('placeholder', "Төрсөн он сар өдөр (он-сар-өдөр)")->addFilter(new Zend_Filter_StringTrim())->addValidator(new Zend_Validate_NotEmpty())->setAttrib('class', "form-control");
     $email = new Zend_Form_Element_Text('email');
     $email->addFilters(array('StringTrim', 'StripTags'))->setAttrib('placeholder', "Таны цахим хаяг")->addValidator('EmailAddress', TRUE)->addValidator('Db_NoRecordExists', true, array('table' => 'users', 'field' => 'E-mail'))->addValidator(new Zend_Validate_NotEmpty())->setAttrib('class', "form-control");
     $submit = new Zend_Form_Element_Submit('register');
     $submit->setLabel('Бүртгүүлэх')->setAttrib('class', 'btn');
     $this->addElement($username);
     $this->addElement($password);
     $this->addElement($confirmPassword);
     $this->addElement($firstname);
     $this->addElement($lastname);
     $this->addElement($date);
     $this->addElement($email);
     $this->addElement($submit);
     $this->setMethod('post');
 }
开发者ID:MonCoder189,项目名称:Work,代码行数:33,代码来源:Register.php

示例10: init

 /**
  *
  * Change password form
  *
  */
 public function init()
 {
     $cname = explode('_', get_class());
     $this->preInit(end($cname));
     // use template file
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'forms/ChangePassword.phtml'))));
     $Profiles = new Application_Model_Profiles();
     // fields
     $password_old = new Zend_Form_Element_Password('passwordold');
     $password_old->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('autocomplete', 'off')->setRequired(true)->setErrorMessages(array($this->translator->translate('Password is required')))->setLabel($this->translator->translate('Old Password:'))->setAttrib('class', 'form-control');
     // check if blank password (facebook-registered user) and remove old password field if so
     if (Zend_Auth::getInstance()->hasIdentity()) {
         $profile = $Profiles->getProfile(Zend_Auth::getInstance()->getIdentity()->name);
         if ($profile->password == '') {
             $password_old->setAttrib('class', 'hidden');
             $password_old->setRequired(false);
             $password_old->setLabel('');
         }
     }
     $password1 = new Zend_Form_Element_Password('password1');
     $password1->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('autocomplete', 'off')->setRequired(true)->addValidator('StringLength', false, array(5))->setErrorMessages(array($this->translator->translate('Min 5 characters')))->setLabel($this->translator->translate('New Password:'))->setAttrib('class', 'form-control');
     $password2 = new Zend_Form_Element_Password('password2');
     $password2->setDecorators(array('ViewHelper', 'Errors'))->setAttrib('autocomplete', 'off')->setRequired(true)->addValidator('Identical', false, array('token' => 'password1'))->setErrorMessages(array($this->translator->translate('The passwords do not match')))->setLabel($this->translator->translate('Confirm Password:'))->setAttrib('class', 'form-control');
     $submit = new Zend_Form_Element_Submit('changepass');
     $submit->setDecorators(array('ViewHelper'))->setLabel($this->translator->translate('Change Password'))->setAttrib('class', 'submit btn btn-default');
     $this->addElements(array($password_old, $password1, $password2, $submit));
     $this->postInit();
 }
开发者ID:georgepaul,项目名称:songslikesocial,代码行数:33,代码来源:ChangePassword.php

示例11: init

 /**
  * Creates the form to log in.
  * @see Zend_Form::init()
  */
 public function init()
 {
     $this->setMethod('post');
     $this->setAction("/auth/login/");
     $usernameElement = new Zend_Form_Element_Text('username');
     $usernameElement->setLabel("Benutzername");
     $usernameElement->addValidator('regex', false, array('/^[a-z0-9]/i'));
     $usernameElement->addValidator('stringLength', false, array(2, 64));
     $usernameElement->setAttrib('maxLength', 64);
     $usernameElement->setRequired(true);
     $passwordElement = new Zend_Form_Element_Password('password');
     $passwordElement->setLabel("Passwort");
     $passwordElement->addValidator('regex', false, array('/^[a-z0-9]/i'));
     $passwordElement->addValidator('stringLength', false, array(8, 32));
     $passwordElement->setAttrib('maxLength', 32);
     $passwordElement->setRequired(true);
     $submitElement = new Zend_Form_Element_Submit('submit');
     $submitElement->setLabel('Anmelden');
     $submitElement->setIgnore(true);
     $submitElement->setAttrib('class', 'submit');
     $submitElement->removeDecorator('DtDdWrapper');
     $this->addElements(array($usernameElement, $passwordElement));
     $this->addDisplayGroup(array('username', 'password'), 'credentialGroup', array('legend' => 'Zugangsdaten'));
     $this->addElements(array($submitElement));
 }
开发者ID:rusli-nasir,项目名称:iHealth,代码行数:29,代码来源:Login.php

示例12: __construct

 public function __construct($option = null)
 {
     parent::__construct($option);
     $this->setName('login');
     $username = new Zend_Form_Element_Text('username');
     $username->setAttrib('class', "form-control")->setAttrib('placeholder', "Хэрэглэгчийн нэр")->setRequired(true)->setLabel("Colden compass - ийн хэрэглэгчийн нэвтрэх хэсэг")->setAttrib('class', "form-control");
     $password = new Zend_Form_Element_Password('password');
     $password->setAttrib('class', "form-control")->setAttrib('placeholder', "Нууц үг")->setRequired(true);
     $login = new Zend_Form_Element_Submit('login');
     $login->setLabel('Нэвтрэх')->setAttrib('class', 'btn')->setAttrib('class', "form-control");
     $this->addElement($username);
     $this->addElement($password);
     /*
     			$this->addElement('captcha', 'captcha', array(
                 'class' => 'form-control',
                 'required'   => true,
                 'placeholder' => 'Дээрхи кодыг оруулна уу',
                 'captcha'    => array(
                     'captcha' => 'Figlet',
                     'wordLen' => 3,
                     'timeout' => 300
                 )
     ));
     */
     $this->addElement($login);
     $this->setMethod('post');
 }
开发者ID:MonCoder189,项目名称:Work,代码行数:27,代码来源:Login.php

示例13: getForm

 function getForm()
 {
     $form = new Cible_Form(array('disabledDefaultActions' => true));
     $base_dir = $this->getFrontController()->getBaseUrl();
     $redirect = str_replace($base_dir, '', $this->_request->getParam('redirect'));
     $form->setAction("{$base_dir}/auth/login")->setMethod('post');
     $form->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'table')), 'Form'));
     $form->setAttrib('class', 'auth-form');
     $username = new Zend_Form_Element_Text('username');
     $username->setLabel(Cible_Translation::getCibleText('form_label_username'));
     $username->setRequired(true);
     $username->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => Cible_Translation::getCibleText('error_field_required'))));
     $username->setAttrib('class', 'loginTextInput');
     $username->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'username')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'openOnly' => true))));
     $form->addElement($username);
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel(Cible_Translation::getCibleText('form_label_password'));
     $password->setRequired(true);
     $password->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => Cible_Translation::getCibleText('error_field_required'))));
     $password->setAttrib('class', 'loginTextInput');
     $password->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'password')), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'closeOnly' => true))));
     $form->addElement($password);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel(Cible_Translation::getCibleText('button_authenticate'))->setAttrib('class', 'loginButton')->setAttrib('onmouseover', 'this.className=\'loginButtonOver\';')->setAttrib('onmouseout', 'this.className=\'loginButton\';')->removeDecorator('label')->setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => '2', 'align' => 'right', 'class' => 'submit')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $form->addElement($submit);
     $redirect_hidden = new Zend_Form_Element_Hidden('redirect');
     $redirect_hidden->setValue($redirect)->setDecorators(array('ViewHelper', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'colspan' => '2')), array(array('row' => 'HtmlTag'), array('tag' => 'tr'))));
     $form->addElement($redirect_hidden);
     return $form;
 }
开发者ID:anunay,项目名称:stentors,代码行数:30,代码来源:AuthController.php

示例14: init

 public function init()
 {
     $element = new Zend_Form_Element_Password('passwordnew');
     $element->setRequired();
     $element->setAttrib('placeholder', $this->_t('******'));
     $element->setLabel($this->_t('New Password'));
     $this->addElement($element);
     $this->addConfirmPassword();
     $this->addSubmit($this->_t('Update Password'));
     $this->setMethod('post');
 }
开发者ID:dmelo,项目名称:zend-module-login,代码行数:11,代码来源:ResetPassword.php

示例15: init

 public function init()
 {
     $this->setName('Login');
     $login = new Zend_Form_Element_Text('login');
     $login->setAttrib('placeholder', 'login')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     $senha = new Zend_Form_Element_Password('senha');
     $senha->setAttrib('placeholder', 'senha')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
     $submit = new Zend_Form_Element_Submit('Entrar');
     $submit->setAttrib('class', 'btn btn-primary');
     $this->addElements(array($login, $senha, $submit));
 }
开发者ID:raphaeldealmeida,项目名称:Demagogos,代码行数:11,代码来源:Login.php


注:本文中的Zend_Form_Element_Password::setAttrib方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。