summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-07-29 19:02:32 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commit12fd2be76304653e91fc17390e18e73b6015abb1 (patch)
tree4c907874e3641083d0175ae785dfc23f4c99e666 /ishtar_common
parent4b7bee9c426b99de56d496f20d0de604d62af899 (diff)
downloadIshtar-12fd2be76304653e91fc17390e18e73b6015abb1.tar.bz2
Ishtar-12fd2be76304653e91fc17390e18e73b6015abb1.zip
Preventive file: work on inlines - 3
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/static/js/ishtar.js1
-rw-r--r--ishtar_common/templates/blocks/bs_formset_snippet.html6
2 files changed, 3 insertions, 4 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js
index 3fa293deb..0fa058cca 100644
--- a/ishtar_common/static/js/ishtar.js
+++ b/ishtar_common/static/js/ishtar.js
@@ -1890,7 +1890,6 @@ var inline_register_add_button = function(slug){
let form_regex_var = slug + '(\\d){1}-';
let form_regex = new RegExp(form_regex_var, 'g');
inline_form_num++;
- console.log(new_form);
new_form.innerHTML = new_form.innerHTML.replace(
form_regex, slug + `-${inline_form_num}-`);
inline_container.insertBefore(new_form, inline_div_add_button);
diff --git a/ishtar_common/templates/blocks/bs_formset_snippet.html b/ishtar_common/templates/blocks/bs_formset_snippet.html
index 3a7e537d3..cfc9bb37b 100644
--- a/ishtar_common/templates/blocks/bs_formset_snippet.html
+++ b/ishtar_common/templates/blocks/bs_formset_snippet.html
@@ -19,9 +19,9 @@
{% csrf_token %}
{% for field in form.visible_fields %}
- {% with bs_col_width='col-3' %}
- {% include "blocks/bs_field_snippet.html" %}
- {% endwith %}
+ {% ifequal field.name "DELETE" %}{% with bs_col_width='col-2' %}{% include "blocks/bs_field_snippet.html" %}{% endwith %}
+ {% else %}{% with bs_col_width='col-3' %}{% include "blocks/bs_field_snippet.html" %}{% endwith %}
+ {% endifequal %}
{% endfor %}
{% if form.extra_render %}