Blame view

app/main/templates/category_form.html 1.3 KB
61e8ddf2   hitier   New labels and ca...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% extends "base_page.html" %}

{#  Set the title that will be used in base_page #}
{% if category['id'] and category['id'] != '' %}
  {% set subtitle = "Modifier la categorie "+ category['name'] %}
{% else %}
  {% set subtitle = "Ajouter une nouvelle categorie" %}
{% endif %}

{% block content %}

  <!-- Invisible span to define wich ul and a in the navbar are actived -->
  <span id="nav_actived" style="display: none">admin,category_edit</span>

  <form id="category_form" class="pdc-form" action="{{ url_for('main.category_edit') }}" method="post">
fc06cbe5   hitier   Category edit for...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    {% if category['id'] and category['id'] != '' %}
      <input class="form-control" id="category_id" name="category_id" type="hidden" value="{{ category['id'] }}">
    {% endif %}
    <div class="form-group">
      <label for="name">Nom</label>
      <input class="form-control" id="name" name="name" type="text" value="{{ category['name'] }}">
    </div>
    <div class="form-group">
      <label for="labels">Labels</label>
      <select id="labels" name="labels" class="form-control" multiple>
        {% for l in labels %}
          <option value="{{ l.id }}" {{ "selected" if l.name in category['labels'] }}>{{ l.name }}</option>
        {% endfor %}
      </select>
    </div>
61e8ddf2   hitier   New labels and ca...
31
32
33
    <input class="pdc-form-submit" type="submit" value="Valider">
  </form>
{% endblock %}