Example #1
0
 public function addElements()
 {
     //-- E-mail current ------------------------------------
     $email_current = new Element\Email('email_current');
     $email_current->setAttribute('readonly', 'true');
     $email_current->setAttribute('class', 'form-control');
     $email_current->setAttribute('id', 'email-old');
     $email_current->setLabel('Current');
     $email_current->setLabelAttributes(array('class' => 'control-label', 'for' => 'email-current'));
     //-- E-mail new ---------------------------------------
     $email = new Element\Email('email');
     $email->setAttribute('placeholder', '*****@*****.**');
     $email->setAttribute('required', 'true');
     $email->setAttribute('class', 'form-control');
     $email->setAttribute('id', 'email');
     $email->setLabel('New');
     $email->setLabelAttributes(array('class' => 'control-label', 'for' => 'email'));
     //-- Submit -------------------------------------
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn btn-success');
     $submit->setValue('Send');
     // Binding elements
     $this->add($email_current);
     $this->add($email);
     $this->add($submit);
 }
 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'));
     //-- E-mail ---------------------------------------
     $email = new Element\Email('email');
     $email->setAttribute('placeholder', '*****@*****.**');
     $email->setAttribute('required', 'true');
     $email->setAttribute('class', 'form-control');
     $email->setAttribute('id', 'email');
     $email->setLabel('E-mail');
     $email->setLabelAttributes(array('class' => 'control-label', 'for' => 'email'));
     //-- 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'));
     //-- 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');
     $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($login);
     $this->add($email);
     $this->add($password);
     $this->add($password_confirm);
     $this->add($submit);
 }