コード例 #1
0
ファイル: Users.php プロジェクト: josmel/adminwap
 public function init()
 {
     $obj = new Application_Model_DbTable_User();
     $primaryKey = $obj->getPrimaryKey();
     $this->setMethod('post');
     $this->setEnctype('multipart/form-data');
     $this->setAttrib('idAdmin', $primaryKey);
     $this->setAction('/admin/index/edit');
     $e = new Zend_Form_Element_Hidden($primaryKey);
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('login');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('name');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('apepat');
     $this->addElement($e);
     $e = new Zend_Form_Element_Text('apemat');
     $this->addElement($e);
     $e = new Zend_Form_Element_Submit('Guardar');
     $this->addElement($e);
     foreach ($this->getElements() as $element) {
         $element->removeDecorator('Label');
         $element->removeDecorator('DtDdWrapper');
         $element->removeDecorator('HtmlTag');
     }
 }
コード例 #2
0
ファイル: ChangePassword.php プロジェクト: josmel/adminwap
 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');
     }
 }
コード例 #3
0
ファイル: UserAdmin.php プロジェクト: josmel/movistar
 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');
     }
 }