public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('general.timetable')); $this->fields['class_id']['type'] = 'hidden'; $this->fields['class_id']['value'] = $this->Session->read('SClass.id'); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel($this->alias . '.title')); $this->setVar('selectedPage', get_class($this)); $this->setVar('header', $this->Message->getLabel($this->alias . '.title')); }
public function beforeAction() { parent::beforeAction(); $this->setVar('header', $this->Message->getLabel('ClassAssignment.title')); $this->Navigation->addCrumb($this->Message->getLabel('ClassAssignment.title')); $classId = $this->Session->read('SClass.id'); $this->fields['education_grade_id']['visible'] = false; $this->fields['education_grade_id']['labelKey'] = 'AssessmentItemType'; $this->fields['visible']['type'] = 'select'; $this->fields['visible']['options'] = $this->getStatusOptions(); $this->fields['order']['type'] = 'hidden'; $this->fields['order']['value'] = 0; $this->fields['order']['visible'] = array('edit' => true); $this->fields['school_year_id']['type'] = 'hidden'; $this->fields['school_year_id']['value'] = $this->SClass->field('school_year_id', array('id' => $classId)); $this->fields['class_id']['type'] = 'hidden'; $this->fields['class_id']['value'] = $classId; $gradeOptions = $this->EducationGrade->getProgrammeGradeOptions(); if ($this->action == 'add') { $this->fields['education_grade_id']['visible'] = false; $this->fields['visible']['type'] = 'hidden'; $this->fields['visible']['value'] = 1; } else { if ($this->action == 'view') { $this->fields['education_grade_id']['visible'] = array('view' => true); $this->fields['education_grade_id']['type'] = 'select'; $this->fields['education_grade_id']['options'] = $gradeOptions; } else { $this->fields['education_grade_id']['visible'] = array('edit' => true); $this->fields['education_grade_id']['type'] = 'disabled'; $this->fields['education_grade_id']['options'] = $gradeOptions; } } }
public function beforeAction() { parent::beforeAction(); $this->setVar('header', $this->Message->getLabel($this->alias . '.title')); $this->Navigation->addCrumb($this->Message->getLabel($this->alias . '.title')); $this->EducationGrade = $this->AssessmentItem->EducationGradesSubject->EducationGrade; $this->EducationSubject = $this->AssessmentItem->EducationGradesSubject->EducationSubject; }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('admin.rcTemplates'), array('controller' => $this->params['controller'], 'action' => $this->indexPage)); $this->setVar('model', get_class($this)); $this->setVar('portletHeader', $this->Message->getLabel('admin.rcTemplates')); $this->setVar('tabHeader', $this->Message->getLabel('admin.rcTemplates')); $this->setVar('fields', $this->getDisplayFields()); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('StaffAttachment.name')); $this->fields['staff_id']['type'] = 'hidden'; $this->fields['staff_id']['value'] = $this->Session->read('Staff.id'); $this->fields['description']['type'] = 'text'; $this->fields['file_content']['type'] = 'file_upload'; $this->setVar('tabHeader', $this->Message->getLabel('StaffAttachment.name')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('StudentBehaviour.name')); $this->fields['student_id']['type'] = 'hidden'; $this->fields['student_id']['value'] = $this->Session->read('Student.id'); $this->fields['behaviour_category_id']['type'] = 'select'; $this->fields['behaviour_category_id']['options'] = $this->BehaviourCategory->getOptions(); $this->setFieldOrder('behaviour_category_id', 1); $this->setVar('tabHeader', $this->Message->getLabel('StudentBehaviour.name')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('general.attachment')); $className = $this->Session->read('SClass.data.name'); $classId = $this->Session->read('SClass.id'); $this->fields['class_id']['type'] = 'hidden'; $this->fields['class_id']['value'] = $this->Session->read('SClass.id'); $this->fields['description']['type'] = 'text'; $this->fields['file_content']['type'] = 'file_upload'; }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('StaffEmployment.name')); $this->fields['staff_id']['type'] = 'hidden'; $this->fields['staff_id']['value'] = $this->Session->read('Staff.id'); $this->fields['staff_employment_type_id']['type'] = 'select'; $this->fields['staff_employment_type_id']['options'] = $this->StaffEmploymentType->getOptions(); $this->setFieldOrder('staff_employment_type_id', 1); $this->setVar('tabHeader', $this->Message->getLabel('StaffEmployment.name')); }
public function beforeAction() { parent::beforeAction(); $this->setVar('tabHeader', $this->Message->getLabel('guardian.title')); $this->Navigation->addCrumb($this->Message->getLabel('general.guardians')); $this->fields['student_id']['type'] = 'hidden'; $this->fields['student_id']['value'] = $this->Session->read('Student.id'); $this->fields['security_user_id']['type'] = 'hidden'; $this->fields['relationship_category_id']['type'] = 'select'; $this->fields['relationship_category_id']['options'] = $this->RelationshipCategory->getOptions(); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel($this->alias . '.title')); $this->fields['order']['visible'] = false; $this->fields['visible']['labelKey'] = 'general'; $this->fields['visible']['type'] = 'select'; $this->fields['visible']['default'] = 1; $this->fields['visible']['options'] = array(1 => __('Active'), 0 => __('Inactive')); $this->setVar('selectedPage', get_class($this)); $this->setVar('header', $this->Message->getLabel($this->alias . '.title')); }
public function beforeAction() { parent::beforeAction(); $this->setVar('tabHeader', $this->Message->getLabel($this->alias . '.name')); $this->Navigation->addCrumb($this->Message->getLabel($this->alias . '.name')); $this->fields['staff_id']['type'] = 'hidden'; $this->fields['staff_id']['value'] = $this->Session->read('Staff.id'); $this->fields['identity_type_id']['type'] = 'select'; $this->fields['identity_type_id']['options'] = $this->IdentityType->getOptions(); $this->fields['country_id']['type'] = 'select'; $this->fields['country_id']['options'] = $this->Country->getOptions(); }
function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('ClassLesson.title')); /** EVENTUALLY MUST PUT THIS ENTIRE CHUNK IN GETFIELDS() **/ $id = $this->controller->Session->read('SClass.id'); $this->fields['class_id']['type'] = 'hidden'; $this->fields['class_id']['value'] = $this->controller->Session->read('SClass.id'); $this->fields['timetable_entry_id']['type'] = 'hidden'; $this->fields['timetable_entry_id']['value'] = 0; $this->fields['start_date']['model'] = 'ClassLesson'; $this->fields['start_date']['visible'] = true; $this->fields['start_date']['type'] = 'date'; $this->fields['start_time']['type'] = 'time'; $this->fields['end_time']['type'] = 'time'; $ClassGrade = ClassRegistry::init('ClassSubject'); $this->fields['education_grade_subject_id']['type'] = 'select'; $subjectByClass = $ClassGrade->getSubjectByClass($id); $educationGradeSubjectOptions = array(); foreach ($subjectByClass as $key => $value) { $educationGradeSubjectOptions[$value['ClassSubject']['education_grade_subject_id']] = $value['EducationSubject']['code'] . ' - ' . $value['EducationSubject']['name']; } $this->fields['education_grade_subject_id']['options'] = $educationGradeSubjectOptions; $ClassTeacher = ClassRegistry::init('ClassTeacher'); $staffByClass = $ClassTeacher->getTeacherByClass($id); $staffOptions = array(); foreach ($staffByClass as $key => $value) { $staffOptions[$value['Staff']['id']] = $this->Message->getFullName($value); } $this->fields['staff_id']['type'] = 'select'; $this->fields['staff_id']['options'] = $staffOptions; $Room = ClassRegistry::init('Room'); $roomOptions = $Room->getRoomList(); $this->fields['room_id']['type'] = 'select'; $this->fields['room_id']['options'] = $roomOptions; $LessonStatus = ClassRegistry::init('LessonStatus'); $statusOptions = $LessonStatus->getOptions('name', 'order', 'asc', array('visible' => 1)); $this->fields['lesson_status_id']['type'] = 'select'; $this->fields['lesson_status_id']['options'] = $statusOptions; $order = 1; $this->setFieldOrder('start_date', $order++); $this->setFieldOrder('start_time', $order++); $this->setFieldOrder('end_time', $order++); $this->setFieldOrder('education_grade_subject_id', $order++); $this->setFieldOrder('staff_id', $order++); $this->setFieldOrder('room_id', $order++); $this->setFieldOrder('lesson_status_id', $order++); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('general.contacts')); $this->fields['security_user_id']['type'] = 'hidden'; $this->fields['security_user_id']['value'] = $this->Session->read('Student.data.SecurityUser.id'); $this->fields['contact_type_id']['type'] = 'select'; $this->fields['contact_type_id']['options'] = $this->ContactType->getOptions(); $this->fields['main']['type'] = 'select'; $this->fields['main']['options'] = $this->getYesnoOptions(); $this->setFieldOrder('contact_type_id', 1); $this->fields['contact_type_id']['labelKey'] = 'Contact'; $this->fields['name']['labelKey'] = 'Contact'; $this->fields['value']['labelKey'] = 'Contact'; $this->fields['main']['labelKey'] = 'Contact'; $this->setVar('tabHeader', $this->Message->getLabel('Contact.title')); }
public function beforeAction() { parent::beforeAction(); $this->setVar('portletHeader', $this->Message->getLabel('EducationFee.title')); $this->setVar('tabHeader', $this->Message->getLabel('EducationFee.title')); $this->fields['source']['visible'] = false; $this->fields['school_year_id']['type'] = 'hidden'; $this->fields['school_year_id']['value'] = $this->Session->read('EducationFee.school_year_id'); $this->fields['education_grade_id']['type'] = 'hidden'; $this->fields['education_grade_id']['value'] = $this->Session->read('EducationFee.education_grade_id'); $this->fields['fee_type_id']['type'] = 'select'; $this->fields['fee_type_id']['options'] = $this->FeeType->getOptions(); // for breadcrumb of internal methods after listing $actions = array('view', 'add', 'edit'); if (in_array($this->action, $actions)) { $this->Navigation->addCrumb($this->Session->read('EducationFee.crumbName')); } }
public function beforeAction() { parent::beforeAction(); $this->fields['value_type']['visible'] = false; $this->fields['name']['visible'] = false; $this->fields['default_value']['visible'] = false; $this->fields['editable']['visible'] = false; $this->fields['order']['visible'] = false; $this->fields['visible']['visible'] = false; $this->fields['type']['type'] = 'disabled'; $this->fields['label']['type'] = 'disabled'; if ($this->action == 'edit') { $this->fields['description']['visible'] = false; } $this->setVar('portletHeader', $this->Message->getLabel($this->alias . '.title')); $this->setVar('header', $this->Message->getLabel($this->alias . '.title')); $this->Navigation->addCrumb($this->Message->getLabel($this->alias . '.title')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('StudentFee.name')); $this->fields['school_year_id']['type'] = 'hidden'; $this->fields['school_year_id']['value'] = $this->Session->read('StudentFee.school_year_id'); $this->fields['education_grade_id']['type'] = 'hidden'; $this->fields['education_grade_id']['value'] = $this->Session->read('StudentFee.education_grade_id'); $this->fields['student_id']['type'] = 'hidden'; $this->fields['student_id']['value'] = $this->Session->read('Student.id'); $this->fields['created']['labelKey'] = $this->alias; $this->fields['created_user_id']['labelKey'] = $this->alias; $tabHeader = $this->Message->getLabel($this->alias . '.name'); $this->setVar('tabHeader', $tabHeader); // for breadcrumb of internal methods after listing $actions = array('view', 'add', 'edit'); if (in_array($this->action, $actions)) { $this->Navigation->addCrumb($this->Session->read('StudentFee.crumbName')); } }
public function beforeAction() { parent::beforeAction(); $this->setVar('contentHeader', $this->Message->getLabel('Student.title')); $this->setVar('tabHeader', $this->Message->getLabel('StudentAttendanceDay.title')); $this->Navigation->addCrumb($this->Message->getLabel('Attendance.title')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('ClassSubject.title')); $this->setVar('header', $this->Message->getLabel('ClassSubject.title')); }
public function beforeAction() { parent::beforeAction(); $this->setVar('header', $this->Message->getLabel('Attendance.title')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('GuardianStudent.name')); $this->setVar('tabHeader', $this->Message->getLabel('Student.title')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('general.reportCard')); }
public function beforeAction() { parent::beforeAction(); $this->Navigation->addCrumb($this->Message->getLabel('general.results')); $this->setVar('tabHeader', $this->Message->getLabel('StudentResult.title')); }