From 407a67d83cc4dc72e5b18cd0d484687ea4fd79a0 Mon Sep 17 00:00:00 2001 From: fefa4ka Date: Sun, 24 Jan 2016 14:27:02 +0300 Subject: [PATCH] Form Just Field Template --- app/settings.py | 1 + .../templates/form_template/just_fields.html | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 zsite/templates/form_template/just_fields.html diff --git a/app/settings.py b/app/settings.py index c6c02af..c21af58 100644 --- a/app/settings.py +++ b/app/settings.py @@ -348,6 +348,7 @@ CMS_TEMPLATES = ( DJANGOCMS_FORMS_TEMPLATES = ( ('djangocms_forms/form_template/default.html', 'Default'), ('form_template/consultation.html', 'Consultation'), + ('form_template/just_fields.html', 'Just Fields'), ('form_template/order_modal.html', 'Order Modal'), ('form_template/product_class.html', 'Trademark Product Class'), ) diff --git a/zsite/templates/form_template/just_fields.html b/zsite/templates/form_template/just_fields.html new file mode 100644 index 0000000..d44d32a --- /dev/null +++ b/zsite/templates/form_template/just_fields.html @@ -0,0 +1,37 @@ +{% load cms_tags djangocms_forms_tags i18n sekizai_tags staticfiles %} + +
+ {% if instance.title %} +

{{ instance.title }}

+ {% endif %} + {% if instance.description %} +
+ {{ instance.description|safe }} +
+ {% endif %} +
+ + {% for field in form.visible_fields %} +
+ + {% if field|is_checkbox %} + {{ field }} + {% endif %} + + {% if field|is_textarea or field|is_radioselect %} +
{{ field.help_text|safe }}
+ {% endif %} + {% if not field|is_checkbox %} +

{{ field }}

+ {% endif %} + + {% if not field|is_textarea and not field|is_radioselect %} +
{{ field.help_text|safe }}
+ {% endif %} +
+ {% endfor %} +
+ +