diff options
Diffstat (limited to 'templates/balancing/create.html')
| -rw-r--r-- | templates/balancing/create.html | 79 |
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 %} |
