Commit 26778698ed8dea130c45658268fbce450f81429e
1 parent
9b93cc2d
Exists in
master
and in
4 other branches
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,9 +2,9 @@ | ||
2 | 2 | ||
3 | {# Set the title that will be used in base_page #} | 3 | {# Set the title that will be used in base_page #} |
4 | {% if agent['agent_id'] != '' %} | 4 | {% if agent['agent_id'] != '' %} |
5 | - {% set subtitle = "Modifier l'agent "+ agent['fullname'] +":" %} | 5 | + {% set subtitle = "Modifier l'agent "+ agent['fullname'] %} |
6 | {% else %} | 6 | {% else %} |
7 | - {% set subtitle = "Ajouter un nouvel agent:" %} | 7 | + {% set subtitle = "Ajouter un nouvel agent" %} |
8 | {% endif %} | 8 | {% endif %} |
9 | 9 | ||
10 | {% block content %} | 10 | {% block content %} |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <!-- Invisible span to define wich ul and a in the navbar are actived --> | 12 | <!-- Invisible span to define wich ul and a in the navbar are actived --> |
13 | <span id="nav_actived" style="display: none">cds,agent/create</span> | 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 | {% if agent %} | 16 | {% if agent %} |
17 | <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}"> | 17 | <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}"> |
18 | {% endif %} | 18 | {% endif %} |
@@ -24,19 +24,19 @@ | @@ -24,19 +24,19 @@ | ||
24 | <label for="secondname">Prénom</label> | 24 | <label for="secondname">Prénom</label> |
25 | <input class="form-control" id="secondname" name="secondname" type="text" value="{{ agent['secondname'] }}"> | 25 | <input class="form-control" id="secondname" name="secondname" type="text" value="{{ agent['secondname'] }}"> |
26 | </div> | 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 | {{ 'checked' if agent['virtual'] == 1 }} value="1"> | 29 | {{ 'checked' if agent['virtual'] == 1 }} value="1"> |
30 | + <label class="form-check-label " for="virtual">Virtuel</label> | ||
31 | </div> | 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 | {{ 'checked' if agent['permanent'] == 1 }} value="1"> | 34 | {{ 'checked' if agent['permanent'] == 1 }} value="1"> |
35 | + <label class="form-check-label " for="permanent">Permanent</label> | ||
36 | </div> | 36 | </div> |
37 | <div class="form-group"> | 37 | <div class="form-group"> |
38 | <label for="company_id">Structure</label> | 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 | <option selected>---</option> | 40 | <option selected>---</option> |
41 | {% for c in companies %} | 41 | {% for c in companies %} |
42 | <option value="{{ c.id }}" {{ "selected" if c.id == agent['company_id'] }}>{{ c.name }}</option> | 42 | <option value="{{ c.id }}" {{ "selected" if c.id == agent['company_id'] }}>{{ c.name }}</option> |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | </div> | 45 | </div> |
46 | <div class="form-group"> | 46 | <div class="form-group"> |
47 | <label for="grade_id">Grade</label> | 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 | <option selected>---</option> | 49 | <option selected>---</option> |
50 | {% for g in grades %} | 50 | {% for g in grades %} |
51 | <option value="{{ g.id }}" {{ "selected" if g.id == agent['grade_id'] }}>{{ g.name }}</option> | 51 | <option value="{{ g.id }}" {{ "selected" if g.id == agent['grade_id'] }}>{{ g.name }}</option> |
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | </div> | 54 | </div> |
55 | <div class="form-group"> | 55 | <div class="form-group"> |
56 | <label for="status_id">Statut</label> | 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 | <option selected>---</option> | 58 | <option selected>---</option> |
59 | {% for s in statuses %} | 59 | {% for s in statuses %} |
60 | <option value="{{ s.id }}" {{ "selected" if s.id == agent['status_id'] }}>{{ s.name }}</option> | 60 | <option value="{{ s.id }}" {{ "selected" if s.id == agent['status_id'] }}>{{ s.name }}</option> |
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | </div> | 63 | </div> |
64 | <div class="form-group"> | 64 | <div class="form-group"> |
65 | <label for="bap_id">Bap</label> | 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 | <option selected>---</option> | 67 | <option selected>---</option> |
68 | {% for b in baps %} | 68 | {% for b in baps %} |
69 | <option value="{{ b.id }}" {{ "selected" if b.id == agent['bap_id'] }}>{{ b.name }}</option> | 69 | <option value="{{ b.id }}" {{ "selected" if b.id == agent['bap_id'] }}>{{ b.name }}</option> |