{# # This file is part of Invenio. # Copyright (C) 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {% macro form_action_bar(margin="") -%}{% block form_action_bar scoped %} {% include "deposit/run_action_bar.html" %} {% endblock %}{%- endmacro %} {%- macro form_group_accordion_start(group, idx) -%} {% include "deposit/run_group_start.html" %} {%- endmacro -%} {%- macro form_group_accordion_end(group, idx) -%} {% include "deposit/run_group_end.html" %} {%- endmacro -%} {%- macro field_label(thisfield) -%} {% include "deposit/run_field_label.html" %} {%- endmacro -%} {%- macro field_display(thisfield, field_size=None, field_class="form-control", container_class="form-group") -%} {%- set field_size = field_size if field_size else (form.field_sizes.get(thisfield.name) if form.field_sizes else none) -%} {%- set field_kwargs = kwargs -%} {% include "deposit/run_field.html" %} {%- endmacro -%} {%- macro field_display_subform(thisfield) -%} {% include "deposit/run_field_subform.html" %} {%- endmacro -%}
{% block form_header scoped %}{{ form_action_bar() }}{% endblock form_header%} {% block form_title scoped %}

{{ form._title }}

{% if form._subtitle %}

{{ form._subtitle|safe }}

{% endif %} {% endblock form_title %} {% block form_body scoped %} {% for group, fields in form.get_groups() %} {% set grouploop = loop %} {% block form_group scoped %} {% if grouploop.first %}
{% endif %}
{% block form_group_header scoped %} {% if group %} {{ form_group_accordion_start(group, grouploop.index) }} {% endif %} {% endblock %} {% block form_group_body scoped %} {% if group and group.meta.description %}

{{ group.meta.description|urlize }}

{% endif %} {% block fieldset scoped %} {% for field in fields %} {% block field_body scoped %} {{ field_display(field, field_class="") }} {% endblock field_body %} {% endfor %} {% endblock fieldset %} {% endblock form_group_body%} {% block form_group_footer scoped %} {% if group %} {{ form_group_accordion_end(group, grouploop.index) }} {% endif %} {% endblock form_group_footer %}
{% if grouploop.last %}
{% endif %} {% endblock form_group %} {% endfor %} {% endblock form_body %} {% block form_footer scoped %}
{{ form_action_bar() }}
{% endblock form_footer %}