summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-10-10 13:42:18 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-10-14 16:48:37 +0200
commit435797a54e4d322a46711f303c2fc1fd5286330e (patch)
tree7c209135a17fe9b12fa2e2e844f345debed45d97 /ishtar_common/templates
parent69df0a88eeaafeee81d76a3307e79fe5cad8ecf8 (diff)
downloadIshtar-435797a54e4d322a46711f303c2fc1fd5286330e.tar.bz2
Ishtar-435797a54e4d322a46711f303c2fc1fd5286330e.zip
✨ site and operation relations forms refactoring
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/blocks/bs_alert_message.html4
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_nav.html4
-rw-r--r--ishtar_common/templates/ishtar/forms/modify_relations.html9
3 files changed, 15 insertions, 2 deletions
diff --git a/ishtar_common/templates/blocks/bs_alert_message.html b/ishtar_common/templates/blocks/bs_alert_message.html
new file mode 100644
index 000000000..b0b5241a7
--- /dev/null
+++ b/ishtar_common/templates/blocks/bs_alert_message.html
@@ -0,0 +1,4 @@
+<div class="alert alert-info alert-dismissible fade show" role="alert">
+ <i class="fa fa-info" aria-hidden="true"></i>&nbsp;&nbsp;{{alert_message}}
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
+</div>
diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html
index e3ed13f97..63aafb93a 100644
--- a/ishtar_common/templates/ishtar/blocks/window_nav.html
+++ b/ishtar_common/templates/ishtar/blocks/window_nav.html
@@ -2,6 +2,8 @@
<script type="text/javascript">{% localize off %}
var current_url_{{window_id_underscore}};
var reload_window_{{window_id_underscore}} = function() {
+ /* reload put the sheet at the end of list - force other to be close in order to not loose the current sheet */
+ $(".sheet > .collapse").removeClass("show");
load_window(current_url_{{window_id_underscore}},
'', function(){hide_window("{{window_id}}");},
true);
@@ -126,4 +128,4 @@ $(document).ready(function(){
</script>
{% else %}
<h3 class="external-source"><i class="fa fa-globe" aria-hidden="true"></i> {{item.current_source}}</h3>
-{% endif %} \ No newline at end of file
+{% endif %}
diff --git a/ishtar_common/templates/ishtar/forms/modify_relations.html b/ishtar_common/templates/ishtar/forms/modify_relations.html
index 1dcf02b0c..419d94c9a 100644
--- a/ishtar_common/templates/ishtar/forms/modify_relations.html
+++ b/ishtar_common/templates/ishtar/forms/modify_relations.html
@@ -12,6 +12,10 @@
{{ formset.management_form }}
{% csrf_token %}
<div class="modal-body body-scroll">
+ {% if excess %}
+ {% with alert_message=excess %}
+ {% include "blocks/bs_alert_message.html" %}
+ {% endwith %}{% endif %}
<div class='form'>
{% block main_form %}
<table class='w-100 inline-table text-center'>
@@ -52,7 +56,10 @@
qa_action_register("{{url}}");
$(document).on("click", '.check-all-relations', function(){
$('input[id$="-DELETE"]:checkbox').prop('checked', $(this).is(':checked'));
- });
+ });{% if window_id %}
+ console.log("{{window_id}}");
+ modal_on_close["modal-dynamic-form"] = reload_window_{{window_id}};
+ {% endif %}
{% block js_ready %}
{% endblock %}
});