From 1dc2eb2ebc5a837d745358620f1dfd35544632ac Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 May 2018 16:58:42 +0200 Subject: User profile form: duplicate, delete and edit --- ishtar_common/templates/ishtar/forms/profile.html | 51 ++++++++++++++++++++++ .../templates/ishtar/wizard/default_wizard.html | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 ishtar_common/templates/ishtar/forms/profile.html (limited to 'ishtar_common/templates/ishtar') diff --git a/ishtar_common/templates/ishtar/forms/profile.html b/ishtar_common/templates/ishtar/forms/profile.html new file mode 100644 index 000000000..02f50be7b --- /dev/null +++ b/ishtar_common/templates/ishtar/forms/profile.html @@ -0,0 +1,51 @@ +{% extends "ishtar/form.html" %} +{% load i18n inline_formset table_form %} +{% block extra_head %} + +{% endblock %} + +{% block content %} +

{{page_name}}

+
+ + {% if form.non_field_errors %} + + {% endif %} + + {% for hidden in form.hidden_fields %} + {{hidden}} + {% if hidden.errors %}
+ {{ hidden.errors }} +
{% endif %} + {% endfor %} + +
+ {% for field in form.visible_fields %} + {% if forloop.counter0 == 0 %} +
+ {{field|safe}} +
+
+
+ {% elif field.name == 'delete_profile' %} +
+
+ {% include "blocks/bs_field_snippet.html" %} + {% else %} + {% include "blocks/bs_field_snippet.html" %} + {% endif %} + {% endfor %} +
+
+{% endblock %} + diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index a7a705f59..6707124f9 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -25,7 +25,7 @@ {% endif %} {% for formsetform in wizard.form.forms %} - {% bs_form formsetform %} + {% bs_form formsetform forloop.counter0 %} {% endfor %}