mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
frontend sur l'affichage des options mail
This commit is contained in:
parent
5177ab2b38
commit
fcbb916676
3 changed files with 42 additions and 22 deletions
|
@ -57,7 +57,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ useroptions.all_can_create_club }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h5>Gestion du solde {% if useroptions.user_solde %}<span class="label label-success">Activé{% else %}<span class="label label-danger"> Désactivé{% endif%}</span></h5>
|
||||
<h5>{% if useroptions.user_solde %}<span class="label label-success">Gestion du solde{% else %}<span class="label label-danger">Gesion du solde{% endif%}</span></h5>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Activation du solde pour les utilisateurs</th>
|
||||
|
@ -73,7 +73,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<td>{{ useroptions.min_online_payment }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h5>Comptes mails {% if useroptions.mail_accounts %}<span class="label label-success">Activé{% else %}<span class="label label-danger"> Désactivé{% endif%}</span></h5>
|
||||
<h5>{% if useroptions.mail_accounts %}<span class="label label-success">Comptes mails{% else %}<span class="label label-danger">Comptes mails{% endif%}</span></h5>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Gestion des comptes mails</th>
|
||||
|
|
|
@ -429,10 +429,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading clearfix" data-parent="#accordion" data-toggle="collapse" data-target="#collapse7">
|
||||
<h3 class="panel-title pull-left">
|
||||
<h3 class="panel-title pull-left">
|
||||
<i class="fa fa-envelope"></i>
|
||||
Gestion des mails
|
||||
</h3>
|
||||
Paramètres mail
|
||||
</h3>
|
||||
</div>
|
||||
<div id="collapse7" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
|
@ -442,19 +442,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
Modifier les options mail
|
||||
</a>
|
||||
{% acl_end %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Adresse mail externe</th>
|
||||
<th>Compte mail {{ asso_name }}</th>
|
||||
<th>Adresse mail de contact</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ user.external_mail }}</td>
|
||||
<td>{{ user.internal_address|yesno:"Activé,Désactivé" }}</td>
|
||||
<td>{{ user.get_mail }}</td>
|
||||
</table>
|
||||
</div>
|
||||
{% if mail_accounts %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Adresse mail externe</th>
|
||||
<th>Compte mail {{ asso_name }}</th>
|
||||
<th>Adresse mail de contact</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ user.external_mail }}</td>
|
||||
<td>{{ user.internal_address|yesno:"Activé,Désactivé" }}</td>
|
||||
<td>{{ user.get_mail }}</td>
|
||||
</table>
|
||||
<div class="alert alert-info" role="alert">
|
||||
Vous pouvez bénéficier d'une adresse mail {{ asso_name }}.
|
||||
Vous pouvez également la rediriger vers une adresse externe en modifiant les options mail.
|
||||
</div>
|
||||
</div>
|
||||
{% if user.internal_address %}
|
||||
{% can_create MailAlias %}
|
||||
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-mailalias' users.id %}">
|
||||
<i class="fa fa-plus-square"></i>
|
||||
|
@ -464,7 +470,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
{% if alias_list %}
|
||||
{% include "users/aff_alias.html" with alias_list=alias_list %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Adresse mail</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ user.external_mail }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -572,13 +572,13 @@ def edit_mail(request, user_instance, **_kwargs):
|
|||
if mail.is_valid():
|
||||
if mail.changed_data:
|
||||
mail.save()
|
||||
messages.success(request, "Compte mail modifiée")
|
||||
messages.success(request, "Option mail modifiée")
|
||||
return redirect(reverse(
|
||||
'users:profil',
|
||||
kwargs={'userid': str(user_instance.id)}
|
||||
))
|
||||
return form(
|
||||
{'userform': mail, 'action_name': 'Editer un compte mail'},
|
||||
{'userform': mail, 'action_name': 'Editer les options mail'},
|
||||
'users/user.html',
|
||||
request
|
||||
)
|
||||
|
@ -985,7 +985,8 @@ def profil(request, users, **_kwargs):
|
|||
'allow_online_payment': allow_online_payment,
|
||||
'solde_activated': OptionalUser.objects.first().user_solde,
|
||||
'asso_name': AssoOption.objects.first().name,
|
||||
'alias_list': users.mailalias_set.all()
|
||||
'alias_list': users.mailalias_set.all(),
|
||||
'mail_accounts': OptionalUser.objects.first().mail_accounts
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue