Commit d8255575 authored by Patrick's avatar Patrick

Use of django-angular==0.8.4

parent 5bd29cf5
......@@ -67,7 +67,15 @@ def send_mail_to_all_members_view(request):
bcc=to_email_customer
)
send_email(email=email)
# return HttpResponseRedirect('/') # Redirect after POST
email = form.fields["your_email"]
email.initial = request.user.email
email.widget.attrs['readonly'] = True
recipient = form.fields["recipient"]
if is_coordinator:
recipient.initial = _("All members as coordinator")
else:
recipient.initial = _("All members accepting to show they mail address")
recipient.widget.attrs['readonly'] = True
return render(request, "repanier/send_mail_to_all_members.html",
{'form': form, 'update': '2'})
else:
......
......@@ -93,7 +93,6 @@ def send_mail_to_coordinators_view(request):
raise Http404
if request.method == 'POST':
form = CoordinatorsContactValidationForm(request.POST)
# request.POST = form.data
if form.is_valid():
to_email_staff = []
selected_staff_members = form.cleaned_data.get('staff')
......@@ -111,6 +110,9 @@ def send_mail_to_coordinators_view(request):
)
send_email(email=email)
# return HttpResponseRedirect('/')
email = form.fields["your_email"]
email.initial = request.user.email
email.widget.attrs['readonly'] = True
return render(request, "repanier/send_mail_to_coordinators.html",
{'form': form, 'update': '2'})
else:
......
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