Skip to content

Commit 760c119

Browse files
committed
Send email on new/update submission.
Render "ipr/submitted.html" instead of redirecting to the IPR directly. - Legacy-Id: 696
1 parent 0897228 commit 760c119

4 files changed

Lines changed: 110 additions & 5 deletions

File tree

ietf/ipr/new.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from django.shortcuts import render_to_response as render
88
from django.template import RequestContext
99
from ietf.utils import log
10+
from ietf.utils.mail import send_mail
1011
from ietf.ipr.view_sections import section_table
1112
from ietf.idtracker.models import Rfc, InternetDraft
1213
from django.http import HttpResponseRedirect
@@ -209,7 +210,7 @@ def clean_licensing_option(self):
209210
form = IprForm(data)
210211
if form.is_valid():
211212
# Save data :
212-
# IprDetail, IprContact+, IprDraft+, IprRfc+, IprNotification
213+
# IprDetail, IprUpdate, IprContact+, IprDraft+, IprRfc+, IprNotification
213214

214215
# Save IprDetail
215216
instance = form.save(commit=False)
@@ -250,6 +251,14 @@ def clean_licensing_option(self):
250251
pass
251252
contact = models.IprContact(**cdata)
252253
contact.save()
254+
# store this contact in the instance for the email
255+
# similar to what views.show() does
256+
if prefix == "hold":
257+
instance.holder_contact = contact
258+
elif prefix == "ietf":
259+
instance.ietf_contact = contact
260+
elif prefix == "subm":
261+
instance.submitter = contact
253262
# contact = ContactForm(cdata)
254263
# if contact.is_valid():
255264
# contact.save()
@@ -268,10 +277,8 @@ def clean_licensing_option(self):
268277
iprrfc = models.IprRfc(document=rfc, ipr=instance)
269278
iprrfc.save()
270279

271-
return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id)
272-
#return HttpResponseRedirect("/ipr/")
273-
274-
pass
280+
send_mail(request, ['ietf-ipr@ietf.org', 'sunny.lee@neustar.biz'], ('IPR Submitter App', 'ietf-ipr@ietf.org'), 'New IPR Submission Notification', "ipr/new_update_email.txt", {"ipr": instance, "update": update})
281+
return render("ipr/submitted.html", {"update": update}, context_instance=RequestContext(request))
275282
else:
276283
if form.ietf_contact_is_submitter:
277284
form.ietf_contact_is_submitter_checked = "checked"

