diff --git a/manuels/migrations/0022_teacher_has_confirmed_list.py b/manuels/migrations/0022_teacher_has_confirmed_list.py new file mode 100644 index 0000000..592c7c8 --- /dev/null +++ b/manuels/migrations/0022_teacher_has_confirmed_list.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.5 on 2018-06-02 15:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('manuels', '0021_auto_20180602_1638'), + ] + + operations = [ + migrations.AddField( + model_name='teacher', + name='has_confirmed_list', + field=models.BooleanField(default=False, verbose_name='a confirmé les listes'), + ), + ] diff --git a/manuels/models.py b/manuels/models.py index ffbd7b4..6722e1e 100644 --- a/manuels/models.py +++ b/manuels/models.py @@ -48,6 +48,11 @@ class Teacher(BaseModel): help_text='Utilisée pour vous transmettre votre lien personnel', unique=True ) + has_confirmed_list = models.BooleanField( + 'a confirmé les listes', + default=False, + blank=True + ) def get_absolute_url(self): from django.urls import reverse diff --git a/manuels/templates/manuels/confirm_teacher.html b/manuels/templates/manuels/confirm_teacher.html new file mode 100644 index 0000000..3ac300b --- /dev/null +++ b/manuels/templates/manuels/confirm_teacher.html @@ -0,0 +1,29 @@ +{% extends 'manuels/base.html' %} + +{% load bootstrap4 %} +{% load static %} + +{% block content %} +
+
+

Bienvenue {{ teacher.full_name }}

+

+ {% block title %}Confirmer les listes{% endblock %} + Retour à vos listes +

+
+

Danger

+

+ Êtes-vous certain·e de vouloir confirmer vos listes ? + Cette action est définitive : vous ne pourrez plus les modifier ensuite. +

+
+
+ {% csrf_token %} + {% buttons %} + + {% endbuttons %} +
+
+
+{% endblock %} diff --git a/manuels/templates/manuels/list_books_supplies.html b/manuels/templates/manuels/list_books_supplies.html index d847c75..fe9f859 100644 --- a/manuels/templates/manuels/list_books_supplies.html +++ b/manuels/templates/manuels/list_books_supplies.html @@ -7,8 +7,15 @@ {% block content %}
-

Bienvenue {{ teacher.full_name }} Se - déconnecter

+

Bienvenue {{ teacher.full_name }} + + Se déconnecter + + {% if not teacher.has_confirmed_list %} + + Confirmer ma liste + {% endif %} +