示例#1
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', '');
     $this->setAttribute('method', 'post');
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     //        $username = new Element\Text('username');
     //        $username->setLabel('User Name')
     //                ->setAttribute('class', 'required inputfullwidth')
     //                ->setAttribute('maxlength', '100')
     //                ->setAttribute('placeholder', 'Username');
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('class', 'required email inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Email');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('class', 'required passValid inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Confirm Password')->setAttribute('class', 'required inputfullwidth')->setAttribute('id', 'inputPassword')->setAttribute('maxlength', '100')->setAttribute('min', '6')->setAttribute('placeholder', 'Confirm Password');
     $first_name = new Element\Text('first_name');
     $first_name->setLabel('First Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'First Name');
     $last_name = new Element\Text('last_name');
     $last_name->setLabel('Last Name')->setAttribute('class', 'required inputfullwidth')->setAttribute('maxlength', '100')->setAttribute('placeholder', 'Last Name');
     $submit = new Element\Submit('submit');
     $submit->setValue('Join Now')->setAttribute('class', 'btn btn-large btn-success btn-hossbrag join-now-home fullwidth');
     $this->add($id);
     $this->add($first_name);
     $this->add($last_name);
     // $this->add($username);
     $this->add($email);
     $this->add($password);
     $this->add($repassword);
     $this->add($submit);
 }
示例#2
0
 /**
  * Add pass element
  */
 public function addPassElement($name = 'pass')
 {
     $element = new Password($name);
     $element->setLabel('Passwort');
     $element->setAttribute('class', 'datepicker form-control');
     $this->add($element);
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttributes(array('class' => 'form'));
     // Current Password
     $current = new Element\Password('current_password');
     $current->setLabel('Current Password');
     $current->setAttributes(array('class' => 'form-control input-sm', 'id' => 'current-password-field'));
     $this->add($current);
     // New Password
     $new = new Element\Password('new_password');
     $new->setLabel('New Password');
     $new->setAttributes(array('class' => 'form-control input-sm', 'id' => 'new-password-field'));
     $this->add($new);
     // Confirm Password
     $confirm = new Element\Password('confirm_password');
     $confirm->setLabel('Confirm Password');
     $confirm->setAttributes(array('class' => 'form-control input-sm', 'id' => 'confirm-password-field'));
     $this->add($confirm);
     // Submit button.
     $submit = new Element\Submit('submit');
     $submit->setValue('O.K.');
     $submit->setAttributes(array('id' => 'submit', 'class' => 'btn btn-sm btn-primary'));
     $this->add($submit);
 }
 public function getForm($hasCaptcha, $url = '', $captchaPath = '')
 {
     if (!$this->form) {
         $form = new Form();
         $txtUser = new Element\Text('username');
         $txtUser->setLabel('User Name')->setAttribute('class', 'form-control')->setAttribute('placeholder', 'User name');
         $password = new Element\Password('password');
         $password->setLabel('Password')->setAttribute('class', 'form-control')->setAttribute('placeholder', 'Password');
         $remember = new Element\Checkbox('remember');
         $remember->setLabel('Save authentication?')->setAttribute('class', 'form-control');
         if ($hasCaptcha) {
             $captchaImage = new Image();
             $captchaImage->setFont('./data/font/CAMBRIA.TTC')->setWidth(200)->setHeight(60)->setDotNoiseLevel(40)->setLineNoiseLevel(4)->setExpiration(90);
             $captchaImage->setImgUrl($url);
             $captchaImage->setImgDir($captchaPath);
             $captcha = new Element\Captcha('isHuman');
             $captcha->setCaptcha($captchaImage)->setAttributes(array('class' => 'form-control'));
             $form->add($captcha);
         }
         $form->setAttribute('class', 'form-horizontal');
         $form->add($txtUser);
         $form->add($password);
         $form->add($remember);
         $this->form = $form;
     }
     return $this->form;
 }
示例#5
0
 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);
 }
