{% from 'forms/_form.html' import form_header, form_footer, form_rows, form_fieldset %}

{%- block content %}
    {{ form_header(form) }}
    {% if can_manage %}
        {{ form_rows(form, skip=('references', 'code')) }}
        {% call form_fieldset(_('Advanced'), collapsible=true) %}
            {{ form_rows(form, fields=('references', 'code')) }}
        {% endcall %}
    {% else %}
        {{ form_rows(form, fields=form._submitter_editable_fields) }}
    {% endif %}
    {% call form_footer(form) %}
        <input class="i-button big highlight" type="submit" value="{% trans %}Save{% endtrans %}" data-disabled-until-change>
        <button type="button" class="i-button big" data-button-back>{% trans %}Cancel{% endtrans %}</button>
    {% endcall %}
{% endblock %}
