Blame view

app/main/templates/agent_form.html 3.17 KB
96346598   hitier   Insert descriptio...
1
{% extends "base_page.html" %}
9b93cc2d   hitier   Add new create ag...
2

ca0797d6   hitier   New agent edit form
3
{#  Set the title that will be used in base_page #}
e20cd5d4   hitier   Now import/export...
4
{% if agent and agent['id'] not in ['', None] %}
26778698   hitier   Use bootstrap gri...
5
  {% set subtitle = "Modifier l'agent "+ agent['fullname']  %}
96346598   hitier   Insert descriptio...
6
{% else %}
26778698   hitier   Use bootstrap gri...
7
  {% set subtitle = "Ajouter un nouvel agent" %}
96346598   hitier   Insert descriptio...
8
{% endif %}
9b93cc2d   hitier   Add new create ag...
9

ca0797d6   hitier   New agent edit form
10
{% block content %}
9b93cc2d   hitier   Add new create ag...
11
12

  <!-- Invisible span to define wich ul and a in the navbar are actived -->
fd63e06e   Anais Amato   update coloration...
13
  <span id="nav_actived" style="display: none">cds,edit_agent</span>
9b93cc2d   hitier   Add new create ag...
14

fcccbe7d   hitier   New configurable ...
15
  <form id="agent_form" class="pdc-form" action="{{ url_for('main.agent_edit') }}" method="post">
e20cd5d4   hitier   Now import/export...
16
17
    {% if agent and agent['id'] not in ['', None] %}
      <input class="form-control" id="agent_id" name="agent_id" type="hidden" value="{{ agent['id'] }}">
ca0797d6   hitier   New agent edit form
18
19
20
21
22
23
24
25
26
    {% 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>
26778698   hitier   Use bootstrap gri...
27
28
    <div class="form-group form-check form-check-inline col-sm-5 col-xl-3">
      <input class="form-check-input " type="checkbox" id="virtual" name="virtual"
687ef08f   hitier   Use checkboxes fo...
29
          {{ 'checked' if agent['virtual'] == 1 }} value="1">
26778698   hitier   Use bootstrap gri...
30
      <label class="form-check-label " for="virtual">Virtuel</label>
687ef08f   hitier   Use checkboxes fo...
31
    </div>
26778698   hitier   Use bootstrap gri...
32
33
    <div class="form-group form-check form-check-inline col-sm-5 col-xl-3">
      <input class="form-check-input " type="checkbox" id="permanent" name="permanent"
687ef08f   hitier   Use checkboxes fo...
34
          {{ 'checked' if agent['permanent'] == 1 }} value="1">
26778698   hitier   Use bootstrap gri...
35
      <label class="form-check-label " for="permanent">Permanent</label>
ca0797d6   hitier   New agent edit form
36
37
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
38
      <label for="company_id">Structure</label>
26778698   hitier   Use bootstrap gri...
39
      <select id="company_id" name="company_id" class="form-control">
ac2fa9fd   hitier   Use select_option...
40
41
42
43
44
        <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
45
46
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
47
      <label for="grade_id">Grade</label>
26778698   hitier   Use bootstrap gri...
48
      <select id="grade_id" name="grade_id" class="form-control">
ac2fa9fd   hitier   Use select_option...
49
50
51
52
53
        <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
54
55
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
56
      <label for="status_id">Statut</label>
26778698   hitier   Use bootstrap gri...
57
      <select id="status_id" name="status_id" class="form-control">
ac2fa9fd   hitier   Use select_option...
58
59
60
61
62
        <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
63
64
    </div>
    <div class="form-group">
ac2fa9fd   hitier   Use select_option...
65
      <label for="bap_id">Bap</label>
26778698   hitier   Use bootstrap gri...
66
      <select id="bap_id" name="bap_id" class="form-control">
ac2fa9fd   hitier   Use select_option...
67
68
69
70
71
        <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
72
    </div>
7daae4a7   hitier   New configurable ...
73
    <input class="pdc-form-submit" type="submit" value="Valider">
ca0797d6   hitier   New agent edit form
74
  </form>
96346598   hitier   Insert descriptio...
75
{% endblock %}