public function __construct($sm) { parent::__construct('resetPassword'); $this->sm = $sm; $altesPasswort = new Password('oldPass'); $altesPasswort->setLabel('LABEL_CHANGE_PASSWORD_OLD_PASS'); $altesPasswort->setLabelAttributes(array('class' => 'col-sm-2 control-label')); $altesPasswort->setAttribute('class', 'form-control'); $altesPasswort->setAttribute('id', 'oldPass'); $this->add($altesPasswort); $neuesPasswort = new Password('newPass'); $neuesPasswort->setLabel('LABEL_CHANGE_PASSWORD_NEW_PASS'); $neuesPasswort->setLabelAttributes(array('class' => 'col-sm-2 control-label')); $neuesPasswort->setAttribute('class', 'form-control'); $neuesPasswort->setAttribute('id', 'newPass'); $this->add($neuesPasswort); $neuesPasswortConfirm = new Password('newPassConfirm'); $neuesPasswortConfirm->setLabel('LABEL_CHANGE_PASSWORD_NEW_CONFIRM'); $neuesPasswortConfirm->setLabelAttributes(array('class' => 'col-sm-2 control-label')); $neuesPasswortConfirm->setAttribute('class', 'form-control'); $neuesPasswortConfirm->setAttribute('id', 'newPassConfirm'); $this->add($neuesPasswortConfirm); $submit = new Submit('resetPasswordSubmit'); $submit->setValue('LABEL_CHANGE_PASSWORD_SUBMIT'); $submit->setAttribute('class', 'btn btn-default'); $this->add($submit); return $this; }
public function addElements() { //-- Profile name -- $login = new Element\Text('profile_name'); $login->setAttribute('placeholder', 'profile_name'); $login->setAttribute('required', 'true'); $login->setAttribute('class', 'form-control'); $login->setAttribute('id', 'profile-name'); $login->setLabel('Profile name'); $login->setLabelAttributes(array('class' => 'control-label', 'for' => 'profile-name')); //-- Password -- $password = new Element\Password('password'); $password->setAttribute('placeholder', '*****'); $password->setAttribute('required', 'true'); $password->setAttribute('class', 'form-control'); $password->setAttribute('id', 'password'); $password->setLabel('Password'); $password->setLabelAttributes(array('class' => 'control-label', 'for' => 'password')); //-- Submit -- $submit = new Element\Submit('submit'); $submit->setAttribute('class', 'btn btn-success'); $submit->setValue('Send'); // Binding elements $this->add($login); $this->add($password); $this->add($submit); }
public function __construct($name = null) { parent::__construct('reginfo'); $id_hidden = new Element\Hidden('id'); $id_hidden->setName('id'); $email_text = new Element\Text('login'); $email_text->setLabel('E-mail'); $email_text->setLabelAttributes(array('class' => 'type_text')); $email_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'disabled' => 'disable')); $type_text = new Element\Text('type'); $type_text->setLabel('Type'); $type_text->setLabelAttributes(array('class' => 'type_text')); $type_text->setAttributes(array('class' => 'type_text_input', 'disabled' => 'disable')); $password_text = new Element\Password('password'); $password_text->setLabel('New password'); $password_text->setLabelAttributes(array('class' => 'type_text')); $password_text->setAttributes(array('id' => 'password', 'class' => 'type_text_input')); $cpassword_text = new Element\Password('cpassword'); $cpassword_text->setLabel('Confirm password'); $cpassword_text->setLabelAttributes(array('class' => 'type_text')); $cpassword_text->setAttributes(array('id' => 'cpassword', 'class' => 'type_text_input')); $this->add($id_hidden); $this->add($email_text); $this->add($type_text); $this->add($password_text); $this->add($cpassword_text); }
public function addElements() { //-- Password current ----------------------------- $password_current = new Element\Password('password_current'); $password_current->setAttribute('placeholder', '*****'); $password_current->setAttribute('required', 'true'); $password_current->setAttribute('class', 'form-control'); $password_current->setAttribute('id', 'password-current'); $password_current->setLabel('Current'); $password_current->setLabelAttributes(array('class' => 'control-label', 'for' => 'password-current')); //-- Password ------------------------------------ $password = new Element\Password('password'); $password->setAttribute('placeholder', '*****'); $password->setAttribute('required', 'true'); $password->setAttribute('class', 'form-control'); $password->setAttribute('id', 'password'); $password->setLabel('New'); $password->setLabelAttributes(array('class' => 'control-label', 'for' => 'password')); //-- Password (confirm) --------------------------- $password_confirm = new Element\Password('confirm_password'); $password_confirm->setAttribute('placeholder', '*****'); $password_confirm->setAttribute('required', 'true'); $password_confirm->setAttribute('class', 'form-control'); $password_confirm->setAttribute('id', 'confirm-password'); $password_confirm->setLabel('Confirm'); $password_confirm->setLabelAttributes(array('class' => 'control-label', 'for' => 'confirm-password')); //-- Submit ------------------------------------- $submit = new Element\Submit('submit'); $submit->setAttribute('class', 'btn btn-success'); $submit->setValue('Send'); // Binding elements $this->add($password_current); $this->add($password); $this->add($password_confirm); $this->add($submit); }