aboutsummaryrefslogtreecommitdiff
path: root/templates/balancing/create.html
diff options
context:
space:
mode:
authorJoris Guyonvarch2026-04-18 11:04:47 +0200
committerJoris Guyonvarch2026-04-18 11:05:17 +0200
commit6d1300640051baa23360846197b54e1e69ae32e3 (patch)
tree46219dcf5b5c9e5da0920ffd966d49ba80947a9b /templates/balancing/create.html
parentb35589eb90f2e5ee5521964e64eb578e9eb99032 (diff)
Add balancing capabilities
If payment are too unbalanced, it’s easier to make a transfer.
Diffstat (limited to 'templates/balancing/create.html')
-rw-r--r--templates/balancing/create.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/templates/balancing/create.html b/templates/balancing/create.html
new file mode 100644
index 0000000..c9bfdba
--- /dev/null
+++ b/templates/balancing/create.html
@@ -0,0 +1,79 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Nouvel équilibrage
+{% endblock title %}
+
+{% block main %}
+
+ <section class="g-Section">
+ <p class="g-Paragraph">
+ <a
+ class="g-Link g-Media__Large"
+ href="/balancings?page={{ query.page or 1 }}"
+ >
+ Retour aux équilibrages
+ </a>
+ </p>
+
+ <form
+ class="g-Form"
+ action="/balancing/create?page={{ query.page or 1 }}"
+ method="POST"
+ >
+ <h1 class="g-H1">
+ Nouvel équilibrage
+ </h1>
+
+ {% if error %}
+ <div class="g-Form__Error">{{ error }}</div>
+ {% endif %}
+
+ <label class="g-Form__Label">
+ Montant
+ <input
+ name="amount"
+ type="number"
+ class="g-Form__Input"
+ value="{{ form.amount or "" }}"
+ min=1
+ required
+ {% if not form %} autofocus {% endif %}
+ />
+ </label>
+
+ {% set user_id = form.user_id or connected_user.id %}
+
+ <label class="g-Form__Label">
+ De
+ <select name="source" class="g-Form__Select" required>
+ {% for user in users %}
+ <option
+ value="{{ user.id }}"
+ {% if "" ~ user.id == "" ~ user_id %} selected {% endif %}
+ >
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <label class="g-Form__Label">
+ Vers
+ <select name="destination" class="g-Form__Select" required>
+ <option value="" disabled selected></option>
+ {% for user in users %}
+ <option value="{{ user.id }}">
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <div>
+ <input class="g-Button__Validate" type="submit" value="Créer" />
+ </div>
+ </form>
+ </section>
+
+{% endblock main %}