public function get_form_fields() { $return = parent::get_form_fields(); /* adjust min and max time */ $CI =& ci_get_instance(); $time_min = $CI->app_conf->get('time_min'); $time_max = $CI->app_conf->get('time_max'); $time_min = $time_min ? $time_min : 0; $time_max = $time_max ? $time_max : 24 * 60 * 60; $return['start']['conf']['min'] = $time_min; $return['start']['conf']['max'] = $time_max; $return['end']['conf']['min'] = $time_min; $return['end']['conf']['max'] = $time_max; return $return; }
public function get_form_fields() { $return = parent::get_form_fields(); /* remove archived users if any */ $remove_users = array(); $um = new User_Model(); $um->select('id')->where('active', USER_MODEL::STATUS_ARCHIVE)->get(); foreach ($um as $u) { $remove_users[] = $u->id; } if ($remove_users) { reset($remove_users); foreach ($remove_users as $rid) { unset($return['user']['options'][$rid]); } } /* adjust min and max time */ $CI =& ci_get_instance(); $time_min = $CI->app_conf->get('time_min'); $time_max = $CI->app_conf->get('time_max'); $time_min = $time_min ? $time_min : 0; $time_max = $time_max ? $time_max : 24 * 60 * 60; $return['start']['conf']['min'] = $time_min; $return['start']['conf']['max'] = $time_max; $return['end']['conf']['min'] = $time_min; $return['end']['conf']['max'] = $time_max; return $return; }