diff options
Diffstat (limited to 'templates/income/create.html')
-rw-r--r-- | templates/income/create.html | 96 |
1 files changed, 51 insertions, 45 deletions
diff --git a/templates/income/create.html b/templates/income/create.html index b74dddd..3c899ca 100644 --- a/templates/income/create.html +++ b/templates/income/create.html @@ -6,7 +6,7 @@ {% block main %} - <div> + <section class="g-Section"> <p class="g-Paragraph"> <a class="g-Link g-Media__Large" @@ -29,61 +29,67 @@ <div class="g-Form__Error">{{ error }}</div> {% endif %} - <label class="g-Form__Label" for="amount">Montant</label> - <input - name="amount" - type="number" - class="g-Form__Input" - id="amount" - value="{{ form.amount | default(value="") }}" - required - {% if not form %} autofocus {% endif %} - /> + <label class="g-Form__Label"> + Montant + <input + name="amount" + type="number" + class="g-Form__Input" + value="{{ form.amount | default(value="") }}" + required + {% if not form %} autofocus {% endif %} + /> + </label> {% set user_id = form.user_id | default(value="" ~ connected_user.id) %} - <label class="g-Form__Label" for="user_id">Personne</label> - <select name="user_id" id="user_id" 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 class="g-Form__Label"> + Personne + <select name="user_id" 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> {% set month_index = form.month | default(value="" ~ current_month) %} - <label class="g-Form__Label" for="month">Mois</label> - <select name="month" id="month" class="g-Form__Select" required> - {% for month in months %} - <option - value="{{ loop.index }}" - {% if "" ~ loop.index == month_index %} - selected - {% endif %} - > - {{ month }} - </option> - {% endfor %} - </select> + <label class="g-Form__Label"> + Mois + <select name="month" class="g-Form__Select" required> + {% for month in months %} + <option + value="{{ loop.index }}" + {% if "" ~ loop.index == month_index %} + selected + {% endif %} + > + {{ month }} + </option> + {% endfor %} + </select> + </label> - <label class="g-Form__Label" for="year">Année</label> - <input - name="year" - type="number" - class="g-Form__Input" - id="year" - value="{{ form.year | default(value=now() | date(format="%Y")) }}" - required - /> + <label class="g-Form__Label"> + Année + <input + name="year" + type="number" + class="g-Form__Input" + value="{{ form.year | default(value=now() | date(format="%Y")) }}" + required + /> + </label> <div> <input class="g-Button__Validate" type="submit" value="Créer" /> </div> </form> - </div> + </section> {% endblock main %} |