SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 22115053 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Debug invitation form

parent 2f1f64a7
No related branches found
No related tags found
No related merge requests found
......@@ -67,9 +67,11 @@ class RegistrationInvitationForm(forms.ModelForm):
{'placeholder': 'NOTE: a personal phrase or two. The bulk of the text will be auto-generated.'})
self.fields['cited_in_submission'] = forms.ModelChoiceField(
queryset=Submission.objects.all().exclude(
status__in=SUBMISSION_STATUS_PUBLICLY_UNLISTED).order_by('-submission_date'))
status__in=SUBMISSION_STATUS_PUBLICLY_UNLISTED).order_by('-submission_date'),
required=False)
self.fields['cited_in_publication'] = forms.ModelChoiceField(
queryset=Publication.objects.all().order_by('-publication_date'))
queryset=Publication.objects.all().order_by('-publication_date'),
required=False)
self.helper = FormHelper()
self.helper.layout = Layout(
Div(
......
......@@ -465,6 +465,9 @@ def registration_invitations(request):
Utils.create_invitation()
Utils.send_registration_invitation_email()
return HttpResponseRedirect('registration_invitation_sent')
else:
errormessage = 'The form was not filled validly.'
else:
reg_inv_form = RegistrationInvitationForm()
......
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