64 lines
2.5 KiB
Django/Jinja
64 lines
2.5 KiB
Django/Jinja
{% extends "cao_blogr:templates/layout.jinja2" %}
|
|
|
|
{% block content %}
|
|
|
|
<form action="{{ url }}" method="post" class="form">
|
|
|
|
{% for error in form.title.errors %}
|
|
<div class="error">{{ error }}</div>
|
|
{% endfor %}
|
|
<div class="form-group">
|
|
<label class="required-field" for="title">{{ form.title.label }}</label>
|
|
{{ form.title(class_='form-control') }}
|
|
</div>
|
|
|
|
{% for error in form.body.errors %}
|
|
<div class="error">{{ error }}</div>
|
|
{% endfor %}
|
|
<div class="form-group">
|
|
<label class="required-field" for="body">{{ form.body.label }}</label>
|
|
{{ form.body(class_='form-control', cols="35", rows="20") }}
|
|
</div>
|
|
|
|
{% for error in form.topic.errors %}
|
|
<div class="error">{{ error }}</div>
|
|
{% endfor %}
|
|
<div class="form-group">
|
|
<label class="required-field" for="topic">{{ form.topic.label }}</label>
|
|
{{ form.topic(class_='form-control') }}
|
|
</div>
|
|
|
|
{% for error in form.tag.errors %}
|
|
<div class="text-danger">{{ error }}</div>
|
|
{% endfor %}
|
|
<div class="form-group">
|
|
<label class="required-field" for="tag">{{ form.tag.label }}</label>
|
|
{{ form.tag(class_='form-control') }}
|
|
</div>
|
|
|
|
<p>
|
|
Topic : <strong>{{ entry.topic }}</strong>
|
|
|
|
|
Tag : <strong>{{ entry.tag }}</strong>
|
|
|
|
|
Créé le : <strong>{{ entry.created.strftime("%d-%m-%Y - %H:%M") }}</strong>
|
|
|
|
|
Modifié le : <strong>{{ entry.edited.strftime("%d-%m-%Y - %H:%M") }}</strong>
|
|
</p>
|
|
<br />
|
|
<div class="form-group">
|
|
<a class="btn btn-default" href="{{ request.route_url('home') }}"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
|
<button class="btn btn-primary" type="submit" name="form.submitted">
|
|
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
|
{% if action == 'edit' %}
|
|
<button class="btn btn-warning" type="submit" name="form.deleted">
|
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<p class="text-center">Apprendre la syntaxe de <a href="https://www.markdownguide.org/basic-syntax/" target="_blank">Markdown</a></li></p>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|