summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/forms/profile.html
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/ishtar/forms/profile.html')
-rw-r--r--ishtar_common/templates/ishtar/forms/profile.html51
1 files changed, 51 insertions, 0 deletions
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 %}
+<script type='text/javascript'>
+var base_profile_url = "{% url 'profile' %}";
+$(document).ready(function(){
+ $("#id_current_profile").change(function(){
+ var profile_id = $("#id_current_profile option:selected").val();
+ window.location.href = base_profile_url + profile_id + "/";
+ });
+});
+</script>
+{% endblock %}
+
+{% block content %}
+<h2>{{page_name}}</h2>
+<div class='form'>
+
+ {% if form.non_field_errors %}
+ <div class="alert alert-danger" role="alert">
+ {{form.non_field_errors}}
+ </div>
+ {% endif %}
+
+ {% for hidden in form.hidden_fields %}
+ {{hidden}}
+ {% if hidden.errors %}<div class="invalid-feedback">
+ {{ hidden.errors }}
+ </div>{% endif %}
+ {% endfor %}
+
+ <div class="form-row">
+ {% for field in form.visible_fields %}
+ {% if forloop.counter0 == 0 %}
+ <div class="form-group col-lg-12">
+ {{field|safe}}
+ </div>
+ </div>
+ <div class="form-row">
+ {% elif field.name == 'delete_profile' %}
+ </div>
+ <div class="form-row col-lg-6 alert alert-danger">
+ {% include "blocks/bs_field_snippet.html" %}
+ {% else %}
+ {% include "blocks/bs_field_snippet.html" %}
+ {% endif %}
+ {% endfor %}
+ </div>
+</div>
+{% endblock %}
+