From 599742b3e351e585c4917a49c1b1ef42c1f56ffe Mon Sep 17 00:00:00 2001 From: shagi Date: Tue, 29 Dec 2020 19:07:21 +0100 Subject: [PATCH] add missing templates --- gas/templates/gas/tags/forms/checkbox.html | 12 ++++++++++++ gas/templates/gas/tags/forms/errors.html | 14 ++++++++++++++ gas/templates/gas/tags/forms/field.html | 17 +++++++++++++++++ gas/templates/gas/tags/navigation.html | 18 ++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 gas/templates/gas/tags/forms/checkbox.html create mode 100644 gas/templates/gas/tags/forms/errors.html create mode 100644 gas/templates/gas/tags/forms/field.html create mode 100644 gas/templates/gas/tags/navigation.html diff --git a/gas/templates/gas/tags/forms/checkbox.html b/gas/templates/gas/tags/forms/checkbox.html new file mode 100644 index 0000000..9cac537 --- /dev/null +++ b/gas/templates/gas/tags/forms/checkbox.html @@ -0,0 +1,12 @@ +
+ + {% if field.errors %}{{ field.errors }}{% endif %} + {% if field.help_text %}

{{ field.help_text }}

{% endif %} +
diff --git a/gas/templates/gas/tags/forms/errors.html b/gas/templates/gas/tags/forms/errors.html new file mode 100644 index 0000000..f4eb242 --- /dev/null +++ b/gas/templates/gas/tags/forms/errors.html @@ -0,0 +1,14 @@ +{% load i18n %} +{% if form.errors %} +
+ {% for error in form.non_field_errors %} +
{{ error|striptags }}
+ {% endfor %} + {% for field in form %} + {% if field.errors %} +
{{ field.label }}
+
{{ field.errors|striptags }}
+ {% endif %} + {% endfor %} +
+{% endif %} diff --git a/gas/templates/gas/tags/forms/field.html b/gas/templates/gas/tags/forms/field.html new file mode 100644 index 0000000..9d7306c --- /dev/null +++ b/gas/templates/gas/tags/forms/field.html @@ -0,0 +1,17 @@ +{% load form_tags %} +
+ + {% add_widget_attrs field placeholder=field.label %} + {{ field }} + + {% if add_another_url %} + + {% endif %} + + {% if field.help_text %}
{{ field.help_text|safe }}
{% endif %} + {% if field.errors %}{{ field.errors }}{% endif %} +
diff --git a/gas/templates/gas/tags/navigation.html b/gas/templates/gas/tags/navigation.html new file mode 100644 index 0000000..24941db --- /dev/null +++ b/gas/templates/gas/tags/navigation.html @@ -0,0 +1,18 @@ +{% load gas_tags %} + +{% for entry in menu %} +
  • + {% if entry.url %} + {{ entry.label }} + {% else %} + {{ entry.label }} + {% endif %} + {% with children=entry|get_children:user_roles %} + {% if children %} + + {% endif %} + {% endwith %} +
  • +{% endfor %}