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) { onRefillingSuccess(event: CustomEvent) {
if ( if (
event.type !== "htmx:after:swap" || event.type !== "htmx:after-swap" ||
event.detail.ctx.response.status !== 200 || event.detail.failed ||
event.detail.ctx.target.querySelector(".errorlist") event.detail.elt.querySelector(".errorlist")
) { ) {
return; return;
} }
this.customerBalance += Number.parseFloat( 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", ""); document.getElementById("selling-accordion")?.setAttribute("open", "");
this.codeField?.widget.focus(); this.codeField?.widget.focus();
@@ -62,8 +62,7 @@
} }
form { form {
margin-top: .5rem; margin: 0;
margin-bottom: .5rem;
} }
} }
@@ -186,7 +186,7 @@
{% if refilling_fragment %} {% if refilling_fragment %}
<div <div
class="accordion-content" class="accordion-content"
@htmx:after:swap="onRefillingSuccess" @htmx:after-swap="onRefillingSuccess"
> >
{{ refilling_fragment }} {{ refilling_fragment }}
</div> </div>
@@ -4,6 +4,8 @@
hx-swap="outerHTML" hx-swap="outerHTML"
> >
{% csrf_token %} {% csrf_token %}
{{ form.as_p() }} <div class="margin-bottom">
<input type="submit" value="{% trans %}Go{% endtrans %}"/> {{ form.as_p() }}
</div>
<input type="submit" class="btn btn-blue" value="{% trans %}Go{% endtrans %}"/>
</form> </form>
@@ -60,7 +60,7 @@
</p> </p>
<br> <br>
{% if settings.SITH_EBOUTIC_CB_ENABLED %} {% if settings.SITH_EBOUTIC_CB_ENABLED %}
<div @htmx:after:request="fill"> <div @htmx:after-request="fill">
{{ billing_infos_form }} {{ billing_infos_form }}
</div> </div>
{% endif %} {% endif %}