示例#6
0
 /**
  * @param null|string $name
  */
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('signin');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $this->setOptions(['layout' => 'fluid']);
     $filter = $this->getInputFilter();
     //$groupBasic = new DisplayGroup('groupBasic');
     //$this->add($groupBasic);
     $csrf = new Csrf('csrf');
     $this->add($csrf);
     $filter->add(array('name' => 'csrf', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $mail = new Text('mail');
     $mail->setLabel('Email:');
     $mail->setAttributes(array('type' => 'text', 'id' => 'mail'));
     $this->add($mail);
     //$groupBasic->addElement($username);
     $filter->add(array('name' => 'mail', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập email đăng nhập'))), array('name' => 'EmailAddress', 'break_chain_on_failure' => true, 'options' => array('messages' => array('emailAddressInvalidFormat' => 'Địa chỉ email không hợp lệ'))))));
     $password = new Password('password');
     $password->setAttributes(array('type' => 'password', 'id' => 'password'));
     $password->setLabel('Mật khẩu:');
     $this->add($password);
     //$groupBasic->addElement($password);
     $filter->add(array('name' => 'password', 'required' => true, 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập mật khẩu'))))));
     $config = $this->getServiceLocator()->get('Config');
     $this->captcha = new ReCaptcha(array('pubkey' => $config['captcha']['reCAPTCHA']['publicKey'], 'privkey' => $config['captcha']['reCAPTCHA']['privateKey'], 'ssl' => !isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ? false : true));
     $captcha = new Captcha('captcha');
     $captcha->setLabel('Mã bảo mật:');
     $captcha->setCaptcha($this->captcha);
     $this->add($captcha);
     //$groupBasic->addElement($captcha);
     $filter->add(array('name' => 'captcha', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập captcha'))), $this->captcha)));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Đăng nhập', 'id' => 'btnSignin', 'class' => 'btn btn-primary col-md-12')));
     //$groupBasic->addElement($this->get('submit'));
 }
示例#7
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttribute('method', 'post')->setAttribute('action', '/user/register')->setAttribute('id', 'user-register-form');
     $email = new Email();
     $email->setName('email')->setLabel('Email Address');
     $userName = new Text();
     $userName->setName('userName')->setLabel('Username');
     $password = new Password();
     $password->setName('password')->setLabel('Password');
     $firstName = new Text();
     $firstName->setName('firstName')->setLabel('First Name');
     $lastName = new Text();
     $lastName->setName('lastName')->setLabel('Last Name');
     $csrf = new Csrf();
     $csrf->setName('prev');
     $submit = new Submit();
     $submit->setName('submit')->setValue('Register');
     $this->add($email)->add($userName)->add($password)->add($firstName)->add($lastName)->add($csrf)->add($submit);
     foreach ($this->elements as $element) {
         if (!$element instanceof Submit) {
             $element->setAttribute('class', 'form-control');
         }
     }
 }
 public function __construct($useOldPassword = true)
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('class', 'panel-body');
     if ($useOldPassword) {
         $oldPassword = new Password('oldPassword');
         $oldPassword->setLabel('old.password');
         $oldPassword->setAttribute('class', 'form-control');
         $this->add($oldPassword);
     }
     $password = new Password('password');
     $password->setLabel('password');
     $password->setAttribute('class', 'form-control');
     $this->add($password);
     $password2 = new Password('password2');
     $password2->setLabel('repeat.password');
     $password2->setAttribute('class', 'form-control');
     $this->add($password2);
     $captcha = new Captcha('register_captcha');
     $imageAdapter = new Image(['font' => __DIR__ . '/../../fonts/arial.ttf']);
     $imageAdapter->setHeight(100);
     $imageAdapter->setWidth(400);
     $imageAdapter->setFontSize(48);
     $imageAdapter->setDotNoiseLevel(400);
     $imageAdapter->setLineNoiseLevel(40);
     $captcha->setCaptcha($imageAdapter);
     $captcha->setLabel('enter.text.from.the.picture');
     $captcha->setAttribute('class', 'form-control');
     $this->add($captcha);
     $submit = new Submit('save');
     $submit->setValue('save');
     $submit->setAttribute('class', 'btn btn-primary');
     $this->add($submit);
 }
示例#9
0
 public function __construct(AuthenticationService $authService)
 {
     parent::__construct('login');
     $this->filter = new InputFilter();
     $email = new Element\Email('email');
     $email->setAttribute('required', true);
     $email->setAttribute('placeholder', 'Email Address');
     $this->add($email);
     $emailFilter = new Input('email');
     $emailFilter->setRequired(true);
     $this->filter->add($emailFilter);
     $password = new Element\Password('password');
     $password->setAttribute('required', true);
     $password->setAttribute('placeholder', 'Password');
     $this->add($password);
     $passwordFilter = new Input('password');
     $passwordFilter->setRequired(true);
     $passwordFilter->getValidatorChain()->attach(new AuthValidator\Authentication(array('message' => 'Invalid email address or password', 'service' => $authService, 'adapter' => $authService->getAdapter(), 'identity' => 'email', 'credential' => 'password')));
     $this->filter->add($passwordFilter);
     $buttons = new Form('buttons');
     $buttons->setOption('twb-layout', 'inline');
     $buttons->setAttribute('class', 'form-group');
     $submit = new Element\Submit('submit');
     $submit->setAttribute('class', 'btn-primary pull-right');
     $submit->setOption('glyphicon', 'log-in');
     $submit->setLabel('Log In');
     $buttons->add($submit);
     $forgot = new Element\Submit('forgot');
     $forgot->setAttribute('formnovalidate', true);
     $forgot->setAttribute('class', 'btn-warning pull-right');
     $forgot->setOption('glyphicon', 'question-sign');
     $forgot->setLabel('Forgot Password');
     $buttons->add($forgot);
     $this->add($buttons);
 }
 public function __construct($name = null)
 {
     parent::__construct('register');
     // Creating Fields
     $first_name = new Text('first_name');
     $first_name->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Nome', 'tabindex' => '1'));
     $last_name = new Text('last_name');
     $last_name->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Sobrenome', 'tabindex' => '2'));
     $email = new Text('email');
     $email->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Email', 'tabindex' => '3'));
     $password = new Password('password');
     $password->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Senha', 'tabindex' => '4'));
     $password_confirmation = new Password('password_confirmation');
     $password_confirmation->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Senha', 'tabindex' => '5'));
     $submit = new Element('submit');
     $submit->setAttributes(array('class' => 'btn btn-success btn-block btn-lg', 'type' => 'submit', 'tabindex' => '7'))->setValue('Cadastrar');
     // End Creating Fields
     // Setting Fields
     $this->add($first_name);
     $this->add($last_name);
     $this->add($email);
     $this->add($password);
     $this->add($password_confirmation);
     $this->add($submit, array('priority' => -100));
 }
 public function getForm(array $default_status)
 {
     if (!$this->form) {
         $hidId = new Element\Hidden();
         $hidId->setName('userId');
         $txtName = new Element\Text();
         $txtName->setLabel('User Name')->setName("userName")->setAttribute('class', 'form-control');
         $password = new Element\Password();
         $password->setLabel('Password')->setName('password')->setAttribute('class', 'form-control');
         $confirmPassword = new Element\Password();
         $confirmPassword->setName('confirmPassword')->setLabel('Retype Password')->setAttribute('class', 'form-control');
         $selectRole = new Element\Hidden('userRole');
         $description = new Element\Textarea();
         $description->setName('description')->setLabel('Description')->setAttribute('class', 'form-control');
         $status = new Element\Select();
         $status->setName('status')->setLabel('Status')->setAttribute('class', 'form-control')->setValueOptions($default_status);
         $image = new Element\File();
         $image->setName('image')->setLabel('Profile image');
         $form = new Form();
         $form->setAttribute('class', 'form-horizontal');
         $form->setAttribute('enctype', 'multipart/form-data');
         $form->add($hidId);
         $form->add($txtName);
         $form->add($password);
         $form->add($confirmPassword);
         $form->add($selectRole);
         $form->add($description);
         $form->add($status);
         $form->add($image);
         $this->form = $form;
     }
     return $this->form;
 }
示例#12
0
 public function __construct($name = null)
 {
     parent::__construct('datbaseform');
     $this->setAttribute('class', 'p-t-15');
     $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal'));
     $servidorBd = new Element('servidorBd');
     $servidorBd->setLabel('Servidor de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $servidorBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. localhost', 'id' => 'servidorBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres"));
     $nombreBd = new Element('nombreBd');
     $nombreBd->setLabel('Nombre de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required'));
     $nombreBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. tributum-produccion', 'id' => 'nombreBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $prefijoTablasBd = new Element('prefijoTablasBd');
     $prefijoTablasBd->setLabel('Prefijo de tablas de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $prefijoTablasBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. trb-', 'id' => 'prefijoTablasBd', 'class' => 'form-control'));
     $nombreUsuarioBd = new Element('nombreUsuarioBd');
     $nombreUsuarioBd->setLabel('Nombre de usuario de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $nombreUsuarioBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. root', 'id' => 'nombreUsuarioBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $contrasenaDb = new Element\Password('contrasenaDb');
     $contrasenaDb->setLabel('Contraseña de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $contrasenaDb->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'contrasenaDb', 'class' => 'form-control'));
     $buttonContinuar = new Element\Button('buttonContinuar');
     $buttonContinuar->setLabel('Continuar');
     $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar'));
     $buttonLimpiar = new Element\Button('buttonLimpiar');
     $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true));
     $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset'));
     $this->add($servidorBd);
     $this->add($nombreBd);
     $this->add($prefijoTablasBd);
     $this->add($nombreUsuarioBd);
     $this->add($contrasenaDb);
     $this->add($buttonContinuar);
     $this->add($buttonLimpiar);
 }
示例#13
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-small');
     $this->setAttribute('method', 'post');
     $this->setAttribute('novalidate', true);
     $csrf = new Element\Csrf('csrf');
     $csrf_options = array('csrf_options' => array('timeout' => 1000));
     $csrf->setAttribute('id', 'csrf');
     $csrf->setOptions($csrf_options);
     $email = new Element\Email('email');
     $email->setLabel('Email')->setAttribute('id', 'email')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Email address');
     $password = new Element\Password('password');
     $password->setLabel('Password')->setAttribute('id', 'password')->setAttribute('class', 'form-control')->setAttribute('maxlength', '200')->setAttribute('required', true)->setAttribute('placeholder', 'Password');
     //        $rememberme = new Element\Checkbox('rememberme');
     //        $rememberme->setLabel(' Remember me')
     //                ->setAttribute('id', 'rememberme')
     //                ->setAttribute('class', '')
     //                ->setValue('1');
     $submit = new Element\Submit('submit');
     $submit->setValue('Log in')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-primary btn-block');
     $this->add($csrf);
     $this->add($email);
     $this->add($password);
     //        $this->add($rememberme);
     $this->add($submit);
 }
