Customize mail sent to WG chairs requesting submission approval.
Added the domain of the tool to the url. Save the submitter info. Fixes #606 - Legacy-Id: 2876
This commit is contained in:
parent
c1c37818ea
commit
3bd2097171
|
@ -7,6 +7,7 @@ import datetime
|
|||
from django import forms
|
||||
from django.forms.fields import email_re
|
||||
from django.conf import settings
|
||||
from django.contrib.sites.models import Site
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.html import mark_safe
|
||||
|
||||
|
@ -320,7 +321,7 @@ class AutoPostForm(forms.Form):
|
|||
{'draft': self.draft })
|
||||
|
||||
def save_submitter_info(self):
|
||||
TempIdAuthors.objects.create(
|
||||
return TempIdAuthors.objects.create(
|
||||
id_document_tag=self.draft.temp_id_document_tag,
|
||||
first_name=self.cleaned_data['first_name'],
|
||||
last_name=self.cleaned_data['last_name'],
|
||||
|
@ -465,4 +466,4 @@ class MetaDataForm(AutoPostForm):
|
|||
cc += [i.person.email()[1] for i in self.draft.group_acronym.wgchair_set.all()]
|
||||
cc = list(set(cc))
|
||||
send_mail(request, to_email, from_email, subject, 'submit/manual_post_mail.txt',
|
||||
{'form': self, 'draft': self.draft }, cc=cc)
|
||||
{'form': self, 'draft': self.draft, 'domain': Site.objects.get_current().domain }, cc=cc)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Copyright The IETF Trust 2007, All Rights Reserved
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.contrib.sites.models import Site
|
||||
from django.http import HttpResponseRedirect, Http404, HttpResponseForbidden
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.shortcuts import render_to_response
|
||||
|
@ -91,6 +92,7 @@ def draft_status(request, submission_id, message=None):
|
|||
detail.save()
|
||||
|
||||
if detail.revision == '00' and not approved_detail:
|
||||
submitter = auto_post_form.save_submitter_info()
|
||||
subject = 'New draft waiting for approval: %s' % detail.filename
|
||||
from_email = settings.IDST_FROM_EMAIL
|
||||
to_email = []
|
||||
|
@ -99,8 +101,9 @@ def draft_status(request, submission_id, message=None):
|
|||
to_email = list(set(to_email))
|
||||
if to_email:
|
||||
metadata_form = MetaDataForm(draft=detail, validation=validation)
|
||||
send_mail(request, to_email, from_email, subject, 'submit/manual_post_mail.txt',
|
||||
{'form': metadata_form, 'draft': detail})
|
||||
send_mail(request, to_email, from_email, subject, 'submit/submission_approval.txt',
|
||||
{'submitter': submitter, 'form': metadata_form,
|
||||
'draft': detail, 'domain': Site.objects.get_current().domain})
|
||||
return HttpResponseRedirect(reverse(draft_status, None, kwargs={'submission_id': detail.submission_id}))
|
||||
else:
|
||||
auto_post_form.save(request)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
Manual Posting Requested for following Internet-Draft:
|
||||
Manual Posting Requested for the following Internet-Draft:
|
||||
|
||||
I-D Submission Tool URL: /submit/status/{{ draft.submission_id }}/
|
||||
I-D Submission Tool URL: http://{{ domain }}/submit/status/{{ draft.submission_id }}/
|
||||
|
||||
File name: {{ draft.filename }}
|
||||
Submission date: {{ draft.submission_date }}
|
||||
WG: {{ draft.wg|default:"Individual Submission" }}
|
||||
File size: {{ draft.filesize }}
|
||||
File size: {{ draft.filesize|filesizeformat }}
|
||||
|
||||
Title: {{ draft.id_document_name }}
|
||||
Version: {{ draft.revision }}
|
||||
|
|
19
ietf/templates/submit/submission_approval.txt
Normal file
19
ietf/templates/submit/submission_approval.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
WG chair approval is needed for posting of {{ draft.filename }}-{{ draft.revision }} draft
|
||||
|
||||
I-D Submission Tool URL: http://{{ domain }}/submit/status/{{ draft.submission_id }}/
|
||||
|
||||
File name: {{ draft.filename }}
|
||||
Submission date: {{ draft.submission_date }}
|
||||
WG: {{ draft.wg|default:"Individual Submission" }}
|
||||
File size: {{ draft.filesize|filesizeformat }}
|
||||
|
||||
Title: {{ draft.id_document_name }}
|
||||
Version: {{ draft.revision }}
|
||||
Creation date: {{ draft.id_document_name }}
|
||||
Pages: {{ draft.txt_page_count }}
|
||||
Abstract: {{ draft.abstract }}
|
||||
Submitter: {{ submitter.first_name }} {{ submitter.last_name }} <{{ submitter.email_address }}>
|
||||
|
||||
Author(s):
|
||||
{% for author in form.get_authors %}{{ author.first_name }} {{ author.last_name }} <{{ author.email.1 }}>
|
||||
{% endfor %}
|
Loading…
Reference in a new issue