Merged in [18886] from rjsparks@nostrum.com:

Change ipr pages to say General rather than Generic, and to change the text to note email submissions are not accepted. Fixes #3209.
 - Legacy-Id: 18888
Note: SVN reference [18886] has been migrated to Git commit 550c1233fe
This commit is contained in:
Robert Sparks 2021-03-03 20:49:11 +00:00
commit b16703160d
7 changed files with 43 additions and 14 deletions

View file

@ -233,7 +233,7 @@ class GenericDisclosureForm(forms.Form):
for k in patent_fields:
if not cleaned_data.get(k):
self.add_error(k, "This field is required if you are filing a patent-specific disclosure.")
raise forms.ValidationError("A generic IPR disclosure cannot have any patent-specific information, "
raise forms.ValidationError("A general IPR disclosure cannot have any patent-specific information, "
"but a patent-specific disclosure must provide full patent information.")
patent_fields += ['patent_notes']

View file

@ -6,7 +6,7 @@ import datetime
from pyquery import PyQuery
from urllib.parse import quote
from urllib.parse import quote, urlparse
from django.urls import reverse as urlreverse
@ -208,9 +208,17 @@ class IprTests(TestCase):
self.assertContains(r, "/ipr/%s/" % ipr.pk)
def test_new_generic(self):
"""Add a new generic disclosure. Note: submitter does not need to be logged in.
"""
"""Ensure new-generic redirects to new-general"""
url = urlreverse("ietf.ipr.views.new", kwargs={ "type": "generic" })
r = self.client.get(url)
self.assertEqual(r.status_code,302)
self.assertEqual(urlparse(r["Location"]).path, urlreverse("ietf.ipr.views.new", kwargs={ "type": "general"}))
def test_new_general(self):
"""Add a new general disclosure. Note: submitter does not need to be logged in.
"""
url = urlreverse("ietf.ipr.views.new", kwargs={ "type": "general" })
# invalid post
r = self.client.post(url, {

View file

@ -25,6 +25,6 @@ urlpatterns = [
url(r'^(?P<id>\d+)/state/$', views.state),
url(r'^update/$', RedirectView.as_view(url=reverse_lazy('ietf.ipr.views.showlist'), permanent=True)),
url(r'^update/(?P<id>\d+)/$', views.update),
url(r'^new-(?P<type>(specific|generic|third-party))/$', views.new),
url(r'^new-(?P<type>(specific|generic|general|third-party))/$', views.new),
url(r'^search/$', views.search),
]

View file

@ -484,6 +484,18 @@ def by_draft_recursive_txt(request):
def new(request, type, updates=None):
"""Submit a new IPR Disclosure. If the updates field != None, this disclosure
updates one or more other disclosures."""
# Note that URL patterns won't ever send updates - updates is only non-null when called from code
# This odd construct flipping generic and general allows the URLs to say 'general' while having a minimal impact on the code.
# A cleanup to change the code to switch on type 'general' should follow.
if type == 'generic' and updates: # Only happens when called directly from the updates view
pass
elif type == 'generic':
return HttpResponseRedirect(urlreverse('ietf.ipr.views.new',kwargs=dict(type='general')))
elif type == 'general':
type = 'generic'
else:
pass
# 1 to show initially + the template
DraftFormset = inlineformset_factory(IprDisclosureBase, IprDocRel, form=DraftForm, can_delete=False, extra=1 + 1)

View file

@ -37,7 +37,7 @@
patent applicants.</p>
{% else %}
<h1>The Patent Disclosure and Licensing Declaration Template for Generic IPR Disclosures</h1>
<h1>The Patent Disclosure and Licensing Declaration Template for General IPR Disclosures</h1>
<p>This document is an IETF IPR Patent Disclosure and Licensing
Declaration Template and is submitted to inform the IETF of a) patent
or patent application information that is not related to a specific
@ -49,18 +49,27 @@
<a href="https://www.ietf.org/rfc/rfc8179.txt">RFC 8179</a>,
"Intellectual Property Rights in IETF Technology," you
are still required to file specific disclosures on IPR unless your
generic disclosure satisfies certain conditions. Please see the
general disclosure satisfies certain conditions. Please see the
RFC for details.</p>
{% endif %}
<p>
If you wish to submit your IPR disclosure by e-mail, then please send
it to <a href="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</a>.
Submissions made by e-mail that do not comply with the formal
Submissions that do not comply with the formal
requirements of Section 5, "IPR Disclosures," of
<a href="https://www.ietf.org/rfc/rfc8179.txt">RFC 8179</a>,
"Intellectual Property Rights in IETF Technology",
will be posted, but will be marked as "non-compliant".
may be
{% if form.instance|to_class_name != "GenericIprDisclosure" %}
rejected or may be published as general disclosures.
{% else %}
rejected.
{% endif %}
</p>
<p>
If you have any questions or problems with form then please contact
<a href="mailto:ietf-ipr@ietf.org">ietf-ipr@ietf.org</a>. We do not
accept IPR disclosures by email.
</p>

View file

@ -12,7 +12,7 @@
<ul>
<li><a href="{% url "ietf.ipr.views.new" "specific" %}">File a disclosure about your IPR related to a specific IETF contribution</a></li>
<li><a href="{% url "ietf.ipr.views.new" "generic" %}">File an IPR disclosure that is not related to a specific IETF contribution</a></li>
<li><a href="{% url "ietf.ipr.views.new" "general" %}">File an IPR disclosure that is not related to a specific IETF contribution</a></li>
<li><a href="{% url "ietf.ipr.views.new" "third-party" %}">Notify the IETF of IPR other than your own</a></li>
<li>To update an existing IPR disclosure, find the original disclosure and select "update this IPR disclosure".</li>
<li><a href="{% url "ietf.ipr.views.search" %}">Search the IPR disclosures</a></li>

View file

@ -33,7 +33,7 @@
{% endif %}
</p>
<h2 class="anchor-target" id="generic">Generic IPR disclosures</h2>
<h2 class="anchor-target" id="generic">General IPR disclosures</h2>
{% include "ipr/ipr_table.html" with iprs=generic_disclosures %}
@ -49,7 +49,7 @@
<div class="col-md-2 hidden-print bs-docs-sidebar" id="affix">
<ul class="nav nav-pills nav-stacked small" data-spy="affix">
<li><a href="#generic">Generic IPR disclosures</a></li>
<li><a href="#generic">General IPR disclosures</a></li>
<li><a href="#specific">Specific IPR disclosures</a></li>
<li><a href="#notify">Specific third-party IPR disclosures</a></li>
</ul>