Compare commits

..
Author SHA1 Message Date
imperosol 8175fc415c add a space between inputs and submit in refill form 2026-09-20 22:37:31 +02:00
5 changed files with 11 additions and 10 deletions
@@ -123,14 +123,14 @@ document.addEventListener("alpine:init", () => {
onRefillingSuccess(event: CustomEvent) {
if (
event.type !== "htmx:after:swap" ||
event.detail.ctx.response.status !== 200 ||
event.detail.ctx.target.querySelector(".errorlist")
event.type !== "htmx:after-swap" ||
event.detail.failed ||
event.detail.elt.querySelector(".errorlist")
) {
return;
}
this.customerBalance += Number.parseFloat(
(event.detail.ctx.target.querySelector("#id_amount") as HTMLInputElement).value,
(event.detail.target.querySelector("#id_amount") as HTMLInputElement).value,
);
document.getElementById("selling-accordion")?.setAttribute("open", "");
this.codeField?.widget.focus();
@@ -62,8 +62,7 @@
}
form {
margin-top: .5rem;
margin-bottom: .5rem;
margin: 0;
}
}
@@ -186,7 +186,7 @@
{% if refilling_fragment %}
<div
class="accordion-content"
@htmx:after:swap="onRefillingSuccess"
@htmx:after-swap="onRefillingSuccess"
>
{{ refilling_fragment }}
</div>
@@ -4,6 +4,8 @@
hx-swap="outerHTML"
>
{% csrf_token %}
{{ form.as_p() }}
<input type="submit" value="{% trans %}Go{% endtrans %}"/>
<div class="margin-bottom">
{{ form.as_p() }}
</div>
<input type="submit" class="btn btn-blue" value="{% trans %}Go{% endtrans %}"/>
</form>
@@ -60,7 +60,7 @@
</p>
<br>
{% if settings.SITH_EBOUTIC_CB_ENABLED %}
<div @htmx:after:request="fill">
<div @htmx:after-request="fill">
{{ billing_infos_form }}
</div>
{% endif %}