Add new admin config option to use country class for country names

This commit is contained in:
Miles Lott 2001-05-21 22:35:04 +00:00
parent ced6e5cc0e
commit 5a7bd92c12
3 changed files with 87 additions and 2 deletions

69
addressbook/admin.php Normal file
View File

@ -0,0 +1,69 @@
<?php
/**************************************************************************\
* phpGroupWare - Address Book *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$phpgw_info['flags'] = array(
'currentapp' => 'addressbook',
'noheader' => True,
'nonavbar' => True,
'noappheader' => True,
'noappfooter' => True,
'enable_config_class' => True,
'enable_nextmatchs_class' => True
);
include('../header.inc.php');
$phpgw->config->read_repository();
if ($submit)
{
if ($usecountrylist)
{
$phpgw->config->config_data['countrylist'] = True;
}
else
{
unset($phpgw->config->config_data['countrylist']);
}
$phpgw->config->save_repository(True);
Header('Location: ' . $phpgw->link('/admin/index.php'));
}
$phpgw->common->phpgw_header();
echo parse_navbar();
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$t->set_file(array('admin' => 'admin.tpl'));
$t->set_var('action_url',$phpgw->link('/addressbook/admin.php'));
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$t->set_var('tr_color',$tr_color);
$t->set_var('lang_countrylist',lang('Use Country List'));
if ($phpgw->config->config_data['countrylist'])
{
$t->set_var('countrylist',' checked');
}
else
{
$t->set_var('countrylist','');
}
$t->set_var('lang_admin',lang('Addressbook').' '.lang('Admin'));
$t->set_var('lang_submit',lang('submit'));
$t->pparse('out','admin');
$phpgw->common->phpgw_footer();
?>

View File

@ -0,0 +1,16 @@
<!-- BEGIN admin.tpl -->
<p><b>{lang_admin}:</b><hr><p>
<form method="POST" action="{action_url}">
<table border="0" align="center" cellspacing="1" cellpadding="1">
<tr bgcolor="EEEEEE">
<td colspan="3">
{lang_countrylist}
<input type="checkbox" name="usecountrylist"{countrylist}></td>
</tr>
<tr>
<td colspan="5" align="center">
<input type="submit" name="submit" value="{lang_submit}">
</td>
</tr>
</table>
</form>

View File

@ -146,7 +146,7 @@
<td></td> <td></td>
<td><font color="#000000" face="" size="-1">{lang_bcountry}:</font></td> <td><font color="#000000" face="" size="-1">{lang_bcountry}:</font></td>
<td> <td>
<font size="-1"><input name="bcountry" value="{bcountry}"></font> <font size="-1">{bcountry}</font>
</td> </td>
<td><font color="#000000" face="" size="-1">{lang_timezone}:</font></td> <td><font color="#000000" face="" size="-1">{lang_timezone}:</font></td>
<td> <td>
@ -275,7 +275,7 @@
<td></td> <td></td>
<td><font color="#000000" face="" size="-1">{lang_hcountry}:</font></td> <td><font color="#000000" face="" size="-1">{lang_hcountry}:</font></td>
<td> <td>
<font size="-1"><input name="hcountry" value="{hcountry}"></font> <font size="-1">{hcountry}</font>
</td> </td>
</tr> </tr>
<tr> <tr>