Commit 304de3f7 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Labels corrects sur les boutons de validation

parent d3b41d6a
......@@ -146,7 +146,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h3>Ipv6</h3>
{% bootstrap_form ipv6form %}
{% endif %}
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
{% bootstrap_button action_name button_type="submit" icon="star" %}
</form>
<br />
<br />
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<form class="form" method="post">
{% csrf_token %}
{% massive_bootstrap_form userform 'room,school,administrators,members' %}
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
{% bootstrap_button action_name button_type="submit" icon="star" %}
</form>
<br>
{% if showCGU %}
......
......@@ -122,7 +122,7 @@ def new_user(request):
'users:profil',
kwargs={'userid':str(user.id)}
))
return form({'userform': user,'GTU_sum_up':GTU_sum_up,'GTU':GTU,'showCGU':True}, 'users/user.html', request)
return form({'userform': user,'GTU_sum_up':GTU_sum_up,'GTU':GTU,'showCGU':True, 'action_name':'Créer un utilisateur'}, 'users/user.html', request)
@login_required
......@@ -144,7 +144,7 @@ def new_club(request):
'users:profil',
kwargs={'userid':str(club.id)}
))
return form({'userform': club, 'showCGU':False}, 'users/user.html', request)
return form({'userform': club, 'showCGU':False, 'action_name':'Créer un club'}, 'users/user.html', request)
@login_required
......@@ -165,7 +165,7 @@ def edit_club_admin_members(request, club_instance, clubid):
'users:profil',
kwargs={'userid':str(club_instance.id)}
))
return form({'userform': club, 'showCGU':False}, 'users/user.html', request)
return form({'userform': club, 'showCGU':False, 'action_name':'Editer les admin et membres'}, 'users/user.html', request)
@login_required
......@@ -198,7 +198,7 @@ def edit_info(request, user, userid):
'users:profil',
kwargs={'userid':str(userid)}
))
return form({'userform': user}, 'users/user.html', request)
return form({'userform': user, 'action_name': "Editer l'utilisateur"}, 'users/user.html', request)
@login_required
......@@ -225,7 +225,7 @@ def state(request, user, userid):
'users:profil',
kwargs={'userid':str(userid)}
))
return form({'userform': state}, 'users/user.html', request)
return form({'userform': state, 'action_name': "Editer l'état"}, 'users/user.html', request)
@login_required
......@@ -244,7 +244,7 @@ def groups(request, user, userid):
'users:profil',
kwargs={'userid':str(userid)}
))
return form({'userform': group}, 'users/user.html', request)
return form({'userform': group, 'action_name':'Editer les groupes'}, 'users/user.html', request)
@login_required
......@@ -264,7 +264,7 @@ def password(request, user, userid):
'users:profil',
kwargs={'userid':str(user.id)}
))
return form({'userform': u_form}, 'users/user.html', request)
return form({'userform': u_form, 'action_name':'Changer le mot de passe'}, 'users/user.html', request)
@login_required
......@@ -294,7 +294,7 @@ def new_serviceuser(request):
"L'utilisateur %s a été crée" % user_object.pseudo
)
return redirect(reverse('users:index-serviceusers'))
return form({'userform': user}, 'users/user.html', request)
return form({'userform': user, 'action_name':'Créer un serviceuser'}, 'users/user.html', request)
@login_required
......@@ -314,7 +314,7 @@ def edit_serviceuser(request, user, userid):
))
messages.success(request, "L'user a bien été modifié")
return redirect(reverse('users:index-serviceusers'))
return form({'userform': user}, 'users/user.html', request)
return form({'userform': user, 'action_name':'Editer un serviceuser'}, 'users/user.html', request)
@login_required
......@@ -358,7 +358,7 @@ def add_ban(request, user, userid):
request,
"Attention, cet utilisateur a deja un bannissement actif"
)
return form({'userform': ban}, 'users/user.html', request)
return form({'userform': ban, 'action_name': 'Ajouter un ban'}, 'users/user.html', request)
@login_required
@can_edit(Ban)
......@@ -376,7 +376,7 @@ def edit_ban(request, ban_instance, banid):
))
messages.success(request, "Bannissement modifié")
return redirect(reverse('users:index'))
return form({'userform': ban}, 'users/user.html', request)
return form({'userform': ban, 'action_name': 'Editer un ban'}, 'users/user.html', request)
@login_required
......@@ -407,7 +407,7 @@ def add_whitelist(request, user, userid):
request,
"Attention, cet utilisateur a deja un accès gracieux actif"
)
return form({'userform': whitelist}, 'users/user.html', request)
return form({'userform': whitelist, 'action_name': 'Ajouter une whitelist'}, 'users/user.html', request)
@login_required
......@@ -430,7 +430,7 @@ def edit_whitelist(request, whitelist_instance, whitelistid):
))
messages.success(request, "Whitelist modifiée")
return redirect(reverse('users:index'))
return form({'userform': whitelist}, 'users/user.html', request)
return form({'userform': whitelist, 'action_name': 'Editer une whitelist'}, 'users/user.html', request)
@login_required
......@@ -446,7 +446,7 @@ def add_school(request):
reversion.set_comment("Création")
messages.success(request, "L'établissement a été ajouté")
return redirect(reverse('users:index-school'))
return form({'userform': school}, 'users/user.html', request)
return form({'userform': school, 'action_name':'Ajouter'}, 'users/user.html', request)
@login_required
......@@ -464,7 +464,7 @@ def edit_school(request, school_instance, schoolid):
))
messages.success(request, "Établissement modifié")
return redirect(reverse('users:index-school'))
return form({'userform': school}, 'users/user.html', request)
return form({'userform': school, 'action_name':'Editer'}, 'users/user.html', request)
@login_required
......@@ -489,7 +489,7 @@ def del_school(request, instances):
"L'établissement %s est affecté à au moins un user, \
vous ne pouvez pas le supprimer" % school_del)
return redirect(reverse('users:index-school'))
return form({'userform': school}, 'users/user.html', request)
return form({'userform': school, 'action_name': 'Supprimer'}, 'users/user.html', request)
@login_required
......@@ -505,7 +505,7 @@ def add_listright(request):
reversion.set_comment("Création")
messages.success(request, "Le droit/groupe a été ajouté")
return redirect(reverse('users:index-listright'))
return form({'userform': listright}, 'users/user.html', request)
return form({'userform': listright, 'action_name': 'Ajouter'}, 'users/user.html', request)
@login_required
......@@ -526,7 +526,7 @@ def edit_listright(request, listright_instance, listrightid):
))
messages.success(request, "Droit modifié")
return redirect(reverse('users:index-listright'))
return form({'userform': listright}, 'users/user.html', request)
return form({'userform': listright, 'action_name': 'Editer'}, 'users/user.html', request)
@login_required
......@@ -549,7 +549,7 @@ def del_listright(request, instances):
"Le groupe %s est affecté à au moins un user, \
vous ne pouvez pas le supprimer" % listright_del)
return redirect(reverse('users:index-listright'))
return form({'userform': listright}, 'users/user.html', request)
return form({'userform': listright, 'action_name': 'Supprimer'}, 'users/user.html', request)
@login_required
......@@ -797,12 +797,12 @@ def reset_password(request):
)
except User.DoesNotExist:
messages.error(request, "Cet utilisateur n'existe pas")
return form({'userform': userform}, 'users/user.html', request)
return form({'userform': userform, 'action_name': 'Réinitialiser'}, 'users/user.html', request)
user.reset_passwd_mail(request)
messages.success(request, "Un mail pour l'initialisation du mot\
de passe a été envoyé")
redirect(reverse('index'))
return form({'userform': userform}, 'users/user.html', request)
return form({'userform': userform, 'action_name': 'Réinitialiser'}, 'users/user.html', request)
def process(request, token):
......@@ -829,7 +829,7 @@ def process_passwd(request, req):
req.delete()
messages.success(request, "Le mot de passe a changé")
return redirect(reverse('index'))
return form({'userform': u_form}, 'users/user.html', request)
return form({'userform': u_form, 'action_name': 'Changer le mot de passe'}, 'users/user.html', request)
class JSONResponse(HttpResponse):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment