{% extends "base/base.html" %}

{% block title %}
<a href="{{ url_for('adm') }}">Panneau d'administration</a> » <a href={{ url_for('adm_trophies') }}>Titres et trophées</a> » <h1>Édition du trophée '{{ trophy.name }}'</h1>
{% endblock %}

{% block content %}
<section class="form">
  <form action="{{ url_for('adm_edit_trophy', trophy_id=trophy.id) }}" method="post" enctype="multipart/form-data">
		{{ form.hidden_tag() }}
		<h2>Éditer le trophée</h2>

		<div>
			{{ form.name.label }}
			{{ form.name(value=trophy.name) }}
			{% for error in form.name.errors %}
			<span class="msgerror">{{ error }}</span>
			{% endfor %}
		</div>
		<div>
			{{ form.title.label }}
			{{ form.title(value=trophy.title) }}
			<div class=desc>{{ form.title.description }}</div>
			{% for error in form.title.errors %}
			<span class="msgerror">{{ error }}</span>
			{% endfor %}
		</div>
		<div>
			{{ form.css.label }}
			{{ form.css(value=trophy.css) }}
			<div class=desc>{{ form.css.description }}</div>
			{% for error in form.css.errors %}
			<span class="msgerror">{{ error }}</span>
			{% endfor %}
		</div>
		<div>{{ form.submit(class_="bg-green") }}</div>
</section>
{% endblock %}