示例#14
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttribute('method', 'post');
     $this->setAttribute('action', '/user/login');
     $this->setAttribute('class', 'form');
     $this->setAttribute('id', 'userLoginForm');
     $this->setAttribute('role', 'form');
     $email = new Email();
     $email->setName('email')->setLabel('Email Address')->setAttribute('required', 'true');
     $password = new Password();
     $password->setName('password')->setLabel('Password')->setAttribute('required', 'true');
     $csrf = new Csrf();
     $csrf->setName('prev');
     $checkbox = new Checkbox();
     $checkbox->setName('remember-me');
     $checkbox->setOptions(['use_hidden_element' => false, 'required' => false]);
     $checkbox->setChecked("checked");
     $submit = new Submit();
     $submit->setName('submit')->setValue('Sign In');
     $this->add($email)->add($password)->add($checkbox)->add($csrf)->add($submit);
     foreach ($this->elements as $element) {
         if ($element instanceof Checkbox) {
             $element->setAttributes(['class' => 'custom-checkbox', 'data-toggle' => 'checkbox']);
         } else {
             if ($element instanceof Submit) {
                 $element->setAttributes(['class' => 'btn-inverse btn-large', 'id' => 'loginSubmit']);
             } else {
                 $element->setAttribute('class', 'form-control');
             }
         }
     }
 }
 protected function getConfirmarNovaSenha()
 {
     $element = new Password('confirmar_nova_senha');
     $element->setLabel('Repetir Nova Senha:');
     $element->setAttributes(array('class' => 'form-control', 'placeholder' => 'Repita a nova senha informada no campo anterior.'));
     return $element;
 }
