mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
41d5ee4ecb
- filter available alias and target domains (and print an error message if none is available) - print success message via flash_info, not inside the form and do a redirect afterwards. We would have to update the list of domains available for aliasing otherwise. - added vim: settings templates/create-alias-domain.php: - hide form if no domains are available for aliasing - move logic of skipping non-available domains to /create-alias-domain.php - added vim: settings templates/list-virtual.php: - show "create alias domain" link (only) if it makes sence (not perfect yet, but better than before) - don't create empty <div> etc. if domain has no mailboxes - intentionally skipped most whitespace fixes (added a comment instead), they would make the patch unreadable languages/*: - additional error message for alias domains: 'All domains are already aliased.' git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@422 a1433add-5e2c-0410-b055-b7f2511e0802
63 lines
1.9 KiB
PHP
63 lines
1.9 KiB
PHP
<?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?>
|
|
<div id="edit_form">
|
|
<form name="alias_domain" method="post">
|
|
<table>
|
|
<tr>
|
|
<td colspan="3"><h3><?php print $PALANG['pCreate_alias_domain_welcome']; ?></h3></td>
|
|
</tr>
|
|
|
|
<?php
|
|
if (count($alias_domains) > 0) {
|
|
?>
|
|
|
|
<tr>
|
|
<td><?php print $PALANG['pCreate_alias_domain_alias'] . ":"; ?></td>
|
|
<td>
|
|
<select class="flat" name="alias_domain">
|
|
<?php
|
|
foreach ($alias_domains as $dom)
|
|
{
|
|
print "<option value=\"$dom\"".(($fAliasDomain == $dom) ? ' selected' : '').">$dom</option>\n";
|
|
}
|
|
?>
|
|
</select>
|
|
<td><?php print $PALANG['pCreate_alias_domain_alias_text']; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php print $PALANG['pCreate_alias_domain_target'] . ":"; ?></td>
|
|
<td>
|
|
<select class="flat" name="target_domain">
|
|
<?php
|
|
foreach ($target_domains as $dom)
|
|
{
|
|
print "<option value=\"$dom\"".(($fTargetDomain == $dom) ? ' selected' : '').">$dom</option>\n";
|
|
}
|
|
?>
|
|
</select>
|
|
<td><?php print $PALANG['pCreate_alias_domain_target_text']; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td><?php print $PALANG['pCreate_alias_domain_active'] . ":"; ?></td>
|
|
<td><input class="flat" type="checkbox" name="active" value="1"<?php if ($fActive) { print ' checked'; } ?> /></td>
|
|
<td> </td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
<tr>
|
|
<td colspan="3" class="standout"><?php if ($error) { print '<span class="error_msg">'; } print $tMessage; if ($error) { print '</span>'; } ?></td>
|
|
</tr>
|
|
<?php
|
|
if (count($alias_domains) > 0) {
|
|
?>
|
|
<tr>
|
|
<td colspan="3" class="hlp_center"><input class="button" type="submit" name="submit" value="<?php print $PALANG['pCreate_alias_domain_button']; ?>" /></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
?>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<?php /* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>
|