Exemple #1
0
def view_notifications(service_id, message_type=None):
    return render_template(
        'views/notifications.html',
        partials=get_notifications(service_id, message_type),
        message_type=message_type,
        status=request.args.get('status') or 'sending,delivered,failed',
        page=request.args.get('page', 1),
        search_form=SearchNotificationsForm(
            message_type=message_type,
            to=request.form.get('to'),
        ),
        things_you_can_search_by={
            'email': ['email address'],
            'sms': ['phone number'],
            'letter': ['postal address', 'file name'],
            # We say recipient here because combining all 3 types, plus
            # reference gets too long for the hint text
            None: ['recipient'],
        }.get(message_type) + {
            True: ['reference'],
            False: [],
        }.get(bool(current_service.api_keys)),
        download_link=url_for('.download_notifications_csv',
                              service_id=current_service.id,
                              message_type=message_type,
                              status=request.args.get('status')))
Exemple #2
0
def view_notifications(service_id, message_type):
    return render_template(
        'views/notifications.html',
        partials=get_notifications(service_id, message_type),
        message_type=message_type,
        status=request.args.get('status') or 'sending,delivered,failed',
        page=request.args.get('page', 1),
        to=request.form.get('to', ''),
        search_form=SearchNotificationsForm(to=request.form.get('to', '')),
    )
def view_notifications(service_id, message_type=None):
    return render_template(
        'views/notifications.html',
        partials=get_notifications(service_id, message_type),
        message_type=message_type,
        status=request.args.get('status') or 'sending,delivered,failed',
        page=request.args.get('page', 1),
        to=request.form.get('to', ''),
        search_form=SearchNotificationsForm(
            message_type=message_type,
            to=request.form.get('to', ''),
        ),
        download_link=url_for('.download_notifications_csv',
                              service_id=current_service.id,
                              message_type=message_type,
                              status=request.args.get('status')))
Exemple #4
0
def view_notifications(service_id, message_type=None):
    return render_template(
        "views/notifications.html",
        partials=get_notifications(service_id, message_type),
        message_type=message_type,
        status=request.args.get("status") or "sending,delivered,failed",
        page=request.args.get("page", 1),
        to=request.form.get("to", ""),
        search_form=SearchNotificationsForm(
            message_type=message_type,
            to=request.form.get("to", ""),
        ),
        download_link=url_for(
            ".download_notifications_csv",
            service_id=current_service.id,
            message_type=message_type,
            status=request.args.get("status"),
        ),
    )