mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-07 05:50:13 +01:00
Add settings for user country and countrlist option based on admin setting
This commit is contained in:
parent
467ec28d2b
commit
ae9b96d242
@ -12,6 +12,33 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
|
function country_set($config)
|
||||||
|
{
|
||||||
|
global $phpgw;
|
||||||
|
|
||||||
|
$country = array(
|
||||||
|
'user_choice' => 'User Choice',
|
||||||
|
'force_select' => 'Force Selectbox'
|
||||||
|
);
|
||||||
|
|
||||||
|
while (list ($key, $value) = each ($country))
|
||||||
|
{
|
||||||
|
if ($config['countrylist'] == $key)
|
||||||
|
{
|
||||||
|
$selected = ' selected';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$selected = '';
|
||||||
|
}
|
||||||
|
$descr = lang($value);
|
||||||
|
|
||||||
|
$out .= '<option value="' . $key . '"' . $selected . '>' . $descr . '</option>' . "\n";
|
||||||
|
}
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
function force_theme($config)
|
function force_theme($config)
|
||||||
{
|
{
|
||||||
global $phpgw;
|
global $phpgw;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
$phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True);
|
$phpgw_info["flags"] = array("nonavbar" => True, "noheader" => True);
|
||||||
}
|
}
|
||||||
$phpgw_info["flags"]["currentapp"] = "preferences";
|
$phpgw_info["flags"]["currentapp"] = "preferences";
|
||||||
|
$phpgw_info["flags"]["enable_sbox_class"] = True;
|
||||||
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
@ -195,6 +196,35 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<?php $selected[$phpgw_info['user']['preferences']['common']['country']] = ' selected'; ?>
|
||||||
|
<td><?php echo lang('country'); ?></td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
echo $phpgw->sbox->form_select($phpgw_info['user']['preferences']['common']['country'],'settings[country]');
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php if ($phpgw_info['server']['countrylist'] == 'user_choice'){ ?>
|
||||||
|
<tr>
|
||||||
|
<?php $selected_country[$phpgw_info['user']['preferences']['common']['countrylist']] = ' selected'; ?>
|
||||||
|
<td><?php echo lang('Country Selection') . ':'; ?><br></td>
|
||||||
|
<td>
|
||||||
|
<select name="settings[countrylist]">
|
||||||
|
<?php
|
||||||
|
$country = array('use_select' => lang('Use Selectbox'), 'use_text' => lang('Use Text Entry'));
|
||||||
|
while (list ($key, $value) = each ($country)){
|
||||||
|
echo '<option value="'.$key.'" '.$selected_country[$key].'>'.$value.'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<?php $selected[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected"; ?>
|
<?php $selected[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected"; ?>
|
||||||
<td><?php echo lang("language"); ?></td>
|
<td><?php echo lang("language"); ?></td>
|
||||||
|
@ -29,6 +29,15 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr bgcolor="{row_on}">
|
||||||
|
<td>{lang_Country_Selection} ({lang_Text_Entry}/{lang_SelectBox}):</td>
|
||||||
|
<td>
|
||||||
|
<select name="newsettings[countrylist]">
|
||||||
|
{hook_country_set}
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr bgcolor="{row_on}">
|
<tr bgcolor="{row_on}">
|
||||||
<td>{lang_Interface}/{lang_Template_Selection}:</td>
|
<td>{lang_Interface}/{lang_Template_Selection}:</td>
|
||||||
<td>
|
<td>
|
||||||
|
Loading…
Reference in New Issue
Block a user