Formulaire de la page d'accueil

This commit is contained in:
Tom Hubrecht 2020-09-16 01:20:53 +02:00
parent e6593d4b14
commit 4f8374318b
2 changed files with 31 additions and 17 deletions

View file

@ -66,8 +66,8 @@
{% if profile.text_field %}
<div class="free-text">
<span class="label">Champ libre</span>
<p class="value">QJFBsd</p>
<span class="label">{% trans "Champ libre" %}</span>
<p class="value">{{ profile.text_field }}</p>
</div>
{% endif %}

View file

@ -1,20 +1,34 @@
{% extends "fiches/base.html" %}
{% load i18n %}
{% block content %}
<h2> Chercher quelqu'un·e dans l'annuaire </h2>
<form method='post' action="">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Recherche">
</form>
<div>
<ul>
{% for profile in result %}
<li><a href="{% url 'fiche' profile.user.username %}">{{profile.full_name}} ({{ profile.department.all|join:", " }} {{profile.promotion}})
</a> </li>
{% endfor %}
</ul>
</div>
<div class="content" id="content-home">
<h2>{% trans "Chercher quelqu'un·e dans l'annuaire" %}</h2>
<form method='post' action="">
{% csrf_token %}
<label for="id_name">{% trans "Nom/Surnom :" %}</label>
{{ form.name }}
{% endblock %}
<label for="id_year">{% trans "Promotion :" %}</label>
{{ form.year }}
<label for="id_department">{% trans "Department :" %}</label>
{{ form.department }}
<input type="submit" value="{% trans "Recherche" %}">
</form>
<div>
<ul>
{% for profile in result %}
<li>
<a href="{% url 'fiche' profile.user.username %}">{{profile.full_name}} ({{ profile.department.all|join:", " }} {{profile.promotion}})</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}