mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-18 14:48:42 -05:00
Report subpermission labels are shown properly in employee form now
Fix logic to show correct report subpermissions
This commit is contained in:
@@ -72,7 +72,7 @@ class MY_Lang extends CI_Lang
|
||||
else
|
||||
{
|
||||
// just return label name (with TBD)
|
||||
$line = $line . ' (TBD)';
|
||||
$line = $this->line_tbd($line);
|
||||
log_message('error', 'Could not find the language line "'.$line.'"');
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,12 @@ class MY_Lang extends CI_Lang
|
||||
|
||||
return $line;
|
||||
}
|
||||
|
||||
function line_tbd($line='')
|
||||
{
|
||||
return $line . ' (TBD)';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -65,9 +65,13 @@ foreach($all_modules->result() as $module)
|
||||
$exploded_permission = explode('_', $permission->permission_id);
|
||||
if ($permission->module_id == $module->module_id)
|
||||
{
|
||||
$lang_key = 'reports_'.$exploded_permission[1];
|
||||
$lang_key = $module->module_id.'_'.$exploded_permission[1];
|
||||
$lang_line = $this->lang->line($lang_key);
|
||||
$lang_line = ($lang_key = $lang_line) ? $exploded_permission[1] : $lang_line;
|
||||
$lang_line = ($this->lang->line_tbd($lang_key) == $lang_line) ? $exploded_permission[1] : $lang_line;
|
||||
if (empty($lang_line))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user