mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-21 03:34:25 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8175fc415c |
@@ -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 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user