Source

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

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

{% from "macros.html" import display_cn,
        display_password_policy,
        display_reset_password,
        display_quota, %}

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

{# message #}
{% if msg is defined and msg is not sameas none %}
<div class="ct-box info-box">
    <div class="error">
        {% if msg == 'ALREADY_EXISTS' %}
            {{ _('Account already exists, please choose another username.') }}
        {% elif msg == 'PW_MISMATCH' %}
            {{ _('New passwords are not match.') }}
        {% elif msg == 'PW_EMPTY' %}
            {{ _('EMPTY password is NOT allowed.') }}
        {% elif msg == 'PW_LESS_THAN_MIN_LENGTH' %}
            {{ _('New password must contain at least %s characters.') |format(min_passwd_length) }}
        {% elif msg == 'PW_GREATER_THAN_MAX_LENGTH' %}
            {{ _('New password must NOT contain more than %s characters.') |format(max_passwd_length) }}
        {% else %}
            {{ msg }}
        {% endif %}
    </div>
</div>
{% endif %}

{# 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 %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.