{# -*- coding: utf-8 -*- Copyright (C) 2015-2018 CERN. Copyright (C) 2021-2022 TU Wien. 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="", placeholder='', autofocus=False, disabled=False) -%}
{{ field.label }} {%- set extras = dict(autofocus="") if autofocus else dict() %} {{ field(class_="form-control", disabled=disabled, placeholder=placeholder, **extras) }} {%- if icon %} {%- endif %} {%- if field.errors %} {%- endif %}
{%- endmacro %}