mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:49:10 +01:00
Admins can now force users to use a default app
This commit is contained in:
parent
1073ea3272
commit
4100284943
@ -52,6 +52,11 @@
|
||||
$phpgw->redirect($phpgw->link($phpgw_forward,$extra_vars));
|
||||
}
|
||||
|
||||
if ($phpgw_info['server']['force_default_app'] && $phpgw_info['server']['force_default_app'] != 'user_choice')
|
||||
{
|
||||
$phpgw_info['user']['preferences']['common']['default_app'] = $phpgw_info['server']['force_default_app'];
|
||||
}
|
||||
|
||||
if (($phpgw_info['user']['preferences']['common']['useframes'] &&
|
||||
$phpgw_info['server']['useframes'] == 'allowed') ||
|
||||
($phpgw_info['server']['useframes'] == 'always'))
|
||||
|
@ -209,6 +209,11 @@
|
||||
|
||||
$p->set_file($templates);
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$p->set_var('errors',lang('ACL grants have been updated'));
|
||||
}
|
||||
|
||||
$common_hidden_vars = ' <input type="hidden" name="s_groups" value="'.$s_groups.'">'."\n"
|
||||
. ' <input type="hidden" name="s_users" value="'.$s_users.'">'."\n"
|
||||
. ' <input type="hidden" name="maxm" value="'.$maxm.'">'."\n"
|
||||
|
@ -95,4 +95,33 @@
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
function force_default_app($config)
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
$out = '<option value="user_choice"';
|
||||
if ($config['force_default_app'] == 'user_choice')
|
||||
{
|
||||
$out .= ' selected';
|
||||
}
|
||||
$out .= '>' . lang('Users Choice') . '</option>' . "\n";
|
||||
|
||||
reset($phpgw_info['user']['apps']);
|
||||
while ($permission = each($phpgw_info['user']['apps']))
|
||||
{
|
||||
if ($phpgw_info['apps'][$permission[0]]['status'] != 2)
|
||||
{
|
||||
$out .= '<option value="' . $permission[0] . '"';
|
||||
if ($config['force_default_app'] == $permission[0])
|
||||
{
|
||||
$out .= ' selected';
|
||||
}
|
||||
$out .= '>' . lang($phpgw_info['apps'][$permission[0]]['title']) . '</option>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -255,7 +255,11 @@
|
||||
}
|
||||
echo "></td></tr>";
|
||||
}
|
||||
?>
|
||||
|
||||
if ($phpgw_info['server']['force_default_app'] == 'user_choice')
|
||||
{
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo lang("Default application"); ?></td>
|
||||
<td>
|
||||
@ -275,6 +279,9 @@
|
||||
?></select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo lang("Currency"); ?></td>
|
||||
|
@ -56,6 +56,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_Force_default_application}:<br></td>
|
||||
<td>
|
||||
<select name="newsettings[force_default_app]">
|
||||
{hook_force_default_app}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_Use_pure_HTML_compliant_code_(not_fully_working_yet)}:</td>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user