SF.net SVN: postfixadmin:[1102] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-07-21 22:20:32
|
Revision: 1102 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1102&view=rev Author: christian_boltz Date: 2011-07-21 22:20:25 +0000 (Thu, 21 Jul 2011) Log Message: ----------- create-domain.php: - renamed $pAdminCreate_domain_domain_text to $pAdminCreate_domain_domain_text_error - replaced $tMessage with flash_error(), flash_info() and $pAdminCreate_domain_domain_text_error - differences to Dale's patch: - removed now always empty smarty->assign for $pAdminCreate_domain_domain_text templates/admin_create-domain.tpl: - added 4th column for error messages - marked labels as <label> - aligned button to input fields - removed tMessage - differences to Dale's patch: - removed now unused $pAdminCreate_domain_domain_text variables.inc.php: - removed now unused $pAdminCreate_domain_domain_text (this was not part of Dale's patch) This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF), https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583 Modified Paths: -------------- trunk/create-domain.php trunk/templates/admin_create-domain.tpl trunk/variables.inc.php Modified: trunk/create-domain.php =================================================================== --- trunk/create-domain.php 2011-07-20 23:38:42 UTC (rev 1101) +++ trunk/create-domain.php 2011-07-21 22:20:25 UTC (rev 1102) @@ -18,7 +18,6 @@ * * Template Variables: * - * tMessage * tDomain * tDescription * tAliases @@ -102,8 +101,8 @@ if (isset ($_POST['fTransport'])) $tTransport = $fTransport; if (isset ($_POST['fDefaultaliases'])) $tDefaultaliases = $fDefaultaliases; if (isset ($_POST['fBackupmx'])) $tBackupmx = $fBackupmx; - $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error2']; - if (domain_exist ($fDomain)) $pAdminCreate_domain_domain_text = $PALANG['pAdminCreate_domain_domain_text_error']; + $pAdminCreate_domain_domain_text_error = $PALANG['pAdminCreate_domain_domain_text_error2']; + if (domain_exist ($fDomain)) $pAdminCreate_domain_domain_text_error = $PALANG['pAdminCreate_domain_domain_text_error']; } if ($error != 1) @@ -128,7 +127,7 @@ $result = db_query($sql_query); if ($result['rows'] != 1) { - $tMessage = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />"; + $pAdminCreate_domain_domain_text_error = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />"; } else { @@ -140,17 +139,19 @@ $result = db_query ("INSERT INTO $table_alias (address,goto,domain,created,modified) VALUES ('$address','$goto','$fDomain',NOW(),NOW())"); } } - $tMessage = $PALANG['pAdminCreate_domain_result_success'] . "<br />($fDomain)</br />"; + flash_info($PALANG['pAdminCreate_domain_result_success'] . "<br />($fDomain)</br />"); } if (!domain_postcreation($fDomain)) { - $tMessage = $PALANG['pAdminCreate_domain_error']; + flash_error($PALANG['pAdminCreate_domain_error']); } } } + $smarty->assign ('tDomain', $tDomain); $smarty->assign ('pAdminCreate_domain_domain_text', $pAdminCreate_domain_domain_text, false); +$smarty->assign ('pAdminCreate_domain_domain_text_error', $pAdminCreate_domain_domain_text_error, false); $smarty->assign ('tDescription', $tDescription, false); $smarty->assign ('tAliases', $tAliases); $smarty->assign ('tMailboxes', $tMailboxes); @@ -159,7 +160,6 @@ $smarty->assign ('select_options', select_options ($CONF ['transport_options'], array ($tTransport)),false); $smarty->assign ('tDefaultaliases', ($tDefaultaliases == 'on') ? ' checked="checked"' : ''); $smarty->assign ('tBackupmx', ($tBackupmx == 'on') ? ' checked="checked"' : ''); -$smarty->assign ('tMessage', $tMessage, false); $smarty->assign ('smarty_template', 'admin_create-domain'); $smarty->display ('index.tpl'); Modified: trunk/templates/admin_create-domain.tpl =================================================================== --- trunk/templates/admin_create-domain.tpl 2011-07-20 23:38:42 UTC (rev 1101) +++ trunk/templates/admin_create-domain.tpl 2011-07-21 22:20:25 UTC (rev 1102) @@ -2,65 +2,72 @@ <form name="create_domain" method="post" action=""> <table> <tr> - <td colspan="3"><h3>{$PALANG.pAdminCreate_domain_welcome}</h3></td> + <th colspan="4">{$PALANG.pAdminCreate_domain_welcome}</th> </tr> <tr> - <td>{$PALANG.pAdminCreate_domain_domain}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_domain}:</label></td> <td><input class="flat" type="text" name="fDomain" value="{$tDomain}" /></td> - <td>{$pAdminCreate_domain_domain_text}</td> + <td> </td> + <td><span class="error_msg">{$pAdminCreate_domain_domain_text_error}</span></td> </tr> <tr> - <td>{$PALANG.pAdminCreate_domain_description}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_description}:</label></td> <td><input class="flat" type="text" name="fDescription" value="{$tDescription}" /></td> - <td> </td> + <td colspan="2"> </td> </tr> <tr> - <td>{$PALANG.pAdminCreate_domain_aliases}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_aliases}:</label></td> <td><input class="flat" type="text" name="fAliases" value="{$tAliases}" /></td> <td>{$PALANG.pAdminCreate_domain_aliases_text}</td> + <td> </td> </tr> <tr> - <td>{$PALANG.pAdminCreate_domain_mailboxes}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_mailboxes}:</label></td> <td><input class="flat" type="text" name="fMailboxes" value="{$tMailboxes}" /></td> <td>{$PALANG.pAdminCreate_domain_mailboxes_text}</td> + <td> </td> </tr> {if $CONF.domain_quota===YES} <tr> - <td>{$PALANG.pAdminEdit_domain_quota}:</td> + <td class="label"><label>{$PALANG.pAdminEdit_domain_quota}:</label></td> <td><input class="flat" type="text" name="fDomainquota" value="{$tDomainquota}" /></td> <td>{$PALANG.pAdminCreate_domain_maxquota_text}</td> + <td> </td> </tr> {/if} {if $CONF.quota===YES} <tr> - <td>{$PALANG.pAdminCreate_domain_maxquota}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_maxquota}:</label></td> <td><input class="flat" type="text" name="fMaxquota" value="{$tMaxquota}" /></td> <td>{$PALANG.pAdminCreate_domain_maxquota_text}</td> + <td> </td> </tr> {/if} {if $CONF.transport===YES} <tr> - <td>{$PALANG.pAdminCreate_domain_transport}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_transport}:</label></td> <td><select class="flat" name="fTransport">{$select_options}</select></td> <td>{$PALANG.pAdminCreate_domain_transport_text}</td> + <td> </td> </tr> {/if} <tr> - <td>{$PALANG.pAdminCreate_domain_defaultaliases}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_defaultaliases}:</label></td> <td><input class="flat" type="checkbox" value='on' name="fDefaultaliases"{$tDefaultaliases}/></td> <td>{$PALANG.pAdminCreate_domain_defaultaliases_text}</td> + <td> </td> </tr> <tr> - <td>{$PALANG.pAdminCreate_domain_backupmx}:</td> + <td class="label"><label>{$PALANG.pAdminCreate_domain_backupmx}:</label></td> <td><input class="flat" type="checkbox" value='on' name="fBackupmx"{$tBackupmx}/></td> <td> </td> + <td> </td> </tr> <tr> - <td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="{$PALANG.pAdminCreate_domain_button}" /></td> + <td> </td> + <td><input class="button" type="submit" name="submit" value="{$PALANG.pAdminCreate_domain_button}" /></td> + <td colspan="2"> </td> </tr> - <tr> - <td colspan="3" class="standout">{$tMessage}</td> - </tr> </table> </form> </div> Modified: trunk/variables.inc.php =================================================================== --- trunk/variables.inc.php 2011-07-20 23:38:42 UTC (rev 1101) +++ trunk/variables.inc.php 2011-07-21 22:20:25 UTC (rev 1102) @@ -77,7 +77,6 @@ $tUsername = ""; $tTransport = ""; -$pAdminCreate_domain_domain_text = " "; $pCreate_alias_address_text = " "; $pCreate_alias_goto_text = " "; $pCreate_mailbox_password_text = " "; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |