{% extends "generic/_base.html" %} {% load form_helpers %} {% load helpers %} {% load i18n %} {% load tabs %} {% comment %} Run page for one Script. Renders the form the script's own class declares, grouped by the fieldsets that class resolves, or the reason there is no form to render. `form.object-edit` centres the form and caps its width, so it needs no grid column of its own. Context: - object: The Script - form: Its run form, or None - instance: The loaded script class instance, which owns the fieldset layout - reason: Why there is no form, or None {% endcomment %} {# Mirrors generic/object.html, which this page cannot extend because it renders a form #} {% block page-header %}
{{ object.full_name }}
{{ block.super }} {% endblock page-header %} {% block tabs %} {% endblock tabs %} {% block title %} {{ object }} {% endblock title %} {% block subtitle %} {% if object.description %}
{{ object.description|linebreaks }}
{% endif %} {% endblock subtitle %} {% block content %} {% if reason %} {% trans "Back" %} {% else %}
{% csrf_token %} {% render_errors form %} {% for group, fields in instance.get_fieldsets %} {% if fields %}

{{ group }}

{% for name in fields %} {% with field=form|getfield:name %} {% render_field field %} {% endwith %} {% endfor %}
{% endif %} {% endfor %}
{% endif %} {% endblock content %}