diff --git a/ietf/ipr/forms.py b/ietf/ipr/forms.py index 1d8bcc047..792128592 100644 --- a/ietf/ipr/forms.py +++ b/ietf/ipr/forms.py @@ -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'] diff --git a/ietf/ipr/tests.py b/ietf/ipr/tests.py index 07c0eec1f..12f587d0f 100644 --- a/ietf/ipr/tests.py +++ b/ietf/ipr/tests.py @@ -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, { diff --git a/ietf/ipr/urls.py b/ietf/ipr/urls.py index 476a9f6a7..6f7b2d408 100644 --- a/ietf/ipr/urls.py +++ b/ietf/ipr/urls.py @@ -25,6 +25,6 @@ urlpatterns = [ url(r'^(?P\d+)/state/$', views.state), url(r'^update/$', RedirectView.as_view(url=reverse_lazy('ietf.ipr.views.showlist'), permanent=True)), url(r'^update/(?P\d+)/$', views.update), - url(r'^new-(?P(specific|generic|third-party))/$', views.new), + url(r'^new-(?P(specific|generic|general|third-party))/$', views.new), url(r'^search/$', views.search), ] diff --git a/ietf/ipr/views.py b/ietf/ipr/views.py index f5de45274..88e6db45a 100644 --- a/ietf/ipr/views.py +++ b/ietf/ipr/views.py @@ -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) diff --git a/ietf/templates/ipr/details_edit.html b/ietf/templates/ipr/details_edit.html index 53522b140..e610a4c6f 100644 --- a/ietf/templates/ipr/details_edit.html +++ b/ietf/templates/ipr/details_edit.html @@ -37,7 +37,7 @@ patent applicants.

{% else %} -

The Patent Disclosure and Licensing Declaration Template for Generic IPR Disclosures

+

The Patent Disclosure and Licensing Declaration Template for General IPR Disclosures

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 @@ RFC 8179, "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.

{% endif %}

- If you wish to submit your IPR disclosure by e-mail, then please send - it to ietf-ipr@ietf.org. - 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 RFC 8179, "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 %} +

+ +

+ If you have any questions or problems with form then please contact + ietf-ipr@ietf.org. We do not + accept IPR disclosures by email.

diff --git a/ietf/templates/ipr/disclosure.html b/ietf/templates/ipr/disclosure.html index 127fcab28..d1d3bd0d9 100644 --- a/ietf/templates/ipr/disclosure.html +++ b/ietf/templates/ipr/disclosure.html @@ -12,7 +12,7 @@