{% extends "base.html" %} {% comment %}This view is used to edit a ``mtp.apps.surveys.Survey`` instance. As surveys are automatically generated, this is only to to dsplay the pools and manage their ``is_displayed`` flags. Context ------- survey : instance of ``mtp.apps.surveys.models.Survey`` The survey for which we display the polss. form : instance of ``django.forms.models.ModelForm`` The form to edit the survey. Does not include any editable fields. pools_formset : instance of ``mtp.apps.surveys.forms.SurveyPoolsFormSet`` The editable list of pools for the current survey. pool_forms : list A list of two entries, each one being a tuple with:: - a boolean indicating if the current entry is related to global pools or not - an extract of ``pools_formset`` containing only global or non global pools Notes ----- The list of pools is currently two lists, one with the global pools, one with the ones owned by the user. {% endcomment %} {% load i18n %} {% block body_class %}{{ block.super }} page-cms-surveys page-cms-surveys-surveys{% endblock %} {% block subtitle %} {% blocktrans trimmed with training_name=survey.training.name %} Edit the survey for the training "{{ training_name }}" {% endblocktrans %} {% endblock %} {% block actions %} {% trans 'Back to the training' %} {% trans 'Back to your pools' %} {% endblock %} {% block main %} {% if form.errors or pools_formset.errors %}