public function getFields($options = array())
 {
     $noCustomField = array_key_exists('noCustomField', $options) ? $options['noCustomField'] : false;
     $currentCustomField = $this->alias . 'CustomField';
     $currentCustomValue = $this->alias . 'CustomValue';
     parent::getFields();
     $user = $this->SecurityUser->getFields();
     $order = 1;
     $this->setField('openemisid', $user, $order++);
     $this->setField('first_name', $user, $order++);
     $this->setField('middle_name', $user, $order++);
     $this->setField('last_name', $user, $order++);
     $this->setField('date_of_birth', $user, $order++);
     $this->setField('photo_content', $user, $order++);
     $this->setField('country_id', $user, $order++);
     $this->setField('gender', $user, $order++);
     $this->setField('address', $user, $order++);
     $this->setField('postal_code', $user, $order++);
     $this->fields['photo_content']['type'] = 'image';
     $this->fields['photo_content']['visible'] = array('edit' => true);
     $this->fields['security_user_id']['type'] = 'hidden';
     $this->fields['start_year']['type'] = 'hidden';
     $this->fields['gender']['type'] = 'select';
     $this->fields['gender']['options'] = $this->getGenderOptions();
     $this->fields['type']['type'] = 'select';
     $this->fields['type']['options'] = $this->getStaffTypeOptions();
     $this->fields['staff_status_id']['type'] = 'select';
     $this->fields['staff_status_id']['options'] = $this->StaffStatus->getOptions('name', 'order', 'asc', array('visible' => 1));
     $this->fields['staff_category_id']['type'] = 'select';
     $this->fields['staff_category_id']['options'] = $this->StaffCategory->getOptions('name', 'order', 'asc', array('visible' => 1));
     if (!$noCustomField) {
         $this->fields[$currentCustomField] = $this->{$currentCustomField}->getCustomFields();
     }
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields();
     $yearOptions = array(0 => $this->Message->getLabel('general.allYears'));
     $yearOptions = array_merge($yearOptions, $this->SchoolYear->find('list', array('conditions' => array('visible' => 1), 'order' => 'start_year')));
     $gradeOptions = $this->EducationGrade->getProgrammeGradeOptions();
     if (!isset($options['action'])) {
         $options['action'] = '';
     }
     if ($options['action'] == 'add') {
         $this->fields['visible']['type'] = 'hidden';
         $this->fields['visible']['value'] = 1;
         $this->fields['order']['value'] = 0;
         $this->fields['order']['visible'] = array('edit' => true);
         $this->fields['education_grade_id']['visible'] = false;
     } else {
         $this->fields['visible']['type'] = 'select';
         $this->fields['visible']['options'] = $this->getStatusOptions();
         if ($options['action'] == 'edit') {
             $this->fields['education_grade_id']['type'] = 'disabled';
         } else {
             $this->fields['education_grade_id']['type'] = 'select';
         }
         $this->fields['education_grade_id']['options'] = $gradeOptions;
     }
     $this->fields['order']['type'] = 'hidden';
     $this->fields['school_year_id']['labelKey'] = 'SchoolYear';
     $this->fields['school_year_id']['type'] = 'select';
     $this->fields['school_year_id']['options'] = $yearOptions;
     $this->fields['class_id']['type'] = 'hidden';
     $this->fields['class_id']['value'] = 0;
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields();
     $this->fields['order']['visible'] = false;
     $this->fields['visible']['visible'] = false;
     $this->fields['type']['type'] = 'select';
     $this->fields['type']['options'] = $this->getCustomFieldTypes();
     $this->fields['is_mandatory']['type'] = 'select';
     $this->fields['is_mandatory']['options'] = $this->getYesnoOptions();
     $this->fields['is_unique']['type'] = 'select';
     $this->fields['is_unique']['options'] = $this->getYesnoOptions();
     return $this->fields;
 }
 public function getFields($options = array())
 {
     $currentCustomField = $this->alias . 'CustomField';
     $currentCustomValue = $this->alias . 'CustomValue';
     parent::getFields();
     $user = $this->SecurityUser->getFields();
     $order = 1;
     $this->setField('first_name', $user, $order++);
     $this->setField('middle_name', $user, $order++);
     $this->setField('last_name', $user, $order++);
     // $this->setField('identification_no', $user, $order++);
     // $this->fields[$currentCustomField] = $this->$currentCustomField->getCustomFields();
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields();
     // $this->fields['ReportCardTemplateComments'] = array(
     // 	'data-name' => 'ReportCardTemplateComments',
     // 	'type' => 'dataRows',
     // 	'visible' => true
     // );
     // $this->fields['ReportCardTemplateSignatures'] = array(
     // 	'data-name' => 'ReportCardTemplateSignatures',
     // 	'type' => 'dataRows',
     // 	'visible' => true
     // );
     return $this->fields;
 }
 public function getFieldsForGuardian()
 {
     // $currentCustomField = 'GuardianCustomField';
     // $currentCustomValue = 'GuardianCustomValue';
     parent::getFields();
     $order = 1;
     $this->setFieldOrder('openemisid', $order++);
     $this->setFieldOrder('first_name', $order++);
     $this->setFieldOrder('middle_name', $order++);
     $this->setFieldOrder('last_name', $order++);
     $this->setFieldOrder('date_of_birth', $order++);
     $this->setFieldOrder('country_id', $order++);
     $this->setFieldOrder('gender', $order++);
     $this->setFieldOrder('address', $order++);
     $this->setFieldOrder('postal_code', $order++);
     $this->fields['country_id']['type'] = 'select';
     $this->fields['country_id']['options'] = $this->Country->getOptions();
     $this->fields['gender']['type'] = 'select';
     $this->fields['gender']['options'] = $this->getGenderOptions();
     // $this->fields[$currentCustomField] = $this->$currentCustomField->getCustomFields();
     $this->fields['identification_no']['type'] = 'hidden';
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields($options);
     $this->fields['type']['type'] = 'hidden';
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields();
     return $this->fields;
 }
 public function getFields($options = array())
 {
     parent::getFields();
     $yearOptions = $this->SchoolYear->getYearList();
     $this->fields['school_year_id']['labelKey'] = 'SchoolYear';
     $this->fields['school_year_id']['type'] = 'select';
     $this->fields['school_year_id']['options'] = $yearOptions;
     if (array_key_exists('action', $options)) {
         if ($options['action'] == 'edit') {
             $this->fields['school_year_id']['type'] = 'disabled';
         }
     }
     return $this->fields;
 }