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(null); $this->setName("report-persons-by-project"); $this->setMethod('post'); //$this->addAttribs(array('load-in' => 'content-container')); $this->addProjects(); $el = $formutil->addElementProjectStatus($this, array('label' => $this->getTranslator()->_('Filter by') . ' status', 'first-options' => array(array('value' => null, 'label' => 'Any status')))); $el = $formutil->addElementDate($this, array('name' => 'date_from', 'label' => 'À partir da data', 'default' => false, 'addDescriptionFormat' => false)); $el = $formutil->addElementDate($this, array('name' => 'date_to', 'label' => 'Até a data', 'default' => false, 'addDescriptionFormat' => false)); $this->addElement('checkbox', 'summarized', array('label' => 'Resumido', 'description' => 'Check this field to print this report in a summarized format')); //$formutil->addElementButtonPrint($this, array('type'=>'link')); $this->addDisplayGroup(array('id', 'project_id', 'status', 'date_from', 'date_to', 'summarized'), 'project', array()); }
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("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() { $this->setName("eventoatividade_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()); } $formutil->addElementDate($this, array('name' => 'event_date', 'modelfield' => 'event_date', 'label' => 'Data do evento de atendimento', 'description' => 'Data em que o evento de atendimento em grupo está sendo/foi realizado. DD/MM/AAAA', 'required' => true, 'default' => 'today')); $this->_addProjectId(); $this->_addTaskId(); $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('event_date', 'project_id', 'task_type_id'), 'evento_assistencia_form', 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'))); }