ciclos

ref: canary

core/templates/new_product.html


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{% extends 'layout.html' %}

{% block body %}
  <section class="messages">
    {% with messages = get_flashed_messages() %}
    {% if messages %}
      <section>
        {{ messages[0] }}
      </section>
    {% endif %}
    {% endwith %}
  </section>

  <form action='{{ url_for('products.index') }}' method="POST">

    <div class="form-section">
      <label for="title">Title</label>
      <input type="text" placeholder="Title" name="title">
    </div>

    <div class="form-section">
      <label for="description">Description</label>
      <textarea rows="10" columns="50" placeholder="Description" name="description"></textarea>
    </div>

    <div class="form-section">
      <label for="group_id">Group</label>
      <select id="" name="group_id">
        {% for group in groups %}
          <option value="{{group.id}}">{{group.name}}</option>
        {% endfor %}
      </select>
    </div>

    <div class="form-section">
      <label for="category_id">Category</label>
      <select id="" name="category_id">
        {% for category in categories %}
          <option value="{{ category.id }}">{{ category.name }}</option>
        {% endfor %}
      </select>
    </div>

    <div class="form-section">
      <label for="price">Price</label>
      <input type="text" placeholder="14.20" name="price" />
    </div>

    <div class="form-action">
      <button type="submit" rel="button">Criar Produto</button>
    </div>

  </form>
{% endblock %}