0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
postfixadmin/templates/admin_edit-domain.tpl
Christian Boltz af6a1b6626 Add support for domain-level quota (total quota for a domain)
Based on a patch from W. Rossmann (W. Rossmann@SF),
https://sourceforge.net/tracker/index.php?func=detail&aid=2974928&group_id=191583&atid=937966
with some modifications, cleanup and adoptions to trunk (especially templates)

config.inc.php:
- new config option $CONF['domain_quota'] to enable/disable domain-level
  quota (default: enabled)
- new config option $CONF['domain_quota_default'] (default: 2 GB)

functions.inc.php - check_quota():
- add code to check the quota sum on a domain
- add optional parameter $username (to exclude that username from quota
  calculation, used by edit-mailbox)

edit-domain.php, create-domain.php,
admin_edit-domain.tpl, admin_create-domain.tpl:
- add input field and handling for domain-level quota

list-domain.php, overview-get.tpl, adminlistdomain.tpl:
- display allocated and allowed domain quota
- beautify quota and max_quota fields - display "unlimited" instead of "-1"

edit-mailbox.php:
- hand over username to check_quota()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1042 a1433add-5e2c-0410-b055-b7f2511e0802
2011-04-19 20:18:46 +00:00

67 lines
2.0 KiB
Smarty

<div id="edit_form">
<form name="edit_domain" method="post" action="">
<table>
<tr>
<td colspan="3"><h3>{$PALANG.pAdminEdit_domain_welcome}</h3></td>
</tr>
<tr>
<td>{$PALANG.pAdminEdit_domain_domain}:</td>
<td>{$domain}</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>{$PALANG.pAdminEdit_domain_description}:</td>
<td><input class="flat" type="text" name="fDescription" value="{$tDescription}" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>{$PALANG.pAdminEdit_domain_aliases}:</td>
<td><input class="flat" type="text" name="fAliases" value="{$tAliases}" /></td>
<td>{$PALANG.pAdminEdit_domain_aliases_text}</td>
</tr>
<tr>
<td>{$PALANG.pAdminEdit_domain_mailboxes}:</td>
<td><input class="flat" type="text" name="fMailboxes" value="{$tMailboxes}" /></td>
<td>{$PALANG.pAdminEdit_domain_mailboxes_text}</td>
</tr>
{if $CONF.domain_quota===YES}
<tr>
<td>{$PALANG.pAdminEdit_domain_quota}:</td>
<td><input class="flat" type="text" name="fDomainquota" value="{$tDomainquota}" /></td>
<td>{$PALANG.pAdminEdit_domain_maxquota_text}</td>
</tr>
{/if}
{if $CONF.quota===YES}
<tr>
<td>{$PALANG.pAdminEdit_domain_maxquota}:</td>
<td><input class="flat" type="text" name="fMaxquota" value="{$tMaxquota}" /></td>
<td>{$PALANG.pAdminEdit_domain_maxquota_text}</td>
</tr>
{/if}
{if $CONF.transport===YES}
<tr>
<td>{$PALANG.pAdminEdit_domain_transport}:</td>
<td><select class="flat" name="fTransport">{$select_options}</select></td>
<td>{$PALANG.pAdminEdit_domain_transport_text}</td>
</tr>
{/if}
<tr>
<td>{$PALANG.pAdminEdit_domain_backupmx}:</td>
<td><input class="flat" type="checkbox" name="fBackupmx"{$tBackupmx}/></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>{$PALANG.pAdminEdit_domain_active}:</td>
<td><input class="flat" type="checkbox" name="fActive"{$tActive}/></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3" class="hlp_center"><input type="submit" class="button" name="submit" value="{$PALANG.save}" /></td>
</tr>
<tr>
<td colspan="3" class="standout">{$tMessage}</td>
</tr>
</table>
</form>
</div>