% if request.is_xhr:
${_('Add Sender to a list')}
<% alertmap = {'error': 'error', 'success': 'success', 'notice': 'info'} iconmap = {'error': 'remove', 'success': 'ok', 'notice': 'ok'} messages = h.flash.pop_messages() if not messages and hasattr(c, 'form') and 'csrf_token' in c.form.errors: message = c.form.errors.pop('csrf_token')[0] msg = h.Msg('error', message) messages.append(msg) %> % if messages:
${messages[0]}
% endif ${h.form(url(controller='lists', action='new'), id="list-form", method='post')} <%include file="../forms/ajaxformbase.html"/>
${h.checkbox('iptoggle', label=_('Use IP address'))}
${h.checkbox('domaintoggle', label=_('Use Domain'))}
${h.end_form()}
% else:

${_('Add sender to a list')}

${h.form(url(controller='lists', action='new'), id="list-form", method='post')} <%include file="../forms/base.html"/>
${h.end_form()}
% endif <%def name="title()"> ${_('Lists :: Add to list')} <%def name="heading()"> ${_('Lists :: Add to List')} <%def name="submenu()"> <%def name="headers()"> <%def name="localscripts()"> <%inherit file="${None if context.get('c').is_ajax else '../base.html'}"/>