Esempio n. 1
0
 function __construct()
 {
     $this->conf = array('model' => 'Shift_model', 'path' => 'admin/shifts', 'entity' => 'shift', 'after_save' => 'shift');
     parent::__construct(User_model::LEVEL_MANAGER);
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
 }
Esempio n. 2
0
 function __construct()
 {
     $this->conf = array('model' => 'Shift_model', 'path' => 'staff/shifts', 'entity' => 'shift');
     parent::__construct(USER_MODEL::LEVEL_STAFF);
     $this->{$this->model} = $this->auth->user()->shift;
     $this->{$this->model}->user = $this->auth->user();
     //		$this->data['fields'] = $this->process_fields();
     //		parent::__construct( USER_MODEL::LEVEL_STAFF, 'staff/shifts' );
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
 }
Esempio n. 3
0
 function __construct()
 {
     $this->conf = array('model' => 'Logaudit_model', 'path' => 'logaudit/admin', 'entity' => 'logaudit');
     parent::__construct(USER_MODEL::LEVEL_MANAGER);
 }
Esempio n. 4
0
 function __construct()
 {
     $this->conf = array('model' => 'Location_model', 'path' => 'admin/locations', 'entity' => 'location');
     parent::__construct();
 }
Esempio n. 5
0
 function password($id)
 {
     $fields = array_values(array_filter($this->{$this->model}->get_form_fields(), create_function('$a', 'return (isset($a["type"]) && ("password" == $a["type"])) ? TRUE : FALSE;')));
     $this->data['fields'] = $fields;
     if (!$this->hc_form->is_set_default('password')) {
         $this->hc_form->set_default('password', '');
     }
     return parent::edit($id, 'password');
 }
Esempio n. 6
0
 function edit($id, $view = 'edit')
 {
     $this->data['fixed'] = array('user');
     return parent::edit($id, $view);
 }
Esempio n. 7
0
 function __construct()
 {
     $this->conf = array('model' => 'Shift_template_model', 'path' => 'admin/shift_templates', 'entity' => 'shift_template');
     parent::__construct(User_model::LEVEL_ADMIN);
 }