Blame view

app/main/templates/agent_edit.html 2.91 KB
96346598   hitier   Insert descriptio...
1
{% extends "base_page.html" %}
ca0797d6   hitier   New agent edit form
2
3
{#  Set the title that will be used in base_page #}
{% if agent['agent_id'] != '' %}
ac2fa9fd   hitier   Use select_option...
4
  {% set subtitle = "Modifier l'agent "+ agent['fullname'] +":" %}
96346598   hitier   Insert descriptio...
5
{% else %}
ca0797d6   hitier   New agent edit form
6
  {% set subtitle = "Ajouter un nouvel agent:" %}
96346598   hitier   Insert descriptio...
7
{% endif %}
ca0797d6   hitier   New agent edit form
8
9
10
11
12
13
14
15
16
17
18
19
20
{% block content %}
  <form action="{{ url_for('main.agent_edit') }}" method="post">
    {% if agent %}
      <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['agent_id'] }}">
    {% endif %}
    <div class="form-group">
      <label for="firstname">Nom</label>
      <input class="form-control" id="firstname" name="firstname" type="text" value="{{ agent['firstname'] }}">
    </div>
    <div class="form-group">
      <label for="secondname">Prénom</label>
      <input class="form-control" id="secondname" name="secondname" type="text" value="{{ agent['secondname'] }}">
    </div>
687ef08f   hitier   Use checkboxes fo...
21
22
23
24
25
26
27
28
29
    <div class="form-group form-check form-check-inline">
      <label class="form-check-label" for="virtual">Virtuel</label>
      <input class="form-check-input" type="checkbox" id="virtual" name="virtual"
          {{ 'checked' if agent['virtual'] == 1 }} value="1">
    </div>
    <div class="form-group form-check form-check-inline">
      <label class="form-check-label" for="permanent">Permanent</label>
      <input class="form-check-input" type="checkbox" id="permanent" name="permanent"
          {{ 'checked' if agent['permanent'] == 1 }} value="1">
ca0797d6   hitier   New agent edit form
30
31
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
32
33
34
35
36
37
38
      <label for="company_id">Structure</label>
      <select id="company_id" name="company_id" class="form-select">
        <option selected>---</option>
        {% for c in companies %}
          <option value="{{ c.id }}" {{ "selected" if c.id == agent['company_id'] }}>{{ c.name }}</option>
        {% endfor %}
      </select>
ca0797d6   hitier   New agent edit form
39
40
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
41
42
43
44
45
46
47
      <label for="grade_id">Grade</label>
      <select id="grade_id" name="grade_id" class="form-select">
        <option selected>---</option>
        {% for g in grades %}
          <option value="{{ g.id }}" {{ "selected" if g.id == agent['grade_id'] }}>{{ g.name }}</option>
        {% endfor %}
      </select>
ca0797d6   hitier   New agent edit form
48
49
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
50
51
52
53
54
55
56
      <label for="status_id">Statut</label>
      <select id="status_id" name="status_id" class="form-select">
        <option selected>---</option>
        {% for s in statuses %}
          <option value="{{ s.id }}" {{ "selected" if s.id == agent['status_id'] }}>{{ s.name }}</option>
        {% endfor %}
      </select>
ca0797d6   hitier   New agent edit form
57
58
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
59
60
61
62
63
64
65
      <label for="bap_id">Bap</label>
      <select id="bap_id" name="bap_id" class="form-select">
        <option selected>---</option>
        {% for b in baps %}
          <option value="{{ b.id }}" {{ "selected" if b.id == agent['bap_id'] }}>{{ b.name }}</option>
        {% endfor %}
      </select>
ca0797d6   hitier   New agent edit form
66
    </div>
ca0797d6   hitier   New agent edit form
67
68
    <input class="btn btn-dark" type="submit" value="Valider">
  </form>
96346598   hitier   Insert descriptio...
69
{% endblock %}