aboutsummaryrefslogtreecommitdiff
path: root/templates/category/create.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/category/create.html')
-rw-r--r--templates/category/create.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/templates/category/create.html b/templates/category/create.html
new file mode 100644
index 0000000..e206898
--- /dev/null
+++ b/templates/category/create.html
@@ -0,0 +1,51 @@
+{% extends "base.html" %}
+
+{% block title %}
+ Nouvelle catégorie
+{% endblock title %}
+
+{% block main %}
+
+ <div>
+ <p class="g-Paragraph">
+ <a class="g-Link g-Media__Large" href="/categories">
+ Retour aux categories
+ </a>
+ </p>
+
+ <form class="g-Form" action="/category/create" method="POST">
+ <h1 class="g-H1">
+ Nouvelle catégorie
+ </h1>
+
+ {% if error %}
+ <div class="g-Form__Error">{{ error }}</div>
+ {% endif %}
+
+ <label class="g-Form__Label" for="name">Nom</label>
+ <input
+ name="name"
+ class="g-Form__Input"
+ id="name"
+ value="{{ form.name | default(value="") }}"
+ required
+ {% if not form %} autofocus {% endif %}
+ />
+
+ <label class="g-Form__Label" for="color">Couleur</label>
+ <input
+ name="color"
+ type="color"
+ class="g-Form__Input g-Form__InputColor"
+ id="color"
+ value="{{ form.color | default(value="") }}"
+ required
+ />
+
+ <div>
+ <input class="g-Button__Validate" type="submit" value="Créer" />
+ </div>
+ </form>
+ </div>
+
+{% endblock main %}