diff --git a/src/newsreader/templates/form/errors.html b/src/newsreader/templates/form/errors.html new file mode 100644 index 0000000..bf030ea --- /dev/null +++ b/src/newsreader/templates/form/errors.html @@ -0,0 +1,3 @@ +
+ {{ form.non_field_errors }} +
diff --git a/src/newsreader/templates/form.html b/src/newsreader/templates/form/form.html similarity index 76% rename from src/newsreader/templates/form.html rename to src/newsreader/templates/form/form.html index eb9ff03..5b8f2fa 100644 --- a/src/newsreader/templates/form.html +++ b/src/newsreader/templates/form/form.html @@ -4,20 +4,16 @@ {% csrf_token %} {% if form.non_field_errors %} -
- {{ form.non_field_errors }} -
+ {% include "form/errors.html" title=title %} {% endif %} {% if title %} -
-

{{ title }}

-
+ {% include "form/title.html" title=title %} {% endif %}
{% for field in form %} -
+
@@ -30,7 +26,7 @@
-
+
{% if cancel_url %} {% trans "Cancel" %} {% endif %} diff --git a/src/newsreader/templates/form/title.html b/src/newsreader/templates/form/title.html new file mode 100644 index 0000000..3adcb75 --- /dev/null +++ b/src/newsreader/templates/form/title.html @@ -0,0 +1,3 @@ +
+

{{ title }}

+