Blame view

app/main/templates/label_form.html 1.28 KB
61e8ddf2   hitier   New labels and ca...
1
2
3
4
5
6
7
8
9
10
11
{% extends "base_page.html" %}

{#  Set the title that will be used in base_page #}
{% if label['id'] and label['id'] != '' %}
  {% set subtitle = "Modifier le label "+ label['name'] %}
{% else %}
  {% set subtitle = "Ajouter un nouveau label" %}
{% endif %}

{% block content %}

85ee3eec   hitier   Completed Label e...
12
13
  <!-- Invisible span to define wich ul and a in the navbar are actived -->
  <span id="nav_actived" style="display: none">admin,label_edit</span>
61e8ddf2   hitier   New labels and ca...
14

85ee3eec   hitier   Completed Label e...
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  <form id="label_form" class="pdc-form" action="{{ url_for('main.label_edit') }}" method="post">
    {% if label['id'] and label['id'] != '' %}
      <input class="form-control" id="label_id" name="label_id" type="hidden" value="{{ label['id'] }}">
    {% endif %}
    <div class="form-group">
      <label for="name">Nom</label>
      <input class="form-control" id="name" name="name" type="text" value="{{ label['name'] }}">
    </div>
    <div class="form-group">
      <label for="categories">Categories</label>
      <select id="categories" name="categories" class="form-control" multiple>
        {% for c in categories %}
          <option value="{{ c.id }}" {{ "selected" if c.name in label['categories'] }}>{{ c.name }}</option>
        {% endfor %}
      </select>
    </div>
    <input class="pdc-form-submit" type="submit" value="Valider">
  </form>
61e8ddf2   hitier   New labels and ca...
33
{% endblock %}