From 3de1ea229b664eab2f134e2bfa0bca6cd2f4062e Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 31 Jan 2018 06:44:11 +0100 Subject: [PATCH] Et preferences --- preferences/templates/preferences/edit_preferences.html | 2 +- preferences/templates/preferences/preferences.html | 2 +- preferences/views.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/preferences/templates/preferences/edit_preferences.html b/preferences/templates/preferences/edit_preferences.html index 8d75f289..055ac7e8 100644 --- a/preferences/templates/preferences/edit_preferences.html +++ b/preferences/templates/preferences/edit_preferences.html @@ -36,7 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% csrf_token %} {% massive_bootstrap_form options 'utilisateur_asso' %} -{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %} +{% bootstrap_button "Modifier" button_type="submit" icon="star" %}


diff --git a/preferences/templates/preferences/preferences.html b/preferences/templates/preferences/preferences.html index 6184bfb3..16d7a74d 100644 --- a/preferences/templates/preferences/preferences.html +++ b/preferences/templates/preferences/preferences.html @@ -38,7 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {% if preferenceform %} {% bootstrap_form preferenceform %} {% endif %} - {% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %} + {% bootstrap_button action_name button_type="submit" icon="star" %}

diff --git a/preferences/views.py b/preferences/views.py index 7a609a76..43befc72 100644 --- a/preferences/views.py +++ b/preferences/views.py @@ -129,7 +129,7 @@ def add_service(request): messages.success(request, "Ce service a été ajouté") return redirect(reverse('preferences:display-options')) return form( - {'preferenceform': service}, + {'preferenceform': service, 'action_name' : 'Ajouter'}, 'preferences/preferences.html', request ) @@ -152,7 +152,7 @@ def edit_service(request, service_instance, serviceid): messages.success(request, "Service modifié") return redirect(reverse('preferences:display-options')) return form( - {'preferenceform': service}, + {'preferenceform': service, 'action_name' : 'Editer'}, 'preferences/preferences.html', request ) @@ -176,7 +176,7 @@ def del_services(request, instances): suivant %s ne peut être supprimé" % services_del) return redirect(reverse('preferences:display-options')) return form( - {'preferenceform': services}, + {'preferenceform': services, 'action_name' : 'Supprimer'}, 'preferences/preferences.html', request )