cleaned up the header manager. More setting descriptions better lay-out

This commit is contained in:
Pim Snel 2006-05-15 20:06:23 +00:00
parent 046856a4dc
commit 55a310e678
3 changed files with 211 additions and 159 deletions

View File

@ -268,10 +268,13 @@
$setup_tpl->set_var('lang_select','<tr><td colspan="2"><form action="manageheader.php" method="post">Please Select your language '.lang_select(True,'en')."</form></td></tr>");
}
$detected = '';
$detected .= '<tr><td colspan="2"><p>' . $GLOBALS['egw_info']['setup']['PageMSG'] . '<br />&nbsp;</p></td></tr>';
$setup_tpl->set_var('pagemsg',$GLOBALS['egw_info']['setup']['PageMSG']);
$setup_tpl->set_var('lang_analysis',lang('Analysis'));
//$detected = '';
//$detected .= '<tr><td colspan="2"><p>' . $GLOBALS['egw_info']['setup']['PageMSG'] . '<br />&nbsp;</p></td></tr>';
$detected .= '<tr class="th"><td colspan="2">' . lang('Analysis') . '</td></tr>'."\n".'<tr><td colspan="2">'. "\n";
//$detected .= '<tr class="th"><td colspan="2">' . lang('Analysis') . '</td></tr>'."\n".'<tr><td colspan="2">'. "\n";
$supported_db = array();
foreach(array(
@ -521,7 +524,7 @@
$GLOBALS['egw_info']['server']['include_root'] = $updir;
}
$detected .= "</td></tr>\n";
$setup_tpl->set_var('detected',$detected);
/* End of detected settings, now display the form with the detected or prior values */
@ -576,7 +579,8 @@
$setup_tpl->set_var('mcrypt',$GLOBALS['egw_info']['server']['versions']['mcrypt']);
$setup_tpl->set_var('mcrypt_iv',$GLOBALS['egw_info']['server']['mcrypt_iv']);
$setup_tpl->set_var('lang_setup_acl',lang('Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org)'));
$setup_tpl->set_var('lang_setup_acl',lang('Limit access'));
$setup_tpl->set_var('lang_setup_acl_descr',lang('Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org)'));
$setup_tpl->set_var('setup_acl',$GLOBALS['egw_info']['server']['setup_acl']);
if(@$GLOBALS['egw_info']['server']['show_domain_selectbox'])
@ -625,8 +629,11 @@
$setup_tpl->set_var('lang_adddomain',lang('Add new database instance (eGW domain)'));
$setup_tpl->set_var('lang_serverroot',lang('Server Root'));
$setup_tpl->set_var('lang_includeroot',lang('Include Root (this should be the same as Server Root unless you know what you are doing)'));
$setup_tpl->set_var('lang_adminuser',lang('Admin user for header manager'));
$setup_tpl->set_var('lang_adminpass',lang('Admin password to header manager'));
$setup_tpl->set_var('lang_adminuser',lang('Header loginname'));
$setup_tpl->set_var('lang_adminuser_descr',lang('Admin user for header manager'));
$setup_tpl->set_var('lang_adminpass',lang('Header password'));
$setup_tpl->set_var('lang_adminpass_descr',lang('Admin password to header manager.'));
$setup_tpl->set_var('lang_leave_empty',lang('Leave empty to keep current.'));
$setup_tpl->set_var('lang_dbhost',lang('DB Host'));
$setup_tpl->set_var('lang_dbhostdescr',lang('Hostname/IP of database server').'<br />'.
lang('Postgres: Leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection').'<br />'.
@ -642,8 +649,9 @@
$setup_tpl->set_var('lang_dbtype',lang('DB Type'));
$setup_tpl->set_var('lang_whichdb',lang('Which database type do you want to use with eGroupWare?'));
$setup_tpl->set_var('lang_configuser',lang('Configuration User'));
$setup_tpl->set_var('lang_configuser_descr',lang('Loginname needed for domain configuration'));
$setup_tpl->set_var('lang_configpass',lang('Configuration Password'));
$setup_tpl->set_var('lang_passforconfig',lang('Password needed for configuration'));
$setup_tpl->set_var('lang_passforconfig',lang('Password needed for domain configuration.'));
$setup_tpl->set_var('lang_persist',lang('Persistent connections'));
$setup_tpl->set_var('lang_persistdescr',lang('Do you want persistent connections (higher performance, but consumes more resources)'));
$setup_tpl->set_var('lang_sesstype',lang('Sessions Type'));
@ -657,6 +665,7 @@
$setup_tpl->set_var('lang_mcryptiv',lang('MCrypt initialization vector'));
$setup_tpl->set_var('lang_mcryptivdescr',lang('This should be around 30 bytes in length.<br />Note: The default has been randomly generated.'));
$setup_tpl->set_var('lang_domselect',lang('Domain select box on login'));
$setup_tpl->set_var('lang_domselect_descr',lang('Alternatively domains can be accessed by logging in with <i>username@domain</i>.'));
$setup_tpl->set_var('lang_finaldescr',lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".'));
$setup_tpl->set_var('lang_continue',lang('Continue'));
$setup_tpl->set_var('lang_Yes',lang('Yes'));

View File

@ -39,15 +39,42 @@
<!--
.row_on { color: #000000; background-color: #eeeeee; }
.row_off { color: #000000; background-color: #e8f0f0; }
.th
.th
{
color: #000000;
background-color: #cccccc;
color: #000000;
background-color: #cccccc;
font-weight:bold;
font-size:120%;
}
td
{
/*font-size:12px;*/
line-height:170%;
}
/* some styles specially for setup */
#tbl_manage_header td
{
border:solid 0px green;
vertical-align:top;
padding-bottom:10px;
}
.th th,
.th td
{
padding:3px;
}
.table_domains
{
border:solid 1px #cccccc;
width:100%;
margin-bottom:10px;
}
-->
</style>
<!--{java_script}-->
<!-- this solves the internet explorer png-transparency bug, but only for ie 5.5 and higher -->

View File

@ -1,166 +1,182 @@
<!-- BEGIN manageheader -->
<script language="JavaScript" type="text/javascript">
<!--
{js_default_db_ports}
function setDefaultDBPort(selectBox,portField)
{
<!--
{js_default_db_ports}
function setDefaultDBPort(selectBox,portField)
{
//alert("select: " + selectBox + "; portField: " + portField);
if(selectBox.selectedIndex != -1 && selectBox.options[selectBox.selectedIndex].value)
if(selectBox.selectedIndex != -1 && selectBox.options[selectBox.selectedIndex].value)
{
//alert("value = " + selectBox.options[selectBox.selectedIndex].value);
portField.value = default_db_ports[selectBox.options[selectBox.selectedIndex].value];
}
return false;
}
return false;
}
//-->
</script>
<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">
<tbody>
{lang_select}
{detected}
<table border="0" width="600px;" id="tbl_manage_header" style="border-spacing:5px;" cellspacing="0" cellpadding="0" align="center">
<tbody>
{lang_select}
<tr><td colspan="2"><h3>{pagemsg}</h3></td></tr>
<tr class="th"><th colspan="2">{lang_analysis}</th>
</tr>
<tr>
<td colspan="2">
{detected}
</td>
</tr>
<!-- <tr>
<td>-->
<form name="domain_settings" action="manageheader.php" method="post">
<input type="hidden" name="setting[write_config]" value="true" />
<!-- <table style="border-spacing:5px;" border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>-->
<tr class="th">
<th colspan="2">{lang_settings}</th>
</tr>
<tr>
<td colspan="2"><strong>{lang_serverroot}</strong><br /><input type="text" name="setting[server_root]" size="80" value="{server_root}" /></td>
</tr>
<tr>
<td colspan="2"><strong>{lang_includeroot}</strong><br /><input type="text" name="setting[include_root]" size="80" value="{include_root}" /></td>
</tr>
<tr>
<td><strong>{lang_adminuser}</strong><br /><input type="text" name="setting[HEADER_ADMIN_USER]" size="30" value="{header_admin_user}" /></td>
<td>{lang_adminuser_descr}</td>
</tr>
<tr>
<td><strong>{lang_adminpass}</strong><br /><input type="password" name="setting[HEADER_ADMIN_PASSWORD]" size="30" value="{header_admin_password}" /><input type="hidden" name="setting[HEADER_ADMIN_PASS]" value="{header_admin_pass}" /></td>
<td>{lang_adminpass_descr} {lang_leave_empty}</td>
</tr>
<tr>
<td><strong>{lang_setup_acl}</strong><br /><input type="text" name="setting[setup_acl]" size="30" value="{setup_acl}" /></td>
<td>{lang_setup_acl_descr}</td>
</tr>
<tr>
<td><strong>{lang_persist}</strong><br />
<select name="setting[db_persistent]">
<option value="True"{db_persistent_yes}>{lang_Yes}</option>
<option value="False"{db_persistent_no}>{lang_No}</option>
</select>
</td>
<td>{lang_persistdescr}</td>
</tr>
<tr>
<td><strong>{lang_sesstype}</strong><br />
<select name="setting[sessions_type]">
{session_options}
</select>
</td>
<td>{lang_sesstypedescr}</td>
</tr>
<tr>
<td><strong>{lang_enablemcrypt}</strong><br />
<select name="setting[enable_mcrypt]">
<option value="True"{mcrypt_enabled_yes}>{lang_Yes}</option>
<option value="False"{mcrypt_enabled_no}>{lang_No}</option>
</select>
</td>
<td>{lang_mcrypt_warning}</td>
</tr>
<tr>
<td><strong>{lang_mcryptversion}</strong><br /><input type="text" name="setting[mcrypt_version]" value="{mcrypt}" /></td>
<td>{lang_mcryptversiondescr}</td>
</tr>
<tr>
<td><strong>{lang_mcryptiv}</strong><br /><input type="text" name="setting[mcrypt_iv]" value="{mcrypt_iv}" size="35" /></td>
<td>{lang_mcryptivdescr}</td>
</tr>
<tr>
<td><strong>{lang_domselect}</strong><br />
<select name="setting[domain_selectbox]">
<option value="True"{domain_selectbox_yes}>{lang_Yes}</option>
<option value="False"{domain_selectbox_no}>{lang_No}</option>
</select></td>
<td>{lang_domselect_descr}</td>
</tr>
<tr>
<td colspan="2">
{domains}
</td>
</tr>
{comment_l}
<tr class="th">
<td style="padding:3px;" colspan="2"><input type="submit" name="adddomain" value="{lang_adddomain}" /></td>
</tr>
{comment_r}
<tr>
<td colspan="2">{errors}</td>
</tr>
<!-- </tbody>
</table>-->
</form>
<!-- </td>
</tr>-->
<tr>
<td>
<form name="domain_settings" action="manageheader.php" method="post">
<input type="hidden" name="setting[write_config]" value="true" />
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr class="th">
<th colspan="2">{lang_settings}</th>
</tr>
<tr>
<td colspan="2"><b>{lang_serverroot}</b><br /><input type="text" name="setting[server_root]" size="80" value="{server_root}" /></td>
</tr>
<tr>
<td colspan="2"><b>{lang_includeroot}</b><br /><input type="text" name="setting[include_root]" size="80" value="{include_root}" /></td>
</tr>
<tr>
<td colspan="2"><b>{lang_adminuser}</b><br /><input type="text" name="setting[HEADER_ADMIN_USER]" size="30" value="{header_admin_user}" /></td>
</tr>
<tr>
<td colspan="2"><b>{lang_adminpass}</b><br /><input type="password" name="setting[HEADER_ADMIN_PASSWORD]" size="30" value="{header_admin_password}" /><input type="hidden" name="setting[HEADER_ADMIN_PASS]" value="{header_admin_pass}" /></td>
</tr>
<tr>
<td colspan="2"><b>{lang_setup_acl}</b><br /><input type="text" name="setting[setup_acl]" size="30" value="{setup_acl}" /></td>
</tr>
<tr>
<td><b>{lang_persist}</b><br />
<select name="setting[db_persistent]">
<option value="True"{db_persistent_yes}>{lang_Yes}</option>
<option value="False"{db_persistent_no}>{lang_No}</option>
</select>
</td>
<td>{lang_persistdescr}</td>
</tr>
<tr>
<td><b>{lang_sesstype}</b><br />
<select name="setting[sessions_type]">
{session_options}
</select>
</td>
<td>{lang_sesstypedescr}</td>
</tr>
<tr>
<td><b>{lang_enablemcrypt}</b><br />
<select name="setting[enable_mcrypt]">
<option value="True"{mcrypt_enabled_yes}>{lang_Yes}</option>
<option value="False"{mcrypt_enabled_no}>{lang_No}</option>
</select>
</td>
<td>{lang_mcrypt_warning}</td>
</tr>
<tr>
<td><b>{lang_mcryptversion}</b><br /><input type="text" name="setting[mcrypt_version]" value="{mcrypt}" /></td>
<td>{lang_mcryptversiondescr}</td>
</tr>
<tr>
<td><b>{lang_mcryptiv}</b><br /><input type="text" name="setting[mcrypt_iv]" value="{mcrypt_iv}" size="30" /></td>
<td>{lang_mcryptivdescr}</td>
</tr>
<tr>
<td><b>{lang_domselect}</b><br />
<select name="setting[domain_selectbox]">
<option value="True"{domain_selectbox_yes}>{lang_Yes}</option>
<option value="False"{domain_selectbox_no}>{lang_No}</option>
</select></td><td>&nbsp;
</td>
</tr>
{domains}{comment_l}
<tr class="th">
<td colspan="2"><input type="submit" name="adddomain" value="{lang_adddomain}" /></td>
</tr>{comment_r}
<tr>
<td colspan="2">{errors}</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
<tr>
<td>
<form action="index.php" method="post">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<br />{lang_finaldescr}<br />
<input type="hidden" name="FormLogout" value="header" />
<input type="hidden" name="ConfigLogin" value="Login" />
<input type="hidden" name="FormUser" value="{FormUser}" />
<input type="hidden" name="FormPW" value="{FormPW}" />
<input type="hidden" name="FormDomain" value="{FormDomain}" />
<input type="submit" name="junk" value="{lang_continue}" />
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
<tr>
<td colspan="2">
<form action="index.php" method="post">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<br />{lang_finaldescr}<br />
<input type="hidden" name="FormLogout" value="header" />
<input type="hidden" name="ConfigLogin" value="Login" />
<input type="hidden" name="FormUser" value="{FormUser}" />
<input type="hidden" name="FormPW" value="{FormPW}" />
<input type="hidden" name="FormDomain" value="{FormDomain}" />
<input type="submit" name="junk" value="{lang_continue}" />
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
<!-- END manageheader -->
<!-- BEGIN domain -->
<tr class="th">
<td>{lang_domain}:</td>
<td><input name="domains[{db_domain}]" value="{db_domain}" />&nbsp;&nbsp;<input type="checkbox" name="deletedomain[{db_domain}]" />&nbsp;<font color="fefefe">{lang_delete}</font></td>
</tr>
<tr>
<td><b>{lang_dbtype}</b><br />
<select name="setting_{db_domain}[db_type]" onchange="setDefaultDBPort(this,this.form['setting_{db_domain}[db_port]']);">
{dbtype_options}
</select>
</td>
<td>{lang_whichdb}</td>
</tr>
<tr>
<td><b>{lang_dbhost}</b><br /><input type="text" name="setting_{db_domain}[db_host]" value="{db_host}" /></td><td>{lang_dbhostdescr}</td>
</tr>
<tr>
<td><b>{lang_dbport}</b><br /><input type="text" name="setting_{db_domain}[db_port]" value="{db_port}" /></td><td>{lang_dbportdescr}</td>
</tr>
<tr>
<td><b>{lang_dbname}</b><br /><input type="text" name="setting_{db_domain}[db_name]" value="{db_name}" /></td><td>{lang_dbnamedescr}</td>
</tr>
<tr>
<td><b>{lang_dbuser}</b><br /><input type="text" name="setting_{db_domain}[db_user]" value="{db_user}" /></td><td>{lang_dbuserdescr}</td>
</tr>
<tr>
<td><b>{lang_dbpass}</b><br /><input type="password" name="setting_{db_domain}[db_pass]" value="{db_pass}" /></td><td>{lang_dbpassdescr}</td>
</tr>
<tr>
<td><b>{lang_configuser}</b><br /><input type="text" name="setting_{db_domain}[config_user]" value="{config_user}" /></td>
</tr>
<tr>
<td><b>{lang_configpass}</b><br /><input type="password" name="setting_{db_domain}[config_pass]" value="{config_pass}" /><input type="hidden" name="setting_{db_domain}[config_password]" value="{config_password}" /></td>
<td>{lang_passforconfig}</td>
</tr>
<table class="table_domains">
<tr class="th">
<td colspan="2" style="text-align:center;padding:3px;">{lang_domain}:&nbsp;<input name="domains[{db_domain}]" value="{db_domain}" />&nbsp;&nbsp;<input type="checkbox" name="deletedomain[{db_domain}]" />&nbsp;{lang_delete}</td>
</tr>
<tr>
<td><strong>{lang_dbtype}</strong><br />
<select name="setting_{db_domain}[db_type]" onchange="setDefaultDBPort(this,this.form['setting_{db_domain}[db_port]']);">
{dbtype_options}
</select>
</td>
<td>{lang_whichdb}</td>
</tr>
<tr>
<td><strong>{lang_dbhost}</strong><br /><input type="text" name="setting_{db_domain}[db_host]" value="{db_host}" /></td><td>{lang_dbhostdescr}</td>
</tr>
<tr>
<td><strong>{lang_dbport}</strong><br /><input type="text" name="setting_{db_domain}[db_port]" value="{db_port}" /></td><td>{lang_dbportdescr}</td>
</tr>
<tr>
<td><strong>{lang_dbname}</strong><br /><input type="text" name="setting_{db_domain}[db_name]" value="{db_name}" /></td><td>{lang_dbnamedescr}</td>
</tr>
<tr>
<td><strong>{lang_dbuser}</strong><br /><input type="text" name="setting_{db_domain}[db_user]" value="{db_user}" /></td><td>{lang_dbuserdescr}</td>
</tr>
<tr>
<td><strong>{lang_dbpass}</strong><br /><input type="password" name="setting_{db_domain}[db_pass]" value="{db_pass}" /></td><td>{lang_dbpassdescr}</td>
</tr>
<tr>
<td><strong>{lang_configuser}</strong><br /><input type="text" name="setting_{db_domain}[config_user]" value="{config_user}" /></td>
<td>{lang_configuser_descr}</td>
</tr>
<tr>
<td><strong>{lang_configpass}</strong><br /><input type="password" name="setting_{db_domain}[config_pass]" value="{config_pass}" /><input type="hidden" name="setting_{db_domain}[config_password]" value="{config_password}" /></td>
<td>{lang_passforconfig} {lang_leave_empty}</td>
</tr>
</table>
<!-- END domain -->
</td></tr>