{# SPDX-FileCopyrightText: 2015-2018 CERN. SPDX-License-Identifier: MIT #} {% macro render_field(field, icon="", placeholder='', autofocus=False) %}
{%- set extras = dict(autofocus="") if autofocus else dict() %} {{field(class_="form-control", placeholder=placeholder or _(field.label.text | string), **extras)}} {%- if icon %} {%- endif%}
{% endmacro %} {% macro oauth_button(name, next=None) %} {%- set remote_app = config.OAUTHCLIENT_REMOTE_APPS[name] %} {%- if remote_app.get('icon_image') %} {%- else %} {%- endif %} {{ _('Sign in with %(title)s', title=remote_app['title']) }} {% endmacro %}