示例#16
0
 public function __construct($name = null)
 {
     parent::__construct('users');
     $this->setAttribute('class', 'form-horizontal');
     $this->setAttribute('method', 'post');
     $this->setAttribute('id', 'changePasswordForm');
     $this->setAttribute('novalidate', true);
     $this->setAttribute('autocomplete', false);
     $id = new Element\Hidden('id');
     $id->setAttribute('class', 'primarykey');
     $id->setAttribute('id', 'id');
     $cpassword = new Element\Password('cpassword');
     $cpassword->setLabel('Current Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'cpassword')->setAttribute('placeholder', 'Current Password');
     $password = new Element\Password('password');
     $password->setLabel('New Password')->setAttribute('class', 'required form-control password_strength_check')->setAttribute('id', 'password')->setAttribute('placeholder', 'New Password');
     $repassword = new Element\Password('repassword');
     $repassword->setLabel('Re-type Password')->setAttribute('class', 'required form-control')->setAttribute('id', 'repassword')->setAttribute('placeholder', 'Re-type Password');
     $submit = new Element\Submit('submit');
     $submit->setValue('Change Password')->setAttribute('id', 'submit')->setAttribute('class', 'btn btn-lg btn-success btn-block');
     $this->add($id);
     $this->add($cpassword);
     $this->add($password);
     $this->add($repassword);
     //        $this->add($submit);
 }
示例#17
0
 public function __construct($name = null)
 {
     parent::__construct('datbaseform');
     $this->setAttribute('class', 'p-t-15');
     $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal'));
     $username = new Element('username');
     $username->setLabel('Nombre de Usuario:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $username->setAttributes(array('type' => 'text', 'placeholder' => 'ej. Admin', 'id' => 'username', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres"));
     $password = new Element\Password('password');
     $password->setLabel('Contraseña:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required'));
     $password->setAttributes(array('placeholder' => 'No uses 1234 ;)', 'id' => 'password', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno"));
     $confirmaPassword = new Element\Password('confirmaPassword');
     $confirmaPassword->setLabel(' ')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $confirmaPassword->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'confirmaPassword', 'class' => 'form-control'));
     $email = new Element\Email('email');
     $email->setLabel('Correo Electrónico:')->setLabelAttributes(array('class' => 'col-sm-3 control-label'));
     $email->setAttributes(array('placeholder' => '*****@*****.**', 'id' => 'email', 'class' => 'form-control'));
     $buttonContinuar = new Element\Button('buttonContinuar');
     $buttonContinuar->setLabel('Instalar');
     $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar'));
     $buttonLimpiar = new Element\Button('buttonLimpiar');
     $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true));
     $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset'));
     $this->add($username);
     $this->add($password);
     $this->add($email);
     $this->add($confirmaPassword);
     $this->add($buttonContinuar);
     $this->add($buttonLimpiar);
 }
