From: Christian Heller Date: Tue, 28 Jan 2025 12:46:32 +0000 (+0100) Subject: Add /balance?up_incl= link to Booking edit views. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/tasks?a=commitdiff_plain;h=b32a0cca577ecaff39c053dd9ce35de467870231;p=plomledger Add /balance?up_incl= link to Booking edit views. --- diff --git a/templates/_macros.tmpl b/templates/_macros.tmpl index 7ae7845..55243af 100644 --- a/templates/_macros.tmpl +++ b/templates/_macros.tmpl @@ -54,23 +54,29 @@ td.invalid, tr.warning td.invalid { background-color: #ff0000; } {% macro taint_js() %} function taint() { - const els = document.getElementsByClassName("enable_on_change"); + let els = document.getElementsByClassName("enable_on_change"); for (let i = 0; i < els.length; i++) { els[i].disabled = false; } - const a = document.getElementById("switch_link"); - const link_text = a.textContent; - const span = a.parentNode; - span.innerHTML = ""; + let links_text = ''; + els = document.getElementsByClassName("disable_on_change"); + for (let i = 0; i < els.length; i++) { + links_text += els[i].textContent + ' '; + } + const span = document.getElementById('booking_links'); + span.innerHTML = ''; const del = document.createElement("del"); span.appendChild(del); - del.textContent = link_text; + del.textContent = links_text; } {% endmacro %} {% macro edit_bar(target, id) %} -switch to {{target}} + +switch to {{target}} +balance after +
{% endmacro %}