ietf/templates/ipr/details.txt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
IPR Title: {{ ipr.title }}
2+
3+
Section I. Patent Holder/Applicant ("Patent Holder")
4+
Legal Name: {{ ipr.legal_name }}
5+
6+
Section II. Patent Holder's Contact for License Application
7+
Name: {{ ipr.holder_contact.name }}
8+
Title: {{ ipr.holder_contact.title }}
9+
Department: {{ ipr.holder_contact.department }}
10+
Address1: {{ ipr.holder_contact.address1 }}
11+
Address2: {{ ipr.holder_contact.address2 }}
12+
Telephone: {{ ipr.holder_contact.telephone }}
13+
Fax: {{ ipr.holder_contact.fax }}
14+
Email: {{ ipr.holder_contact.email }}
15+
16+
Section III. Contact Information for the IETF Participant Whose Personal Belief Triggered
17+
the Disclosure in this Template (Optional):
18+
Name: {{ ipr.ietf_contact.name }}
19+
Title: {{ ipr.ietf_contact.title }}
20+
Department: {{ ipr.ietf_contact.department }}
21+
Address1: {{ ipr.ietf_contact.address1 }}
22+
Address2: {{ ipr.ietf_contact.address2 }}
23+
Telephone: {{ ipr.ietf_contact.telephone }}
24+
Fax: {{ ipr.ietf_contact.fax }}
25+
Email: {{ ipr.ietf_contact.email }}
26+
27+
Section IV. IETF Document or Working Group Contribution to Which Patent Disclosure
28+
Relates
29+
${doc_title_line}RFC Number(s) : {% for doc in ipr.rfcs.all %}{{ doc.document.rfc_number }}{% if not forloop.last %}, {% endif %}{% endfor %}
30+
I-D File Name(s)(draft-...) : {% for doc in ipr.drafts.all %}{{ doc.document.displayname }}{% if not forloop.last %}, {% endif %}{% endfor %}
31+
Designations for Other Contributions : {{ ipr.other_designations }}
32+
33+
Section V. Disclosure of Patent Information (i.e., patents or patent applications
34+
required to be disclosed by Section 6 of RFC 3979)
35+
A. For granted patents or published pending patent applications, please provide
36+
the following information:
37+
Patent, Serial, Publication, Registration, or Application/File number(s) : {{ ipr.patents }}
38+
Date(s) granted or applied for : {{ ipr.date_applied }}
39+
Country : {{ ipr.country }}
40+
Additional Note(s):
41+
{{ ipr.notes }}
42+
B. Does your disclosure relate to an unpublished pending patent application? {{ ipr.get_is_pending_display }}
43+
{# missing ipr.applies_to_all #}
44+
C. If an Internet-Draft or RFC includes multiple parts and it is not reasonably apparent which part of such Internet-Draft or RFC is alleged to be covered by
45+
the patent information disclosed in Section V(A) or V(B), it is helpful if the
46+
discloser identifies here the sections of the Internet-Draft or RFC that are
47+
alleged to be so covered. :
48+
{{ ipr.document_sections }}
49+
50+
Section VI. Licensing Declaration The Patent Holder states that, upon approval by the IESG for publication as an
51+
RFC of the relevant IETF specification, its position with respect to licensing
52+
any patent claims contained in the patent(s) or patent application(s) disclosed
53+
above that would be necessary to implement the technology required by such IETF
54+
specification ("Patent Claims"), for the purpose of implementing the specification, is as follows(select one licensing declaration option only):
55+
56+
Selection:
57+
{{ ipr.get_licensing_option_display }}
58+
{% if ipr.stdonly_license %}
59+
{{ ipr.stdonly_license }}
60+
Above licensing declaration is limited solely to standards-track IETF documents.
61+
{% endif %}
62+
Licensing information, comments, notes or URL for further information :
63+
{{ ipr.comments }}
64+
65+
Section VII. Contact Information of Submitter of this Form (if different from
66+
IETF Participant in Section III above)
67+
Name: {{ ipr.submitter.name }}
68+
Title: {{ ipr.submitter.title }}
69+
Department: {{ ipr.submitter.department }}
70+
Address1: {{ ipr.submitter.address1 }}
71+
Address2: {{ ipr.submitter.address2 }}
72+
Telephone: {{ ipr.submitter.telephone }}
73+
Fax: {{ ipr.submitter.fax }}
74+
Email: {{ ipr.submitter.email }}
75+
76+
Section VIII. Other Note(s):
77+
{{ ipr.other_notes }}
78+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
A new IPR disclosure has been submitted.
2+
Please check it and post it.
3+
https://datatracker.ietf.org/cgi-bin/ipr_admin/ipr_admin.cgi
4+
5+
{% include "ipr/details.txt" %}

ietf/templates/ipr/submitted.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends "base.html" %}
2+
{% block title %}IPR Submission{% endblock %}
3+
{% block content %}
4+
5+
<br>
6+
<font size=4 >Your IPR disclosure has been submitted, and the IETF Secretariat has been notified.<br>
7+
8+
Please note that it may take one business day for your IPR disclosure to be posted<br>
9+
on the IETF Page of Intellectual Property Rights Notices.<br><br>
10+
<font color="red">
11+
</font>
12+
<br><hr>
13+
<a href="{% url ietf.ipr.views.showlist %}"><font size=3>Back to IPR Disclosure Page</a></font><br>
14+
15+
{% endblock %}

0 commit comments

Comments
 (0)