SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 6e0589ad authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Merge branch 'master' into development

parents a502d338 94820dc0
No related branches found
No related tags found
No related merge requests found
...@@ -20,14 +20,17 @@ def petition(request, slug): ...@@ -20,14 +20,17 @@ def petition(request, slug):
if request.user.is_authenticated: if request.user.is_authenticated:
is_signed = petition.petition_signatories.verified().filter( is_signed = petition.petition_signatories.verified().filter(
signatory=request.user.contributor).exists() signatory=request.user.contributor).exists()
affiliation = request.user.contributor.affiliations.first() or {}
institition = affiliation.institution.name if affiliation else ''
country = affiliation.institution.country if affiliation else ''
initial = { initial = {
'petition': petition, 'petition': petition,
'title': request.user.contributor.title, 'title': request.user.contributor.title,
'first_name': request.user.first_name, 'first_name': request.user.first_name,
'last_name': request.user.last_name, 'last_name': request.user.last_name,
'email': request.user.email, 'email': request.user.email,
'country_of_employment': request.user.contributor.affiliation.country_of_employment, 'country_of_employment': country,
'affiliation': request.user.contributor.affiliation.name, 'affiliation': institition,
} }
form = SignPetitionForm(request.POST or None, initial=initial, petition=petition, form = SignPetitionForm(request.POST or None, initial=initial, petition=petition,
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<div style="text-align: center;"> <div style="text-align: center;">
<img src="//scipost.org/static/scipost/images/logo_scipost_RGB_HTML_groot.png" alt="SciPost logo" width="240" style="margin-top: 20px; margin-bottom: 20px" /> <img src="//scipost.org/static/scipost/images/logo_scipost_RGB_HTML_groot.png" alt="SciPost logo" width="240" style="margin-top: 20px; margin-bottom: 20px" />
<h1>The server responded with an error.</h1> <h1>We are sorry, something went wrong.</h1>
<h2>500</h2> <h2>500</h2>
<h3>We are sorry, something went wrong. The SciPost administrators have been informed.</h3> <h3>The SciPost administrators have been informed.</h3>
<p style="margin-top: 20px;">Go back to <a href="//scipost.org">the homepage</a>.</p> <p style="margin-top: 20px;">Go back to <a href="//scipost.org">the homepage</a>.</p>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment