Beispiel #1
0
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("project");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     if ($this->_action == self::ACTION_EDIT) {
         $this->addElement($this->_getIdElement());
     }
     //$this->_addElementName();
     $formutil->addElementName($this, array('maxlength' => 60));
     //$this->addElementStatus();
     $formutil->addElementProjectStatus($this);
     $formutil->addElementDescription($this, array('name' => 'abstract', 'label' => 'Abstract', 'maxlength' => 1200, 'rows' => 10, 'dimension' => 11, 'required' => true, 'modelfield' => 'abstract'));
     $formutil->addElementDate($this, array('name' => 'startdateexpected', 'label' => 'Start date expected', 'modelfield' => 'startdateexpected', 'default' => false));
     $formutil->addElementDate($this, array('name' => 'startdatereal', 'label' => 'Start date real', 'modelfield' => 'startdatereal', 'default' => false));
     $formutil->addElementDate($this, array('name' => 'finishdateexpected', 'label' => 'Finish date expected', 'modelfield' => 'finishdateexpected', 'default' => false));
     $formutil->addElementDate($this, array('name' => 'finishdatereal', 'label' => 'Finish date real', 'modelfield' => 'finishdatereal', 'default' => false));
     $formutil->addElementDescription($this, array('name' => 'fulldescription', 'label' => 'Full description', 'maxlength' => 0, 'dimension' => 11, 'rows' => 25, 'modelfield' => 'fulldescription', 'editor' => true));
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('name', 'status', 'abstract', 'startdateexpected', 'startdatereal', 'finishdateexpected', 'finishdatereal', 'fulldescription'), 'tasktypeform', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("socialproject");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     $this->addFingerNumber();
     $this->addTextHash();
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('person_id', 'finger_number', 'text_hash'), 'fprint', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
Beispiel #3
0
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("person");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     if ($this->_action == self::ACTION_EDIT) {
         $this->addElement($this->_getIdElement());
     }
     //$this->_addElementName();
     $formutil->addElementName($this, array('maxlength' => 120, 'dimension' => 7));
     $formutil->addElementGender($this);
     $formutil->addElementDate($this, array('name' => 'birthdate', 'label' => 'Birthdate', 'modelfield' => 'birthdate'));
     $formutil->addElementMaritalStatus($this, array('dimension' => 3));
     $formutil->addElementPhone($this, array('class' => 'float-left'));
     $formutil->addElementPhone($this, array('name' => 'mobilephone', 'label' => 'Mobile phone', 'modelfield' => 'mobilephone'));
     $formutil->addElementEmail($this);
     $formutil->addElementAddress($this);
     $formutil->addElementAddressNumber($this);
     $formutil->addElementAddressDetails($this);
     $formutil->addElementPostalCode($this);
     $formutil->addElementCityId($this, array('required' => true));
     $formutil->addElementCityRegionId($this, array('showcity' => true));
     $formutil->addElementWebsite($this);
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('name', 'gender', 'birthdate', 'marital_status', 'phone', 'mobilephone', 'email', 'address', 'addressnumber', 'addressdetails', 'postalcode', 'city_id', 'city_region_id', 'website'), 'personform', array('legend' => ''));
     //                $phonesForm = new Twitter_Bootstrap_Form_Inline();
     //        $formutil->addElementPhone($phonesForm);
     //        $formutil->addElementPhone($phonesForm, array(
     //            'name' => 'mobilephone',
     //            'label'=> 'Mobile Phone',
     //            'modelfield' => 'mobilephone'
     //            ));
     //
     //        $phonesForm->addDisplayGroup(array(
     //            'phone', 'mobilephone',
     //                ), 'personformphone',
     //            array(
     //                'legend' => 'Phones',
     //            )
     //        );
     //
     //        $this->addSubForm($phonesForm, 'phonesform');
     //
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("socialproject");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     $this->_addElementPerson();
     $this->addSocialProjects();
     $this->addNumero();
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('id', 'pfs_id', 'numero'), 'socialproject', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("project");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     $this->_addElementPerson();
     $this->addProjects();
     $formutil->addElementDate($this, array('name' => 'date_in', 'label' => 'Date in', 'modelfield' => 'date_in', 'default' => 'today'));
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('id', 'project_id', 'date_in'), 'project', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("jobfunction");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     if ($this->_action == self::ACTION_EDIT) {
         $this->addElement($this->_getIdElement());
     }
     //$this->_addElementName();
     $formutil->addElementName($this, array('maxlength' => 50));
     $formutil->addElementDescription($this);
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('name', 'description'), 'jobfunctionform', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
Beispiel #7
0
 public function init()
 {
     $this->translate = Zend_Registry::get("Zend_Translate");
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("employee");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     //$this->_addElementName();
     $this->_addElementPerson();
     $this->_addElementRegNumber();
     $this->_addElementBusunit();
     $this->_addElementJobfunction();
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('id', 'person_name', 'registration_number', 'busunit_id', 'job_function_id'), 'employeeform', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $this->translate = Zend_Registry::get("Zend_Translate");
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("personhelped");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     //$this->_addElementName();
     $this->_addElementPerson();
     $formutil->addElementDate($this, array('name' => 'first_help_date', 'modelfield' => 'first_help_date', 'label' => 'First help date', 'description' => 'When the first help was made for this person', 'required' => false, 'default' => 'today'));
     $this->_addElementReligion();
     $formutil->addElementStateId($this, array('name' => 'born_state_id', 'modelfield' => 'born_state_id', 'required' => true));
     $formutil->addElementCityId($this, array('name' => 'born_city_id', 'modelfield' => 'born_city_id', 'required' => true));
     $this->_addElementProfessionalOccupation();
     $formutil->addElementDescription($this, array('label' => 'Professional experience', 'name' => 'professional_experience', 'modelfield' => 'professional_experience'));
     $this->addElement('checkbox', 'live_with_family', array('label' => 'Live with family', 'value' => $this->_model ? $this->_model->getLive_with_family() : '', 'description' => 'Check this field if this person live with his/her family'));
     $this->_addElementHomeSituation();
     $this->_addElementRentValue();
     $this->_addElementHomeArea();
     $this->_addElementHomeType();
     $formutil->addElementDate($this, array('name' => 'home_since', 'modelfield' => 'home_since', 'label' => 'Living since', 'description' => 'Since that date lives in this house', 'required' => true, 'default' => 'false'));
     $this->addElement('text', 'home_pieces_number', array('label' => 'Home pieces', 'value' => $this->_model ? $this->_model->getHome_pieces_number() : '', 'type' => 'number', 'required' => true, 'class' => 'mask-input', 'data-mask' => '{"mask": "9", "repeat": 2, "greedy":false}'));
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('id', 'first_help_date', 'religion'), 'personhelpedform', array());
     $this->addDisplayGroup(array('born_state_id', 'born_city_id'), 'personhelpedbornform', array('legend' => 'Birth data'));
     $this->addDisplayGroup(array('professional_occupation_choice', 'professional_occupation', 'professional_experience'), 'personhelpedprofessionalform', array('legend' => 'Professional data'));
     $this->addDisplayGroup(array('live_with_family', 'home_since', 'home_situation_choice', 'home_situation', 'rent_value', 'home_area_choice', 'home_area', 'home_type_choice', 'home_type', 'home_pieces_number'), 'personhelpedhomeform', array('legend' => 'Home data'));
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }
 public function init()
 {
     $this->translate = Zend_Registry::get("Zend_Translate");
     $formutil = new Agana_Form_Util($this->_action, $this->_model);
     $this->setName("persondocs");
     $this->setMethod('post');
     $this->_addClassNames('well');
     $this->addAttribs(array('load-in' => 'content-container'));
     $this->addElement($this->_getIdElement());
     //$this->_addElementName();
     $this->_addElementPerson();
     $this->_addElementIdentityCard();
     $this->_addElementIndividualDocTaxNumber();
     $this->_addElementBirthCertificate();
     $this->_addElementProfessionalCard();
     $this->_addElementDriversLicense();
     $this->_addElementVoterRegistration();
     $this->_addElementMilitaryRegistration();
     $this->_addElementHealthSystemCard();
     $formutil->addElementButtonSave($this);
     $formutil->addElementButtonCancel($this);
     $this->addDisplayGroup(array('id', 'person_name', 'identitycard', 'individualdoctaxnumber', 'birthcertificate', 'professionalcard', 'driverslicense', 'voterregistration', 'militaryregistration', 'healthsystemcard'), 'persondocform', array());
     $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
 }