Source

iredadmin-ose / templates / default / ldap / user_create.html

Full commit
{#
#---------------------------------------------------------------------
# This file is part of iRedAdmin-OSE, which is official web-based admin
# panel (Open Source Edition) for iRedMail.
#
# iRedMail is an open source mail server solution for Red Hat(R)
# Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedAdmin-OSE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedAdmin-OSE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedAdmin-OSE.  If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------
#}

{# allDomains, domain, default_quota, [username, newpw, confirmpw, ] #}
{% extends "layout.html" %}

{% from "macros.html" import display_cn,
        display_password_policy,
        display_reset_password,
        display_quota,
        with context
        %}
{% from "msgHandlers.html" import userMsgHandler with context %}

{% block js %}{% endblock js %}
{% block js_tablesorter %}{% endblock %}
{% block jquery_docoment_ready %} {% endblock %}
{% block submenu %}{% endblock submenu %}

{% block title %}{{ _('Create new mail user') }}{% endblock title %}
{% block navlinks_active_users %}active{% endblock %}

{% block main %}
<div class="main-subhead">
    <h2 class="hn"><span>{{ _('Create new mail user') }}</span></h2>
</div>

{# Show system message #}
{{ userMsgHandler(msg) }}

{# Display input field for adding new user. #}
<div class="main-frm">
    <form class="frm-form" method="post" action="{{ctx.homepath}}/create/user">
 
    {{ display_password_policy(
            min_passwd_length=min_passwd_length,
            max_passwd_length=max_passwd_length)
            }}

    <fieldset class="frm-group group1">
        <div class="sf-set set1">
            <div class="sf-box text required">
                <label><span>{{ _('Mail Address') }} <em>{{ _('(Required)') }}</em></span></label>
                <span class="fld-input"><input type="text" size="25" name="username" value="{{username}}" />@
                    <select name="domainName">
                        {% for d in allDomains %}
                            <option value="{{d[1].domainName[0]}}" {% if d[1].domainName[0] == domain %}selected{%endif%}>{{d[1].domainName[0]}}</option>
                        {% endfor %}
                    </select>
                </span>
            </div>
        </div>
    </fieldset>

    {{ display_cn(value=cn, accountType='user') }}

    {{ display_quota(
            value=default_quota,
            show_quota_in_input='yes',
            display_current_value='no',
            firstitem='no')
            }}

    {{ display_reset_password(firstitem='no') }}

    <div class="frm-buttons">
        <span class="submit">
            <input type="submit" value="{{ _('Create') }}" />
        </span>
    </div>

</form>
</div>

{% endblock main %}