{% extends "advbase.html" %}

{% block bodytag -%}
<body class="advwhitelist">
{% endblock -%}

{% block advcontent -%}
<form class="pure-form pure-form-aligned" action="" method="POST">
    <fieldset>
        <legend><h3>{{_("White List")}}</h3></legend>
        <p>
            <small>{{_("mail sent to %sxxx@<em>appid</em>.appspotmail.com will be transfered to your email.")|format('' if user.name=="admin" else user.name+"__")}}</small>
        </p>
        <div class="box-list">
            {% if user.whitelist.count() -%}
                {%- for lst in user.whitelist -%}
                    <div class="box">
                        {{ lst.mail }}
                        <div class="cornerControls">
                            <a href="/advdel?delwlist={{ lst.key().id() }}" class="actionButton">{{ _("Delete") }}</a>
                        </div>
                    </div>
                {%- endfor -%}
            {%- endif %}
            <div class="box">
                <input type="text" name="wlist" placeholder="{{ _('Please input mail address') }}" class="pure-input-1" />
                <div class="cornerControls">
                    <input type="submit" value="{{ _('Add') }}" class="actionButton add" />
                </div>
            </div>
        </div>
    </fieldset>    
</form>
{% endblock -%}