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("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'))); }
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->setName("atividade_assistencia"); $this->setMethod('post'); $this->_addClassNames('well'); $this->addAttribs(array('load-in' => 'content-container')); $formutil = new Agana_Form_Util($this->_action, $this->_model); if ($this->_action == self::ACTION_EDIT) { $this->addElement($this->_getIdElement()); } $this->_addIdByFingerkey(); $this->_addPersonPerformedId(); $this->_addPersonRecordedId(); $this->_addPersonHelpedId(); $formutil->addElementDate($this, array('name' => 'assistance_date', 'modelfield' => 'assistance_date', 'label' => 'Data do atendimento', 'description' => 'Data em que foi realizado o atendimento. DD/MM/AAAA', 'required' => true, 'default' => 'today')); $formutil->addElementTime($this, array('name' => 'assistance_time', 'modelfield' => 'assistance_time', 'label' => 'Hora do atendimento', 'description' => 'Hora em que foi realizado o atendimento. HH:MM', 'required' => true, 'default' => 'today')); $this->_addProjectId(); $this->_addTaskId(); $formutil->addElementDescription($this); $this->addElement('submit', 'save', array('buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY, 'label' => 'Save', 'icon' => 'icon-ok-circle')); $this->addElement('submit', 'cancel', array('label' => 'Cancel', 'value' => 'cancel')); $this->addDisplayGroup(array('id_by_finger_key', 'person_performed_id', 'person_helped_id', 'person_recorded_id', 'assistance_date', 'assistance_time', 'project_id', 'task_type_id', 'description'), 'atividade_assistencia_form', array()); $this->addDisplayGroup(array('save', 'cancel'), 'actions-end', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions'))); }