{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2015-2018 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {% macro render_field(field, icon="", autofocus=False, errormsg=True, size="form-group-lg") %}
{%- set extras = dict(autofocus="") if autofocus else dict() %} {{field(class_="form-control", placeholder=_(field.label.text | string), **extras)}} {%- if icon %} {%- endif%}
{%- if field.errors and errormsg %} {%- endif %} {% endmacro %} {% macro form_errors(form) %} {%- if form.errors %} {%- endif %} {% endmacro %}