{# @allDomains LDAP query result set @domain Current domain name. @domainAccountSetting @numberOfCurrentAccounts @[msg,] #} {% extends "layout.html" %} {% from "macros/general.html" import display_subnav, display_input_cn, with context %} {% from "macros/msgHandlers.html" import maillistMsgHandler with context %} {% block title %}{{ _('Add mail list') }}{% endblock title %} {% block navlinks_active_create %}class="active"{% endblock %} {% block breadcrumb %} {% set crumbs = [ (ctx.homepath + '/domains', _('All domains'),), (ctx.homepath + '/profile/domain/general/' + cur_domain, cur_domain,), (ctx.homepath + '/maillists/' + cur_domain, _('Mail Lists'),), (None, _('Add mail list'),), ] %} {{ display_subnav(crumbs) }} {% endblock %} {% block main %} {# Show system message #} {{ maillistMsgHandler(msg) }} {# Number of accounts #} {% set numberOfAccounts = domainAccountSetting.get('numberOfLists', '0') %} {# Display input field for adding new maillist. #}
{% set createNewAccount = true %} {% if numberOfAccounts != '0' %} {% if numberOfCurrentAccounts >= numberOfAccounts |int %} {% set createNewAccount = false %}

{{ _('Error:') }} {{ _("You can't create more mail lists under domain %s.") |format('' + cur_domain + '') }} {{ _('Already exceed max number of account limit (%s).') |format(numberOfAccounts) }}

{% else %}

{{ _('You can create %d more mail list(s) under domain %s.') |format(numberOfAccounts |int - numberOfCurrentAccounts, '' + cur_domain + '') }}

{% endif %} {% endif %}

{{ _('Mail Address') }} *

@
{{ display_input_cn(cn=cn, accountType='maillist', size="size-170") }}

 

{# -- End box-wrap -- #}
{# -- End content-box -- #}
{# -- End box-body -- #} {% endblock main %}