1 {%extends
"base/page.html"%}
3 {%block title%}{{operation|default:
"Edit"}} {{formitemtype}}{%endblock%}
5 {%block pre_form_header%}{%endblock%}
6 <h1>{% if formtitle %}{{ formtitle|safe }}{% else %}{{operation|default:
"Edit"}} {{formitemtype}}{% endif %}
</h1>
13 <form class=
"form-horizontal" method=
"post" action=
".">{%if not nocsrf%}{% csrf_token %}{%endif%}
15 <div class=
"alert alert-danger">
16 Please correct the errors below, and re-submit the form.
19 {% for field in form %}
20 {% if field.is_hidden %}
22 {% else %}{# not field.is_hidden #}
23 {% if not field|ischeckbox %}
24 <div class=
"form-group">
25 {{field|label_class:
"control-label col-lg-12"}}
26 <div class=
"col-lg-12 controls">
28 {% for e in field.errors %}
29 <div class=
"alert alert-danger">{{e}}
</div>
32 {{field|field_class:
"form-control"}}
33 {%if field.help_text%}
34 <small>{{field.help_text|safe}}
</small>
38 {% else %}{# field|ischeckbox #}
39 <div class=
"form-group"{%if field|ismultiplecheckboxes%}
data-cbtitles=
"{{described_checkboxes|dictlookup:field.name|json}}"{%endif%}
>
40 <div class=
"col-lg-12 {%if field|isrequired_error%} alert alert-danger{%endif%}">
41 {% if not field|ismultiplecheckboxes %}
42 <div class=
"form-check">
44 <label for=
"{{ field.id_for_label }}" class=
"form-check-label">
47 {%if field.help_text%}
48 <small class=
"form-text text-muted">{{field.help_text|safe}}
</small>
52 {{ field.label_tag }} {{field.help_text|safe}}
54 <div class=
"form-check">
56 <label for=
"{{ cb.id_for_label }}" class=
"form-check-label">{{ cb.choice_label }}
</label>
61 {% if field.errors and not field|isrequired_error %}
62 {% for e in field.errors %}
63 <div class=
"alert alert-danger">{{e}}
</div>
70 <button type=
"submit" class=
"btn btn-primary">{{savebutton|default:
"Save"}}
</button>
72 {%block post_form%}{%endblock%}
77 <link rel=
"stylesheet" type=
"text/css" href=
"/media/css/showdown_preview.css" />
81 <script type=
"text/javascript" src=
"/media/showdown/showdown.js"></script>
82 <script type=
"text/javascript" src=
"/media/js/showdown_preview.js"></script>
83 <script type=
"text/javascript" src=
"/media/js/forms.js"></script>
85 <script type=
"text/javascript" src=
"https://www.google.com/recaptcha/api.js?hl=en" async defer
></script>