示例#18
0
 public function getSenha()
 {
     $element = new Password('senha');
     $element->setLabel('Senha');
     $element->setAttributes(array('id' => 'senha', 'class' => 'form-control', 'placeholder' => 'Digite a sua senha'));
     return $element;
 }
示例#19
0
 public function __construct()
 {
     parent::__construct('UserLogin');
     $username = new TextElement('username');
     $username->setAttribute('placeholder', 'Username');
     $password = new PasswordElement('password');
     $password->setAttribute('placeholder', 'Password');
     $submit = new SubmitElement('submit', array('label' => 'Login'));
     $this->add($username)->add($password)->add($submit);
 }
 public function __construct(ObjectManager $objectManager)
 {
     $this->setObjectManager($objectManager);
     parent::__construct(null);
     $this->setAttributes(array('method' => 'POST', 'accept-charset' => 'UTF-8', 'class' => 'form-horizontal'));
     //input Titulo
     $nome = new Text('nome');
     $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'maxlength' => 80, 'class' => 'form-control'));
     $this->add($nome);
     //input email
     $email = new Text('email');
     $email->setLabel("email")->setAttributes(array('id' => 'email', 'maxlength' => 150, 'class' => 'form-control'));
     $this->add($email);
     //login_id
     $login = new Text('login');
     $login->setLabel('Login')->setAttributes(array('id' => 'login', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array());
     $this->add($login);
     //nivel_id
     $nivel = new ObjectSelect('nivel');
     $nivel->setLabel('Nivel')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Nivel\\Entity\\Nivel', 'property' => 'nome', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('nome' => 'ASC')))))->setAttributes(array('id' => 'nivel', 'class' => 'form-control'));
     $this->add($nivel);
     /*
             $nivel = new ObjectSelect('nivel');
             $nivel->setLabel('Nivel')->setOptions(array(
        'object_manager' => $this->getObjectManager(),
        'target_class' => 'Nivel\Entity\Nivel',
        'property' => 'nome',
        'empty_option' => '--Selecione--',
        'is_method' => true,
        'find_method' => array(
            'name' => 'findBy',
            'params' => array(
                'criteria' => array(),
                'orderBy' => array('nome' => 'ASC'),
            ),
        ),
             ))->setAttributes(array(
        'id' => 'nivel',
        'class' => 'form-control',
             ));
     
             $this->add($nivel);
     */
     $senha = new Password('senha');
     $senha->setLabel('Senha')->setAttributes(array('id' => 'senha', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array());
     $this->add($senha);
     $confsenha = new Password('conf-senha');
     $confsenha->setLabel('Confirmar senha')->setAttributes(array('id' => 'conf-senha', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array());
     $this->add($confsenha);
     //botao submit
     $button = new Button('submit');
     $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-default'));
     $this->add($button);
     $this->setInputFilter(new UsuarioFilter($nivel->getValueOptions()));
 }
示例#21
0
 public function setId()
 {
     $username = new Element\Text('username');
     $username->setLabel('User name');
     $username->setAttribute('id', 'username');
     $this->add($username);
     $password = new Element\Password('Password');
     $password->setLabel('Password');
     $password->setAttribute('id', 'password');
     $this->add($password);
 }
示例#22
0
文件: AuthForm.php 项目: hopealive/ds
 public function __construct($name = null)
 {
     parent::__construct('auth');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $element = new Element\Email('email');
     $element->setAttributes(array('class' => 'form-control', 'placeholder' => 'email'));
     $this->add($element);
     $element = new Element\Password('password');
     $element->setAttributes(array('class' => 'form-control', 'placeholder' => 'password'));
     $this->add($element);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Войти', 'id' => 'submitbutton', 'class' => 'form-control btn btn-primary')));
 }
示例#23
0
 public function init()
 {
     $username = new Element\Text('username');
     $username->setAttribute('class', 'form-control');
     $username->setAttribute('placeholder', 'Username');
     //$username->setAttribute('required', true);
     $this->add($username);
     $password = new Element\Password('password');
     $password->setAttribute('class', 'form-control');
     $password->setAttribute('placeholder', 'Password');
     //$password->setAttribute('required', true);
     $this->add($password);
 }
示例#24
0
 public function prepare()
 {
     if ($this->isPrepared) {
         return $this;
     }
     $email = new Email('email');
     $email->setLabel('Email');
     $password = new Password('password');
     $password->setLabel('Password');
     $submit = new Submit('login');
     $submit->setValue('Login');
     $this->add($email)->add($password)->add($submit);
     return parent::prepare();
 }
示例#25
0
 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);
 }
