8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

Affiche les CGU que lorsqu'on crée un nouvel utilisateur

This commit is contained in:
Yoann Pétri 2018-01-27 23:15:01 +01:00 committed by root
parent 477aab3a7f
commit c3aace28df
2 changed files with 7 additions and 5 deletions

View file

@ -37,9 +37,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
</form>
<br>
{% if showCGU %}
<p>En cliquant sur Créer ou modifier, l'utilisateur s'engage à respecter les <a href="/media/{{ GTU }}" download="CGU" >règles d'utilisation du réseau</a>.</p>
<h3>Résumé des règles d'utilisations</h3>
<p>{{ GTU_sum_up }}</p>
{% endif %}
<br/>
<br/>
<br/>

View file

@ -138,7 +138,7 @@ def new_user(request):
'users:profil',
kwargs={'userid':str(user.id)}
))
return form({'userform': user,'GTU_sum_up':GTU_sum_up,'GTU':GTU}, 'users/user.html', request)
return form({'userform': user,'GTU_sum_up':GTU_sum_up,'GTU':GTU,'showCGU':True}, 'users/user.html', request)
@login_required
@ -160,7 +160,7 @@ def new_club(request):
'users:profil',
kwargs={'userid':str(club.id)}
))
return form({'userform': club}, 'users/user.html', request)
return form({'userform': club, 'showCGU':False}, 'users/user.html', request)
@login_required
@ -181,7 +181,7 @@ def edit_club_admin_members(request, club_instance, clubid):
'users:profil',
kwargs={'userid':str(club_instance.id)}
))
return form({'userform': club}, 'users/user.html', request)
return form({'userform': club, 'showCGU':False}, 'users/user.html', request)
@login_required
@ -366,7 +366,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}, 'users/user.html', request)
@login_required
@can_edit(Ban)
@ -415,7 +415,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}, 'users/user.html', request)
@login_required