Source

iredadmin-ose / templates / default / ldap / msgHandlers.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/>.
#---------------------------------------------------------------------
#}

{% macro domainMsgHandler(msg=none) -%}
{% if msg is defined and msg is not sameas none %}
    <div class="ct-box info-box">
        {% if msg == 'DOMAIN_CREATED_SUCCESS' %}
            <div class='success'>{{ _('Domain was created.') }}</div>
        {% elif msg == 'DOMAIN_PROFILE_UPDATED_SUCCESS' %}
            <div class="success">{{ _('Profile update success.') }}</div>
        {% elif msg == 'DOMAIN_DELETED_SUCCESS' %}
            <div class="success">{{ _('Selected domains were deleted.') }}</div>
        {% elif msg == 'DOMAIN_DISABLED_SUCCESS' %}
            <div class="success">{{ _('Selected domains were diabled.') }}</div>
        {% elif msg == 'DOMAIN_ENABLED_SUCCESS' %}
            <div class="success">{{ _('Selected domains were enabled.') }}</div>

        {# Error handler #}
        {% elif msg == 'EMPTY_DOMAIN' %}
            <div class="error">{{ _('Domain name is empty.') }}</div>
        {% elif msg == 'SIZELIMIT_EXCEEDED' %}
            <div class="error">{{ _('Server-side size limit exceeded.') }}</div>
        {% elif msg == 'PERMISSION_DENIED' %}
            <div class="error">{{ _('Permission denied.') }}</div>
        {% elif msg == 'NO_SUCH_OBJECT' %}
            <div class="error">{{ _('No such domain.') }}</div>
        {% elif msg == 'INCORRECT_PROFILE_TYPE' %}
            <div class="error">{{ _('Incorrect profile type.') }}</div>
        {% elif msg == 'DOMAIN_NAME_MISMATCH' %}
            <div class="error">{{ _('Submited domain name is incorrect.') }}</div>
        {% else %}
            {# Catch-all #}
            <div class="warning">{{msg}}</div>
        {% endif %}
    </div>
{% endif %}
{%- endmacro %}

{#
{% macro domainMsgHandler(msg) -%}
{%- endmacro %}

{% macro domainMsgHandler(msg) -%}
{%- endmacro %}

{% macro domainMsgHandler(msg) -%}
{%- endmacro %}

{% macro domainMsgHandler(msg) -%}
{%- endmacro %}
#}