Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
chris
repanier
Commits
d8255575
Commit
d8255575
authored
Dec 25, 2016
by
Patrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use of django-angular==0.8.4
parent
5bd29cf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
repanier/views/send_mail_to_all_members_view.py
repanier/views/send_mail_to_all_members_view.py
+9
-1
repanier/views/send_mail_to_coordinators_view.py
repanier/views/send_mail_to_coordinators_view.py
+3
-1
No files found.
repanier/views/send_mail_to_all_members_view.py
View file @
d8255575
...
...
@@ -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
:
...
...
repanier/views/send_mail_to_coordinators_view.py
View file @
d8255575
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment