2018-01-12 21:35:25 +00:00
{% extends "admin/base_site.html" %}
2018-01-14 23:38:14 +00:00
{% load model_names %}
2018-01-12 21:35:25 +00:00
{% block content %}
< form action = "" method = "post" >
{% csrf_token %}
2018-01-14 23:38:14 +00:00
{{ item_formset.management_form }}
2018-01-12 21:35:25 +00:00
< table >
< thead >
< tr >
< th colspan = "2" >
2018-01-14 23:38:14 +00:00
< p > Select up to ten {% model_name_plural child_model %} to {% if is_removal %}remove from{% else %}add to{% endif %} the {% model_name_plural parent_model %} below:< / p >
2018-01-12 21:35:25 +00:00
< / th >
< / tr >
< / thead >
2018-01-14 23:38:14 +00:00
{% for form in item_formset %}
2018-01-12 21:35:25 +00:00
{{ form }}
{% endfor %}
< / table >
< table >
< thead >
< tr >
< th >
2018-01-14 23:38:14 +00:00
< p > {% filter capfirst %}{% model_name_plural child_model %}{% endfilter %} will be {% if is_removal %}removed from{% else %}added to{% endif %} the following {% model_name_plural parent_model %}:< / p >
2018-01-12 21:35:25 +00:00
< / th >
< / tr >
< / thead >
< tbody >
2018-01-14 23:38:14 +00:00
{% for parent in parent_queryset %}
2018-01-12 21:35:25 +00:00
< tr >
< th >
2018-01-14 23:38:14 +00:00
{{ parent }}
< input type = "hidden" name = "_selected_action" value = "{{ parent.pk }}" / >
2018-01-12 21:35:25 +00:00
< / th >
< / tr >
{% endfor %}
< / tbody >
< / table >
2018-01-14 23:38:14 +00:00
< input type = "hidden" name = "action" value = "{{ calling_function }}" / >
2018-01-13 05:39:13 +00:00
< input type = "hidden" name = "removal" value = "{{ is_removal }}" / >
2018-01-12 21:35:25 +00:00
< a href = "./" > < input type = "button" name = "Cancel" value = "Cancel" > < / a >
2018-01-14 23:38:14 +00:00
< input type = "submit" name = "apply" value = "{% if is_removal %}Remove{% else %}Add{% endif %} {% filter capfirst %}{% model_name_plural child_model %}{% endfilter %}" / >
2018-01-12 21:35:25 +00:00
< / form >
{% endblock %}