Esempio n. 1
0
 public function init()
 {
     $this->setAttrib('id', 'contact-form');
     $this->addElement('text', 'first_name', array('label' => 'Nombre', 'required' => true));
     $this->addElement('text', 'last_name', array('label' => 'Apellidos', 'required' => true));
     $this->addElement('text', 'email', array('label' => 'email'));
     $this->addElement('text', 'phone_home', array('label' => 'Telefono de casa'));
     $this->addElement('text', 'birthdate', array('label' => 'Fecha de Nacimiento', 'required' => true));
     // Add the comment element
     $this->addElement('select', 'title', array('label' => 'Tipo', 'required' => true, 'multiOptions' => array('' => '', 'Administrador' => 'Administrador', 'Paciente' => 'Paciente', 'Medico' => 'Medico')));
     $this->addElement('select', 'gender', array('label' => 'Seleccion el Genero', 'required' => true, 'multiOptions' => array('M' => 'Masculino', 'F' => 'Femenino')));
     $this->addElement('select', 'reports_to_id', array('label' => 'Asignado a'));
     $asignado = new Application_Model_Contacts();
     $this->reports_to_id->addMultiOptions($asignado->getAsKeyValue());
     $this->addElement('submit', 'Guardar', array());
 }
Esempio n. 2
0
 public function init()
 {
     $this->setAttrib('enctype', 'multipart/form-data');
     $this->addElement('text', 'id', array('label' => 'No Analsis', 'required' => true));
     $this->addElement('select', 'applicant_id', array('label' => 'Solicitante'));
     $solicitante = new Application_Model_Contacts();
     $this->applicant_id->addMultiOptions($solicitante->getAsKeyValue());
     $this->addElement('select', 'medic_id', array('label' => 'Medico'));
     $medico = new Application_Model_Contacts();
     $this->medic_id->addMultiOptions($medico->getAsKeyValue());
     $this->addElement('select', 'status', array('label' => 'Status', 'required' => true, 'multiOptions' => array('Pendiente' => 'Pendiente', 'Liberado' => 'Liberado')));
     $this->addElement('textarea', 'note', array('label' => 'Nota:', 'rows' => '5', 'validators' => array(array('validator' => 'StringLength', 'options' => array(0, 100)))));
     $this->addElement('file', 'archivo', array('class' => 'sf'));
     $this->archivo->addValidator('Extension', false, 'pdf');
     $this->archivo->addValidator('Size', false, '10024000');
     $this->archivo->setDestination(APPLICATION_PATH . '/../public/files/')->setValueDisabled(true);
     $this->addElement('text', 'discount', array('label' => 'Descuento', 'required' => false));
     $this->addElement('checkbox', 'name', array('label' => 'Pdf sin encabezado', 'required' => false));
     $this->addElement('submit', 'Guardar', array());
 }