Commit 26778698ed8dea130c45658268fbce450f81429e

Authored by hitier
1 parent 9b93cc2d

Use bootstrap grid on form

Showing 1 changed file with 13 additions and 13 deletions   Show diff stats
app/main/templates/agent_edit.html
... ... @@ -2,9 +2,9 @@
2 2  
3 3 {# Set the title that will be used in base_page #}
4 4 {% if agent['agent_id'] != '' %}
5   - {% set subtitle = "Modifier l'agent "+ agent['fullname'] +":" %}
  5 + {% set subtitle = "Modifier l'agent "+ agent['fullname'] %}
6 6 {% else %}
7   - {% set subtitle = "Ajouter un nouvel agent:" %}
  7 + {% set subtitle = "Ajouter un nouvel agent" %}
8 8 {% endif %}
9 9  
10 10 {% block content %}
... ... @@ -12,7 +12,7 @@
12 12 <!-- Invisible span to define wich ul and a in the navbar are actived -->
13 13 <span id="nav_actived" style="display: none">cds,agent/create</span>
14 14  
15   - <form action="{{ url_for('main.agent_edit') }}" method="post">
  15 + <form id="agent_form" class="col-6" action="{{ url_for('main.agent_edit') }}" method="post">
16 16 {% if agent %}
17 17 <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}">
18 18 {% endif %}
... ... @@ -24,19 +24,19 @@
24 24 <label for="secondname">Prénom</label>
25 25 <input class="form-control" id="secondname" name="secondname" type="text" value="{{ agent['secondname'] }}">
26 26 </div>
27   - <div class="form-group form-check form-check-inline">
28   - <label class="form-check-label" for="virtual">Virtuel</label>
29   - <input class="form-check-input" type="checkbox" id="virtual" name="virtual"
  27 + <div class="form-group form-check form-check-inline col-sm-5 col-xl-3">
  28 + <input class="form-check-input " type="checkbox" id="virtual" name="virtual"
30 29 {{ 'checked' if agent['virtual'] == 1 }} value="1">
  30 + <label class="form-check-label " for="virtual">Virtuel</label>
31 31 </div>
32   - <div class="form-group form-check form-check-inline">
33   - <label class="form-check-label" for="permanent">Permanent</label>
34   - <input class="form-check-input" type="checkbox" id="permanent" name="permanent"
  32 + <div class="form-group form-check form-check-inline col-sm-5 col-xl-3">
  33 + <input class="form-check-input " type="checkbox" id="permanent" name="permanent"
35 34 {{ 'checked' if agent['permanent'] == 1 }} value="1">
  35 + <label class="form-check-label " for="permanent">Permanent</label>
36 36 </div>
37 37 <div class="form-group">
38 38 <label for="company_id">Structure</label>
39   - <select id="company_id" name="company_id" class="form-select">
  39 + <select id="company_id" name="company_id" class="form-control">
40 40 <option selected>---</option>
41 41 {% for c in companies %}
42 42 <option value="{{ c.id }}" {{ "selected" if c.id == agent['company_id'] }}>{{ c.name }}</option>
... ... @@ -45,7 +45,7 @@
45 45 </div>
46 46 <div class="form-group">
47 47 <label for="grade_id">Grade</label>
48   - <select id="grade_id" name="grade_id" class="form-select">
  48 + <select id="grade_id" name="grade_id" class="form-control">
49 49 <option selected>---</option>
50 50 {% for g in grades %}
51 51 <option value="{{ g.id }}" {{ "selected" if g.id == agent['grade_id'] }}>{{ g.name }}</option>
... ... @@ -54,7 +54,7 @@
54 54 </div>
55 55 <div class="form-group">
56 56 <label for="status_id">Statut</label>
57   - <select id="status_id" name="status_id" class="form-select">
  57 + <select id="status_id" name="status_id" class="form-control">
58 58 <option selected>---</option>
59 59 {% for s in statuses %}
60 60 <option value="{{ s.id }}" {{ "selected" if s.id == agent['status_id'] }}>{{ s.name }}</option>
... ... @@ -63,7 +63,7 @@
63 63 </div>
64 64 <div class="form-group">
65 65 <label for="bap_id">Bap</label>
66   - <select id="bap_id" name="bap_id" class="form-select">
  66 + <select id="bap_id" name="bap_id" class="form-control">
67 67 <option selected>---</option>
68 68 {% for b in baps %}
69 69 <option value="{{ b.id }}" {{ "selected" if b.id == agent['bap_id'] }}>{{ b.name }}</option>
... ...