示例#26
0
 public function __construct($name = null)
 {
     // we want to ignore the name passed
     parent::__construct('loginForm');
     $this->setAttribute('method', 'post');
     //////////// INICIALIZACION ELEMENTOS /////////////////////////
     $password = new Element\Password('PASSWORD');
     $password->setLabel('Password:  '******'size' => '30'));
     $name = new Element\Text('USER_NAME');
     $name->setLabel('Nickname: ');
     $this->add($password);
     $this->add($name);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Login', 'id' => 'submitbutton')));
 }
 public function __construct()
 {
     parent::__construct('form-usuario');
     $nome = new Text('usuario_nome');
     $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'class' => 'form-control input-lg', 'placeholder' => 'Digite o seu nome'));
     $this->add($nome);
     $email = new Text('email');
     $email->setLabel('Email')->setAttributes(array('id' => 'email', 'class' => 'form-control input-lg', 'placeholder' => 'Digite o seu email'));
     $this->add($email);
     $senha = new Password('senha');
     $senha->setLabel('Senha')->setAttributes(array('id' => 'senha', 'class' => 'form-control input-lg', 'placeholder' => 'Digite a sua senha'));
     $this->add($senha);
     $reSenha = new Password('confirme_senha');
     $reSenha->setLabel('Senha')->setAttributes(array('id' => 'confirme_senha', 'class' => 'form-control input-lg', 'placeholder' => 'Confirma a senha digitada', 'autocomplete' => false));
     $this->add($reSenha);
 }
 public function __construct()
 {
     parent::__construct(null);
     $this->setAttributes(array('method' => 'POST', 'accept-charset' => 'UTF-8', 'class' => 'form-horizontal'));
     $this->setInputFilter(new NewPasswordFilter());
     $senha = new Password('senha');
     $senha->setLabel('Senha')->setAttributes(array('id' => 'senha', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array());
     $this->add($senha);
     $confsenha = new Password('conf-senha');
     $confsenha->setLabel('Confirmar senha')->setAttributes(array('id' => 'conf-senha', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array());
     $this->add($confsenha);
     //botao submit
     $button = new Button('submit');
     $button->setLabel('Enviar instrucoes')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-default'));
     $this->add($button);
 }
 public function __construct(ServiceLocatorInterface $sl)
 {
     $translator = $sl->get('translator');
     parent::__construct('login-form');
     $this->setAttribute('class', 'form-horizontal login-form');
     $this->setInputFilter($sl->get("Auth\\Filter\\AuthFilter"));
     $email = new Text('email');
     $email->setLabel($translator->translate('E-mail'))->setLabelAttributes(['class' => 'control-label visible-ie8 visible-ie9'])->setAttributes(['placeholder' => $translator->translate('Username or E-mail'), 'class' => 'form-control input-circle placeholder-no-fix', 'autocomplete' => 'off']);
     $this->add($email);
     $password = new Password('password');
     $password->setLabel($translator->translate('Password'))->setLabelAttributes(['class' => 'control-label visible-ie8 visible-ie9'])->setAttributes(['placeholder' => $translator->translate('Password'), 'class' => 'form-control input-circle placeholder-no-fix', 'autocomplete' => 'off']);
     $this->add($password);
     $submit = new Button('submit');
     $submit->setLabel($translator->translate('Login'))->setAttributes(['type' => 'submit', 'class' => 'btn btn-primary pull-right']);
     $this->add($submit);
 }
示例#30
0
 public function __construct($name = null)
 {
     // we want to ignore the name passed
     parent::__construct('user');
     $this->setAttribute('method', 'post');
     $this->setLabel('Información general');
     //////////// INICIALIZACION ELEMENTOS /////////////////////////
     $password = new Element\Password('PASSWORD');
     $password->setLabel('Password:  '******'size' => '30', 'class' => 'required c_password'));
     $repeat_password = new Element\Password('REPEAT_PASSWORD');
     $repeat_password->setLabel('Repetir password: '******'size' => '30', 'class' => 'required'));
     $selectTipo = new Element\Text('TIPO');
     $selectTipo->setLabel('Tipo de usuario: ');
     $selectTipo->setAttribute('class', 'selectTipo');
     /*$selectTipo->setValueOptions(array(
              'ADMIN' => 'Administrador',
              'DUENO_LOCAL' => 'Dueño Local',
              'SPONSOR_LOCAL' => 'Sponsor Local',
     	 ));*/
     $this->add(array('name' => 'UID', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'NOMBRE', 'attributes' => array('class' => 'required', 'type' => 'text'), 'options' => array('label' => 'Nombre:  ')));
     $this->add(array('name' => 'APELLIDO', 'attributes' => array('class' => 'required', 'type' => 'text'), 'options' => array('label' => 'Apellido:  ')));
     $this->add(array('name' => 'USER_NAME', 'attributes' => array('class' => 'required', 'type' => 'text'), 'options' => array('label' => 'Nickname: ')));
     $this->add(array('name' => 'EMAIL', 'attributes' => array('class' => 'required', 'type' => 'Zend\\Form\\Element\\Email'), 'options' => array('label' => 'Email: ')));
     /*$this->add(array(
           'name' => 'PASSWORD',
           'attributes' => array(
               'type'  => 'text',
           ),
           'options' => array(
               'label' => 'Password',
           ),
       ));*/
     $this->add($password);
     $this->add($repeat_password);
     $this->add($selectTipo);
     /*$this->add(array(
           'name' => 'TIPO',
           'attributes' => array(
               'type'  => 'select',
           ),
           'options' => array(
               'label' => 'Tipo de usuario',
           ),
       ));*/
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Go', 'id' => 'submitbutton', 'class' => 'btn btn-primary')));
 }