daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Mar 16th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class Admin_Form_AdminLogin extends Zend_Form
  4. {
  5.  
  6.     public function init()
  7.     {
  8.         $this->setName("login");
  9.              
  10.         $username = new Zend_Form_Element_Text('username');
  11.         $username->setLabel('Username')
  12.               ->setRequired(true)
  13.               ->addFilter('StripTags')
  14.               ->addFilter('StringTrim')
  15.               ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please Enter Username !')))
  16.               ->addValidator('Alnum',true,array('allowWhiteSpace' => true));
  17.  
  18.        $password = new Zend_Form_Element_Password('password');
  19.         $password -> setLabel('Password')
  20.                   -> setRequired(true)
  21.                   -> addFilter('StripTags')
  22.                   -> addFilter('StringTrim')
  23.                   -> addValidator('NotEmpty', true, array('messages' => array('isEmpty' => 'Please Enter Your Password !')));
  24.                  
  25.         //$this->addDecorator(  'HtmlTag', array( 'tag'=>'div','id'=>'name' ) );
  26.  
  27.  
  28.         $submit = new Zend_Form_Element_Submit('submit');
  29.         $submit->setAttrib('id', 'submitbutton');
  30.  
  31.         $this->addElements(array($username, $password,$submit));
  32.     }
  33.  
  34.  
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top