diff --git a/gestion/templates/gestion/kegs_list.html b/gestion/templates/gestion/kegs_list.html
index 2589099..764d7e8 100644
--- a/gestion/templates/gestion/kegs_list.html
+++ b/gestion/templates/gestion/kegs_list.html
@@ -13,13 +13,13 @@
@@ -48,7 +48,7 @@
{{ kegH.amountSold }} €
{{ kegH.keg.amount }} €
Voir
-
{% if perms.gestion.close_keg %}Fermer {% endif %}{% if perms.gestion.change_keg %}Modifier {% endif %}
+
{% if perms.gestion.close_keg %} Fermer {% endif %}{% if perms.gestion.change_keg %} Modifier {% endif %}
{% endfor %}
@@ -60,13 +60,13 @@
Liste des fûts inactifs
{% if perms.gestion.add_keg %}
-
Créer un fût
+
Créer un fût
{% endif %}
{% if perms.gestion.open_keg %}
-
Percuter un fût
+
Percuter un fût
{% endif %}
{% if perms.gestion.close_keg %}
-
Fermer un fût
+
Fermer un fût
{% endif %}
@@ -91,7 +91,7 @@
{{ keg.capacity }} L
{{ keg.amount }} €
Voir
-
{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %}Percuter {% endif %}{% endif %}{% if perms.gestion.change_keg %}Modifier {% endif %}
+
{% if perms.gestion.open_keg %}{% if keg.stockHold > 0 %} Percuter {% endif %}{% endif %}{% if perms.gestion.change_keg %} Modifier {% endif %}
{% endfor %}
diff --git a/gestion/templates/gestion/manage.html b/gestion/templates/gestion/manage.html
index 1f9c6ee..0292bf4 100644
--- a/gestion/templates/gestion/manage.html
+++ b/gestion/templates/gestion/manage.html
@@ -61,7 +61,7 @@
@@ -214,7 +214,7 @@
{% csrf_token %}
{{reload_form}}
-
Recharger
+
Recharger
{% endif %}
@@ -227,7 +227,7 @@
{% csrf_token %}
{{refund_form}}
-
Rembourser
+
Rembourser
{% endif %}
diff --git a/gestion/templates/gestion/menus_list.html b/gestion/templates/gestion/menus_list.html
index 3cecb99..22ef402 100644
--- a/gestion/templates/gestion/menus_list.html
+++ b/gestion/templates/gestion/menus_list.html
@@ -10,7 +10,7 @@
-
Créer un menu
+
Créer un menu
@@ -31,7 +31,7 @@
{{ menu.barcode }}
{% for art in menu.articles.all %}{{art}} ,{% endfor %}
{{ menu.is_active | yesno:"Oui, Non"}}
- {% if perms.gestion.change_menu %}{% if menu.is_active %}Désa{% else %}A{% endif %}ctiver Modifier {% endif %}
+ {% if perms.gestion.change_menu %}{% if menu.is_active %} Désa{% else %} A{% endif %}ctiver Modifier {% endif %}
{% endfor %}
diff --git a/gestion/templates/gestion/pintes_list.html b/gestion/templates/gestion/pintes_list.html
index 88c0b95..937e13d 100644
--- a/gestion/templates/gestion/pintes_list.html
+++ b/gestion/templates/gestion/pintes_list.html
@@ -14,7 +14,7 @@
Général
{% if perms.gestion.add_pinte %}
- Créer une ou plusieurs pintes
+ Créer une ou plusieurs pintes
{% endif %}
Il a y actuellement {{ taken_pintes.count|add:free_pintes.count }} pintes, parmis lesquelles {{ free_pintes.count }} sont rendues et {{ taken_pintes.count }} ne sont pas rendues .
@@ -37,10 +37,10 @@
{% for pinte in taken_pintes %}
{{ pinte.pk }}
- {{ pinte.current_owner }}
- {{ pinte.previous_owner }}
+ {% if pinte.current_owner %}{{ pinte.current_owner }} {% endif %}
+ {% if pinte.previous_owner %}{{ pinte.previous_owner }} {% endif %}
{{ pinte.last_update_date }}
- {% if perms.gestion.change_pinte %} Libérer {% endif %}
+ {% if perms.gestion.change_pinte %} Libérer {% endif %}
{% endfor %}
@@ -64,7 +64,7 @@
{% for pinte in free_pintes %}
{{ pinte.pk }}
- {{ pinte.previous_owner }}
+ {% if pinte.previous_owner %}{{ pinte.previous_owner }} {% endif %}
{{ pinte.last_update_date }}
{% endfor %}
diff --git a/gestion/templates/gestion/pintes_user_list.html b/gestion/templates/gestion/pintes_user_list.html
index a827972..eb5a2ae 100644
--- a/gestion/templates/gestion/pintes_user_list.html
+++ b/gestion/templates/gestion/pintes_user_list.html
@@ -23,7 +23,7 @@
{% for user in users %}
{{user}}
- Profil
+ Profil
{{ user.pintes_owned_currently.count }}
{% endfor %}
diff --git a/gestion/templates/gestion/products_list.html b/gestion/templates/gestion/products_list.html
index ce840fd..f986d20 100644
--- a/gestion/templates/gestion/products_list.html
+++ b/gestion/templates/gestion/products_list.html
@@ -11,7 +11,7 @@
Liste des produits
{% if perms.gestion.add_product %}
- Créer un produit
+ Créer un produit
{% endif %}
@@ -41,7 +41,7 @@
{{ product.is_active | yesno:"Oui, Non"}}
{{ product.deg }}
{{ product.volume }} cl
- Profil {% if perms.gestion.change_product %}{% if product.is_active %}Désa{% else %}A{% endif %}ctiver Modifier {% endif %}
+ Profil {% if perms.gestion.change_product %}{% if product.is_active %} Désa{% else %} A{% endif %}ctiver Modifier {% endif %}
{% endfor %}
diff --git a/gestion/views.py b/gestion/views.py
index 525b202..af72595 100644
--- a/gestion/views.py
+++ b/gestion/views.py
@@ -341,7 +341,7 @@ def addProduct(request):
product = form.save()
messages.success(request, "Le produit a bien été ajouté")
return redirect(reverse('gestion:productProfile', kwargs={'pk':product.pk}))
- return render(request, "form.html", {"form": form, "form_title": "Ajout d'un produit", "form_button": "Ajouter"})
+ return render(request, "form.html", {"form": form, "form_title": "Ajout d'un produit", "form_button": "Ajouter", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -374,7 +374,7 @@ def editProduct(request, pk):
form.save()
messages.success(request, "Le produit a bien été modifié")
return redirect(reverse('gestion:productProfile', kwargs={'pk':product.pk}))
- return render(request, "form.html", {"form": form, "form_title": "Modification d'un produit", "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Modification d'un produit", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
@active_required
@login_required
@@ -420,7 +420,7 @@ def searchProduct(request):
form = SearchProductForm(request.POST or None)
if(form.is_valid()):
return redirect(reverse('gestion:productProfile', kwargs={'pk': form.cleaned_data['product'].pk }))
- return render(request, "form.html", {"form": form, "form_title":"Rechercher un produit", "form_button": "Rechercher"})
+ return render(request, "form.html", {"form": form, "form_title":"Rechercher un produit", "form_button": "Rechercher", "form_button_icon": "search"})
@active_required
@login_required
@@ -526,7 +526,7 @@ def addKeg(request):
keg = form.save()
messages.success(request, "Le fût " + keg.name + " a bien été ajouté")
return redirect(reverse('gestion:kegsList'))
- return render(request, "form.html", {"form":form, "form_title": "Ajout d'un fût", "form_button": "Ajouter"})
+ return render(request, "form.html", {"form":form, "form_title": "Ajout d'un fût", "form_button": "Ajouter", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -559,7 +559,7 @@ def editKeg(request, pk):
form.save()
messages.success(request, "Le fût a bien été modifié")
return redirect(reverse('gestion:kegsList'))
- return render(request, "form.html", {"form": form, "form_title": "Modification d'un fût", "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Modification d'un fût", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
@active_required
@login_required
@@ -598,7 +598,7 @@ def openKeg(request):
keg.save()
messages.success(request, "Le fut a bien été percuté")
return redirect(reverse('gestion:kegsList'))
- return render(request, "form.html", {"form": form, "form_title":"Percutage d'un fût", "form_button":"Percuter"})
+ return render(request, "form.html", {"form": form, "form_title":"Percutage d'un fût", "form_button":"Percuter", "form_button_icon": "fill-drip"})
@active_required
@login_required
@@ -660,7 +660,7 @@ def closeKeg(request):
keg.save()
messages.success(request, "Le fût a bien été fermé")
return redirect(reverse('gestion:kegsList'))
- return render(request, "form.html", {"form": form, "form_title":"Fermeture d'un fût", "form_button":"Fermer le fût"})
+ return render(request, "form.html", {"form": form, "form_title":"Fermeture d'un fût", "form_button":"Fermer le fût", "form_button_icon": "fill"})
@active_required
@login_required
@@ -785,7 +785,7 @@ def addMenu(request):
menu = form.save()
messages.success(request, "Le menu " + menu.name + " a bien été ajouté")
return redirect(reverse('gestion:menusList'))
- return render(request, "form.html", {"form":form, "form_title": "Ajout d'un menu", "form_button": "Ajouter", "extra_css": extra_css})
+ return render(request, "form.html", {"form":form, "form_title": "Ajout d'un menu", "form_button": "Ajouter", "form_button_icon": "plus-square", "extra_css": extra_css})
@active_required
@login_required
@@ -819,7 +819,7 @@ def edit_menu(request, pk):
form.save()
messages.success(request, "Le menu a bien été modifié")
return redirect(reverse('gestion:menusList'))
- return render(request, "form.html", {"form": form, "form_title": "Modification d'un menu", "form_button": "Modifier", "extra_css": extra_css})
+ return render(request, "form.html", {"form": form, "form_title": "Modification d'un menu", "form_button": "Modifier", "form_button_icon": "pencil-alt", "extra_css": extra_css})
@active_required
@login_required
@@ -847,7 +847,7 @@ def searchMenu(request):
if(form.is_valid()):
menu = form.cleaned_data['menu']
return redirect(reverse('gestion:editMenu', kwargs={'pk':menu.pk}))
- return render(request, "form.html", {"form": form, "form_title": "Recherche d'un menu", "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Recherche d'un menu", "form_button": "Modifier", "form_button_icon": "search"})
@active_required
@login_required
@@ -989,7 +989,7 @@ def add_pintes(request):
i += 1
messages.success(request, str(i) + " pinte(s) a(ont) été ajoutée(s)")
return redirect(reverse('gestion:productsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Ajouter des pintes", "form_button": "Ajouter"})
+ return render(request, "form.html", {"form": form, "form_title": "Ajouter des pintes", "form_button": "Ajouter", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -1008,7 +1008,7 @@ def release_pintes(request):
i += 1
messages.success(request, str(i) + " pinte(s) a(ont) été libérée(s)")
return redirect(reverse('gestion:productsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Libérer des pintes", "form_button": "Libérer"})
+ return render(request, "form.html", {"form": form, "form_title": "Libérer des pintes", "form_button": "Libérer", "form_button_icon": "glass-whiskey"})
@active_required
@login_required
@@ -1072,4 +1072,4 @@ def gen_releve(request):
now = datetime.datetime.now()
return render_to_pdf(request, 'gestion/releve.tex', {"consumptions": consumptions, "reloads": reloads, "refunds": refunds, "cotisations": cotisations, "begin": begin, "end": end, "now": now, "value_especes": value_especes, "value_lydia": value_lydia, "value_cheque": value_cheque}, filename="releve.pdf")
else:
- return render(request, "form.html", {"form": form, "form_title": "Génération d'un relevé", "form_button": "Générer"})
+ return render(request, "form.html", {"form": form, "form_title": "Génération d'un relevé", "form_button": "Générer", "form_button_icon": "file-pdf"})
diff --git a/preferences/templates/preferences/cotisations_index.html b/preferences/templates/preferences/cotisations_index.html
index eacb342..8ede5a4 100644
--- a/preferences/templates/preferences/cotisations_index.html
+++ b/preferences/templates/preferences/cotisations_index.html
@@ -11,7 +11,7 @@
Liste des cotisations
{% if perms.preferences.add_cotisation %}
- Créer une cotisation
+ Créer une cotisation
{% endif %}
@@ -27,7 +27,7 @@
{{ cotisation.duration }} jours
{{ cotisation.amount }} €
- {% if perms.preferences.change_cotisation %}Modifier {% endif %}{% if perms.preferences.delete_cotisation %}Supprimer {% endif %}
+ {% if perms.preferences.change_cotisation %} Modifier {% endif %}{% if perms.preferences.delete_cotisation %} Supprimer {% endif %}
{% endfor %}
diff --git a/preferences/templates/preferences/general_preferences.html b/preferences/templates/preferences/general_preferences.html
index f8ee3ba..988dea2 100644
--- a/preferences/templates/preferences/general_preferences.html
+++ b/preferences/templates/preferences/general_preferences.html
@@ -26,7 +26,7 @@
@@ -51,7 +51,7 @@
@@ -89,7 +89,7 @@
@@ -115,7 +115,7 @@
@@ -135,7 +135,7 @@
diff --git a/preferences/templates/preferences/payment_methods_index.html b/preferences/templates/preferences/payment_methods_index.html
index b79ea22..31e6454 100644
--- a/preferences/templates/preferences/payment_methods_index.html
+++ b/preferences/templates/preferences/payment_methods_index.html
@@ -11,7 +11,7 @@
Liste des moyens de paiement
{% if perms.preferences.add_paymentmethod %}
- Créer un moyen de paiement
+ Créer un moyen de paiement
{% endif %}
@@ -35,7 +35,7 @@
{{ pm.is_usable_in_reload | yesno:"Oui, Non" }}
{{ pm.affect_balance | yesno:"Oui, Non" }}
- {% if perms.preferences.change_paymentmethod %}Modifier {% endif %}{% if perms.preferences.delete_paymentmethod %}Supprimer {% endif %}
+ {% if perms.preferences.change_paymentmethod %} Modifier {% endif %}{% if perms.preferences.delete_paymentmethod %} Supprimer {% endif %}
{% endfor %}
diff --git a/preferences/views.py b/preferences/views.py
index b9bba9c..7c4f4a4 100644
--- a/preferences/views.py
+++ b/preferences/views.py
@@ -84,7 +84,7 @@ def addCotisation(request):
cotisation = form.save()
messages.success(request, "La cotisation (" + str(cotisation.duration) + " jours, " + str(cotisation.amount) + "€) a bien été créée")
return redirect(reverse('preferences:cotisationsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Création d'une cotisation", "form_button": "Créer"})
+ return render(request, "form.html", {"form": form, "form_title": "Création d'une cotisation", "form_button": "Créer", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -117,7 +117,7 @@ def editCotisation(request, pk):
cotisation = form.save()
messages.success(request, "La cotisation (" + str(cotisation.duration) + " jours, " + str(cotisation.amount) + "€) a bien été modifiée")
return redirect(reverse('preferences:cotisationsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Modification d'une cotisation", "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Modification d'une cotisation", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
@active_required
@login_required
@@ -184,7 +184,7 @@ def addPaymentMethod(request):
paymentMethod = form.save()
messages.success(request, "Le moyen de paiement " + paymentMethod.name + " a bien été crée")
return redirect(reverse('preferences:paymentMethodsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Création d'un moyen de paiement", "form_button": "Créer"})
+ return render(request, "form.html", {"form": form, "form_title": "Création d'un moyen de paiement", "form_button": "Créer", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -217,7 +217,7 @@ def editPaymentMethod(request, pk):
paymentMethod = form.save()
messages.success(request, "Le moyen de paiment " + paymentMethod.name + " a bien été modifié")
return redirect(reverse('preferences:paymentMethodsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Modification d'un moyen de paiement", "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Modification d'un moyen de paiement", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
@active_required
@login_required
diff --git a/templates/form.html b/templates/form.html
index 592927a..be760ba 100644
--- a/templates/form.html
+++ b/templates/form.html
@@ -16,7 +16,7 @@
{% csrf_token %}
{{ form }}
- {{form_button}}
+ {{form_button}}
diff --git a/templates/nav.html b/templates/nav.html
index 188251a..d19985f 100644
--- a/templates/nav.html
+++ b/templates/nav.html
@@ -45,5 +45,5 @@
Deconnexion
{% else %}
- Connexion
+ Connexion
{% endif %}
diff --git a/users/templates/users/admins_index.html b/users/templates/users/admins_index.html
index 8c1e04c..f021b2b 100644
--- a/users/templates/users/admins_index.html
+++ b/users/templates/users/admins_index.html
@@ -10,7 +10,7 @@
- Ajouter un admin
+ Ajouter un admin
@@ -24,8 +24,8 @@
{% for user in admins %}
{{ user }} { {% if user.is_superuser %}(superuser){% endif %}
- Profil
- {% if not user.is_superuser %}Retirer des admins {% endif %}
+ Profil
+ {% if not user.is_superuser %} Retirer des admins {% endif %}
{% endfor %}
diff --git a/users/templates/users/group_profile.html b/users/templates/users/group_profile.html
index 17f89cc..056f38f 100644
--- a/users/templates/users/group_profile.html
+++ b/users/templates/users/group_profile.html
@@ -21,12 +21,12 @@
{% if perms.auth.change_group %}
{% endif %}
{% if perms.auth.delete_group %}
{% endif %}
@@ -49,7 +49,7 @@
{{perm.codename}}
{{perm.name}}
- Enlever le droit
+ Enlever le droit
{% endfor %}
@@ -72,9 +72,9 @@
{% for user in group.user_set.all %}
- {{user}}
- Profil
- Retirer
+ {{user}}
+ Profil
+ Retirer
{% endfor %}
diff --git a/users/templates/users/groups_index.html b/users/templates/users/groups_index.html
index 2bc9ddb..a43f9df 100644
--- a/users/templates/users/groups_index.html
+++ b/users/templates/users/groups_index.html
@@ -11,7 +11,7 @@
Liste des groupes de droit
{% if perms.auth.add_group %}
- Ajouter un groupe de droit
+ Ajouter un groupe de droit
{% endif %}
@@ -29,7 +29,7 @@
{{ group.name }}
{{ group.permissions.count }}
{{ group.user_set.count }}
- Voir {% if perms.auth.change_group %}Éditer {% endif %}{% if perms.auth.delete_group %}Supprimer {% endif %}
+ Voir {% if perms.auth.change_group %} Éditer {% endif %}{% if perms.auth.delete_group %} Supprimer {% endif %}
{% endfor %}
diff --git a/users/templates/users/index.html b/users/templates/users/index.html
index 451c552..3c53a5a 100644
--- a/users/templates/users/index.html
+++ b/users/templates/users/index.html
@@ -107,7 +107,7 @@
{% csrf_token %}
{{export_form}}
- Exporter au format csv
+ Exporter au format csv
{% endif %}
diff --git a/users/templates/users/profile.html b/users/templates/users/profile.html
index 778dac2..0eae992 100644
--- a/users/templates/users/profile.html
+++ b/users/templates/users/profile.html
@@ -52,19 +52,19 @@
@@ -129,7 +129,7 @@
{{c.amount}} €
{{c.paymentMethod}}
{{c.date}}
- {% if perms.gestion.delete_consumptionhistory %}Annuler {% endif %}
+ {% if perms.gestion.delete_consumptionhistory %} Annuler {% endif %}
{%endfor%}
@@ -163,7 +163,7 @@
{{m.amount}} €
{{m.paymentMethod}}
{{m.date}}
- {% if perms.gestion.delete_menuhistory %}Annuler {% endif %}
+ {% if perms.gestion.delete_menuhistory %} Annuler {% endif %}
{%endfor%}
@@ -196,7 +196,7 @@
{{reload.PaymentMethod}}
{{reload.date}}
{% if perms.gestion.delete_reload %}
- Annuler
+ Annuler
{% endif %}
{% endfor %}
@@ -211,7 +211,7 @@
{{ self | yesno:"Mes cotisations,Cotisations"}}
- Ajouter une cotisation
+ Ajouter une cotisation
@@ -234,7 +234,7 @@
{{cotisation.paymentMethod}}
{{cotisation.endDate}}
{{cotisation.valid}}
- {% if perms.users.validate_cotisationHistory %}Valider Invalider {% endif %}
+ {% if perms.users.validate_cotisationHistory %} Valider Invalider {% endif %}
{% endfor %}
@@ -248,7 +248,7 @@
{{ self | yesno:"Mes accès gracieux,Accès gracieux"}}
- Ajouter un accès à titre gracieux
+ Ajouter un accès à titre gracieux
diff --git a/users/templates/users/schools_index.html b/users/templates/users/schools_index.html
index 47c7065..913e543 100644
--- a/users/templates/users/schools_index.html
+++ b/users/templates/users/schools_index.html
@@ -10,7 +10,7 @@
- Créer une école
+ Créer une école
@@ -23,7 +23,7 @@
{% for school in schools %}
{{ school }}
- {% if perms.gestion.change_school %}Modifier {% endif %}{% if perms.gestion.delete_school %}Supprimer {% endif %}
+ {% if perms.gestion.change_school %} Modifier {% endif %}{% if perms.gestion.delete_school %} Supprimer {% endif %}
{% endfor %}
diff --git a/users/templates/users/superusers_index.html b/users/templates/users/superusers_index.html
index 9c4a5ff..02fa984 100644
--- a/users/templates/users/superusers_index.html
+++ b/users/templates/users/superusers_index.html
@@ -10,7 +10,7 @@
- Ajouter un superuser
+ Ajouter un superuser
@@ -23,9 +23,9 @@
{% for user in superusers %}
- {{user}}
- Profil
- Retirer des superusers
+ {{user}}
+ Profil
+ Retirer des superusers
{% endfor %}
diff --git a/users/templates/users/users_index.html b/users/templates/users/users_index.html
index 7bc806d..c0c73b0 100644
--- a/users/templates/users/users_index.html
+++ b/users/templates/users/users_index.html
@@ -10,7 +10,7 @@
- Créer un utilisateur
+ Créer un utilisateur
@@ -25,10 +25,10 @@
{% for user in users %}
- {{user}}
- Profil
+ {{user}}
+ Profil
{% if perms.auth.change_user %}
- {{ user.is_active | yesno:"Désa,A"}}ctiver
+ {% if user.is_active %} Désactiver{% else %} Activer{% endif %}
{% endif %}
{% endfor %}
diff --git a/users/views.py b/users/views.py
index ca37f2f..0836054 100644
--- a/users/views.py
+++ b/users/views.py
@@ -52,7 +52,7 @@ def loginView(request):
return redirect(reverse('users:profile', kwargs={'pk':request.user.pk}))
else:
messages.error(request, "Nom d'utilisateur et/ou mot de passe invalide")
- return render(request, "form.html", {"form_entete": "Connexion", "form": form, "form_title": "Connexion", "form_button": "Se connecter"})
+ return render(request, "form.html", {"form_entete": "Connexion", "form": form, "form_title": "Connexion", "form_button": "Se connecter", "form_button_icon": "sign-in-alt"})
@active_required
@login_required
@@ -225,7 +225,7 @@ def createUser(request):
user.save()
messages.success(request, "L'utilisateur a bien été créé")
return redirect(reverse('users:profile', kwargs={'pk':user.pk}))
- return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title":"Création d'un nouvel utilisateur", "form_button":"Créer l'utilisateur"})
+ return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title":"Création d'un nouvel utilisateur", "form_button":"Créer l'utilisateur", "form_button_icon": "user-plus"})
@active_required
@login_required
@@ -252,7 +252,7 @@ def searchUser(request):
form = SelectUserForm(request.POST or None)
if(form.is_valid()):
return redirect(reverse('users:profile', kwargs={"pk":form.cleaned_data['user'].pk}))
- return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Rechercher un utilisateur", "form_button": "Afficher le profil"})
+ return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Rechercher un utilisateur", "form_button": "Afficher le profil", "form_button_icon": "search"})
@active_required
@login_required
@@ -305,7 +305,7 @@ def editGroups(request, pk):
messages.success(request, "Les groupes de l'utilisateur " + user.username + " ont bien été enregistrés.")
return redirect(reverse('users:profile', kwargs={'pk':pk}))
extra_css = "#id_groups{height:200px;}"
- return render(request, "form.html", {"form_entete": "Gestion de l'utilisateur " + user.username, "form": form, "form_title": "Modification des groupes", "form_button": "Enregistrer", "extra_css": extra_css})
+ return render(request, "form.html", {"form_entete": "Gestion de l'utilisateur " + user.username, "form": form, "form_title": "Modification des groupes", "form_button": "Enregistrer", "form_button_icon": "pencil-alt", "extra_css": extra_css})
@active_required
@login_required
@@ -345,7 +345,7 @@ def editPassword(request, pk):
return redirect(reverse('users:profile', kwargs={'pk':pk}))
else:
messages.error(request, "Le mot de passe actuel est incorrect")
- return render(request, "form.html", {"form_entete": "Modification de mon compte", "form": form, "form_title": "Modification de mon mot de passe", "form_button": "Modifier mon mot de passe"})
+ return render(request, "form.html", {"form_entete": "Modification de mon compte", "form": form, "form_title": "Modification de mon mot de passe", "form_button": "Modifier mon mot de passe", "form_button_icon": "pencil-alt"})
@active_required
@login_required
@@ -379,7 +379,7 @@ def editUser(request, pk):
user.save()
messages.success(request, "Les modifications ont bien été enregistrées")
return redirect(reverse('users:profile', kwargs={'pk': pk}))
- return render(request, "form.html", {"form_entete":"Modification du compte " + user.username, "form": form, "form_title": "Modification des informations", "form_button": "Modifier"})
+ return render(request, "form.html", {"form_entete":"Modification du compte " + user.username, "form": form, "form_title": "Modification des informations", "form_button": "Modifier", "form_button_icon": "pencil-alt"})
@active_required
@login_required
@@ -583,7 +583,7 @@ def createGroup(request):
group = form.save()
messages.success(request, "Le groupe " + form.cleaned_data['name'] + " a bien été crée.")
return redirect(reverse('users:groupProfile', kwargs={'pk': group.pk}))
- return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title": "Création d'un groupe de droit", "form_button": "Créer le groupe de droit"})
+ return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form":form, "form_title": "Création d'un groupe de droit", "form_button": "Créer le groupe de droit", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -617,7 +617,7 @@ def editGroup(request, pk):
form.save()
messages.success(request, "Le groupe " + group.name + " a bien été modifié.")
return redirect(reverse('users:groupProfile', kwargs={'pk': group.pk}))
- return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Modification du groupe de droit " + group.name, "form_button": "Modifier le groupe de droit", "extra_css":extra_css})
+ return render(request, "form.html", {"form_entete": "Gestion des utilisateurs", "form": form, "form_title": "Modification du groupe de droit " + group.name, "form_button": "Modifier le groupe de droit", "form_button_icon": "pencil-alt", "extra_css":extra_css})
@active_required
@login_required
@@ -736,7 +736,7 @@ def addAdmin(request):
user.save()
messages.success(request, "L'utilisateur " + user.username + " a bien été rajouté aux admins")
return redirect(reverse('users:adminsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Ajout d'un admin", "form_button":"Ajouter l'utilisateur aux admins"})
+ return render(request, "form.html", {"form": form, "form_title": "Ajout d'un admin", "form_button": "Ajouter l'utilisateur aux admins", "form_button_icon": "user-plus"})
@active_required
@login_required
@@ -814,7 +814,7 @@ def addSuperuser(request):
user.save()
messages.success(request, "L'utilisateur " + user.username + " a bien été rajouté aux superusers")
return redirect(reverse('users:superusersIndex'))
- return render(request, "form.html", {"form_entete": "Gestion des superusers", "form": form, "form_title": "Ajout d'un superuser", "form_button":"Ajouter l'utilisateur aux superusers"})
+ return render(request, "form.html", {"form_entete": "Gestion des superusers", "form": form, "form_title": "Ajout d'un superuser", "form_button":"Ajouter l'utilisateur aux superusers", "form_button_icon": "user-plus"})
@active_required
@login_required
@@ -888,7 +888,7 @@ def addCotisationHistory(request, pk):
cotisation.save()
messages.success(request, "La cotisation a bien été ajoutée")
return redirect(reverse('users:profile',kwargs={'pk':user.pk}))
- return render(request, "form.html",{"form": form, "form_title": "Ajout d'une cotisation pour l'utilisateur " + str(user), "form_button": "Ajouter"})
+ return render(request, "form.html",{"form": form, "form_title": "Ajout d'une cotisation pour l'utilisateur " + str(user), "form_button": "Ajouter", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -969,7 +969,7 @@ def addWhiteListHistory(request, pk):
whiteList.save()
messages.success(request, "L'accès gracieux a bien été ajouté")
return redirect(reverse('users:profile', kwargs={'pk':user.pk}))
- return render(request, "form.html", {"form": form, "form_title": "Ajout d'un accès gracieux pour " + user.username, "form_button": "Ajouter"})
+ return render(request, "form.html", {"form": form, "form_title": "Ajout d'un accès gracieux pour " + user.username, "form_button": "Ajouter", "form_button_icon": "plus-square"})
########## Schools ##########
@@ -1019,7 +1019,7 @@ def createSchool(request):
form.save()
messages.success(request, "L'école a bien été créée")
return redirect(reverse('users:schoolsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Création d'une école", "form_button": "Créer"})
+ return render(request, "form.html", {"form": form, "form_title": "Création d'une école", "form_button": "Créer", "form_button_icon": "plus-square"})
@active_required
@login_required
@@ -1052,7 +1052,7 @@ def editSchool(request, pk):
form.save()
messages.success(request, "L'école a bien été modifiée")
return redirect(reverse('users:schoolsIndex'))
- return render(request, "form.html", {"form": form, "form_title": "Modification de l'école " + str(school), "form_button": "Modifier"})
+ return render(request, "form.html", {"form": form, "form_title": "Modification de l'école " + str(school), "form_button": "Modifier", "form_button": "pencil-alt"})
@active_required
@login_required