From 99d0f8b6c5d9baa3436873ccd5f314b151392695 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 17 Jun 2018 12:30:28 +0200 Subject: [PATCH] Fix broken confirm delete page --- manuels/templates/manuels/add_item.html | 2 +- manuels/views.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manuels/templates/manuels/add_item.html b/manuels/templates/manuels/add_item.html index b8e6dad..4f7225b 100644 --- a/manuels/templates/manuels/add_item.html +++ b/manuels/templates/manuels/add_item.html @@ -25,7 +25,7 @@ {% endif %} {% buttons %} {% endbuttons %} diff --git a/manuels/views.py b/manuels/views.py index 54c6e39..f33ca52 100644 --- a/manuels/views.py +++ b/manuels/views.py @@ -68,6 +68,7 @@ class ItemView(BaseTeacherView): message_template = None verb = None button_class = 'primary' + button_icon = 'fas fa-check-circle' def dispatch(self, request, *args, **kwargs): response = super().dispatch(request, *args, **kwargs) @@ -83,6 +84,7 @@ class ItemView(BaseTeacherView): context['message_template'] = self.message_template context['verb'] = self.verb context['button_class'] = self.button_class + context['button_icon'] = self.button_icon return context def get_initial(self): @@ -98,6 +100,7 @@ class ItemView(BaseTeacherView): class AddItemView(ItemView, CreateView): verb = 'Ajouter' + button_icon = 'fas fa-plus-circle' def get_success_url(self): if self.add_another: @@ -190,6 +193,8 @@ class DeleteItemView(ItemView, DeleteView): message_template = 'manuels/confirm_delete.html' verb = 'Supprimer' button_class = 'danger' + button_icon = 'fas fa-trash' + template_name = 'manuels/add_supplies.html' def get_queryset(self): return self.model.objects.filter(teacher=self.teacher)