Get IPR forms working without TemplatedForm; removed TemplatedForm; new IPR test cases

- Legacy-Id: 1654
This commit is contained in:
Pasi Eronen 2009-08-27 21:03:48 +00:00
parent 636688d1d4
commit 711240499f
9 changed files with 113 additions and 235 deletions

View file

@ -1,5 +1,8 @@
ietfdb (2.32)
* Cleaning of IPR disclosure submission form internals
to simplify Django 1.0 transition. From Jelte and Pasi.
* Make WG summary available also with the same name as before
(1wg-summary.txt). Fix the template to more closely match
the old layout, for screenscraping scripts.

View file

@ -50,12 +50,9 @@ def ipr_contact_form_callback(field, **kwargs):
# Classes
# ----------------------------------------------------------------
# Get a form class which renders fields using a given template
CustomForm = ietf.utils.makeFormattingForm(template="ipr/formfield.html")
# Get base form classes for our models
BaseIprForm = forms.form_for_model(models.IprDetail, form=CustomForm, formfield_callback=ipr_detail_form_callback)
BaseContactForm = forms.form_for_model(models.IprContact, form=CustomForm, formfield_callback=ipr_contact_form_callback)
BaseIprForm = forms.form_for_model(models.IprDetail, formfield_callback=ipr_detail_form_callback)
BaseContactForm = forms.form_for_model(models.IprContact, formfield_callback=ipr_contact_form_callback)
# Some subclassing:
@ -70,11 +67,6 @@ class ContactForm(BaseContactForm):
def add_prefix(self, field_name):
return self.prefix and ('%s_%s' % (self.prefix, field_name)) or field_name
def clean(self, *value):
if value:
return self.full_clean()
else:
return self.clean_data
# ----------------------------------------------------------------
@ -101,11 +93,11 @@ def new(request, type, update=None, submitter=None):
stdonly_license = forms.BooleanField(required=False)
hold_contact_is_submitter = forms.BooleanField(required=False)
ietf_contact_is_submitter = forms.BooleanField(required=False)
if "holder_contact" in section_list:
if section_list.get("holder_contact", False):
holder_contact = ContactForm(prefix="hold")
if "ietf_contact" in section_list:
if section_list.get("ietf_contact", False):
ietf_contact = ContactForm(prefix="ietf")
if "submitter" in section_list:
if section_list.get("submitter", False):
submitter = ContactForm(prefix="subm")
def __init__(self, *args, **kw):
contact_type = {1:"holder_contact", 2:"ietf_contact", 3:"submitter"}
@ -121,8 +113,8 @@ def new(request, type, update=None, submitter=None):
kwnoinit = kw.copy()
kwnoinit.pop('initial', None)
for contact in ["holder_contact", "ietf_contact", "submitter"]:
if contact in section_list:
self.base_fields[contact] = ContactForm(prefix=contact[:4], initial=contact_initial.get(contact, {}), *args, **kwnoinit)
if section_list.get(contact, False):
setattr(self, contact, ContactForm(prefix=contact[:4], initial=contact_initial.get(contact, {}), *args, **kwnoinit))
rfclist_initial = ""
if update:
rfclist_initial = " ".join(["RFC%d" % rfc.document_id for rfc in update.rfcs.all()])
@ -131,9 +123,9 @@ def new(request, type, update=None, submitter=None):
if update:
draftlist_initial = " ".join([draft.document.filename + (draft.revision and "-%s" % draft.revision or "") for draft in update.drafts.all()])
self.base_fields["draftlist"] = forms.CharField(required=False, initial=draftlist_initial)
if "holder_contact" in section_list:
if section_list.get("holder_contact", False):
self.base_fields["hold_contact_is_submitter"] = forms.BooleanField(required=False)
if "ietf_contact" in section_list:
if section_list.get("ietf_contact", False):
self.base_fields["ietf_contact_is_submitter"] = forms.BooleanField(required=False)
self.base_fields["stdonly_license"] = forms.BooleanField(required=False)
@ -187,26 +179,29 @@ def new(request, type, update=None, submitter=None):
drafts.append("%s-%s" % (filename, id.revision))
return " ".join(drafts)
return ""
def clean_holder_contact(self):
return self.holder_contact.full_clean()
def clean_ietf_contact(self):
return self.ietf_contact.full_clean()
def clean_submitter(self):
return self.submitter.full_clean()
def clean_licensing_option(self):
licensing_option = self.clean_data['licensing_option']
if section_list.get('licensing', False):
if licensing_option in (None, ''):
raise forms.ValidationError, 'This field is required.'
return licensing_option
def is_valid(self):
if not BaseIprForm.is_valid(self):
return False
for contact in ["holder_contact", "ietf_contact", "submitter"]:
if hasattr(self, contact) and getattr(self, contact) != None and not getattr(self, contact).is_valid():
return False
return True
# If we're POSTed, but we got passed a submitter, it was the
# POST of the "get updater" form, so we don't want to validate
# this one. When we're posting *this* form, submitter is None,
# even when updating.
if request.method == 'POST' and not submitter:
data = request.POST.copy()
if (request.method == 'POST' or '_testpost' in request.REQUEST) and not submitter:
if request.method == 'POST':
data = request.POST.copy()
else:
data = request.GET.copy()
data["submitted_date"] = datetime.now().strftime("%Y-%m-%d")
data["third_party"] = section_list["third_party"]
data["generic"] = section_list["generic"]
@ -331,10 +326,13 @@ def update(request, ipr_id=None):
if not(request.POST.has_key('legal_name')):
class UpdateForm(BaseContactForm):
def __init__(self, *args, **kwargs):
self.base_fields["update_auth"] = forms.BooleanField("I am authorized to update this IPR disclosure, and I understand that notification of this update will be provided to the submitter of the original IPR disclosure and to the Patent Holder's Contact.")
super(UpdateForm, self).__init__(*args, **kwargs)
super(UpdateForm, self).__init__(*args, **kwargs)
self.fields["update_auth"] = forms.BooleanField()
if request.method == 'POST':
form = UpdateForm(request.POST)
elif '_testpost' in request.REQUEST:
form = UpdateForm(request.GET)
else:
form = UpdateForm()

View file

@ -11,54 +11,64 @@
200 /ipr/1129/ # Non-ASCII other fields
200 /ipr/751/ # Updates others, and is updated by others
200 /ipr/765/ # Removed
404 /ipr/1066/ # Test record
200 /ipr/new-generic/
200 /ipr/new-generic/
200 /ipr/new-specific/
200 /ipr/new-third-party/
200 /ipr/update/
200 /ipr/new-third-party/
200 /ipr/new-generic/?_testpost
200 /ipr/new-specific/?_testpost
200 /ipr/new-third-party/?_testpost
#200 /ipr/update/657/ https://datatracker.ietf.org/public/ipr_generic.cgi?command=update_ipr&ipr_id=657
#200 /ipr/update/820/ https://datatracker.ietf.org/public/ipr_notify.cgi?command=update_ipr&ipr_id=820
#200 /ipr/update/844/ https://datatracker.ietf.org/public/ipr.cgi?command=update_ipr&ipr_id=844
200 /ipr/update/
200 /ipr/update/657/ # Generic
200 /ipr/update/820/ # Third-party
200 /ipr/update/844/ # Specific
404 /ipr/update/1066/ # Removed test record
200 /ipr/update/657/?_testpost # Generic
200 /ipr/update/820/?_testpost # Third-party
200 /ipr/update/844/?_testpost # Specific
200 /ipr/update/657/?_testpost&email=test@example.com&name=Test&telephone=123&update_auth=on
200 /ipr/update/820/?_testpost&email=test@example.com&name=Test&telephone=123&update_auth=on
200 /ipr/update/844/?_testpost&email=test@example.com&name=Test&telephone=123&update_auth=on
200 /ipr/search/
#302 /ipr/search/?option=document_search # incomplete argument set gives redirect
302 /ipr/search/?option=document_search # incomplete argument set gives redirect
#200 /ipr/search/?document_search=mod&option=document_search https://datatracker.ietf.org/public/ipr_search.cgi?option=document_search&document_search=mod
#200,sort /ipr/search/?id_document_tag=2220&option=document_search https://datatracker.ietf.org/public/ipr_search.cgi?option=document_search&id_document_tag=2220
#200,skipredirect /ipr/search/?option=document_search&document_search=draft-housley-tls-authz-extns-05 https://datatracker.ietf.org/ipr/search/?option=document_search&document_search=draft-housley-tls-authz-extns
#200,skipredirect /ipr/search/?option=document_search&document_search=draft-housley-tls-authz-extns-05.txt https://datatracker.ietf.org/ipr/search/?option=document_search&document_search=draft-housley-tls-authz-extns
200 /ipr/search/?document_search=mod&option=document_search # Returns document list
200 /ipr/search/?id_document_tag=2220&option=document_search # Simple case
200 /ipr/search/?id_document_tag=2221&option=document_search # Empty result
200 /ipr/search/?option=document_search&document_search=draft-housley-tls-authz-extns-05 # More complex result
# This takes ~ 300s:
#200,sort /ipr/search/?rfc_search=1034&option=rfc_search https://datatracker.ietf.org/public/ipr_search.cgi?option=rfc_search&rfc_search=1034 # Loong result, RFC search
#200,sort /ipr/search/?rfc_search=1032&option=rfc_search https://datatracker.ietf.org/public/ipr_search.cgi?option=rfc_search&rfc_search=1032 # Loong result, RFC search
#200 /ipr/search/?rfc_search=4444&option=rfc_search https://datatracker.ietf.org/public/ipr_search.cgi?option=rfc_search&rfc_search=4444 # Empty result, RFC search
200 /ipr/search/?rfc_search=1034&option=rfc_search # Loong result
200 /ipr/search/?rfc_search=4555&option=rfc_search # Simple result
200 /ipr/search/?rfc_search=4444&option=rfc_search # Empty result
#200 /ipr/search/?patent_search=nortel&option=patent_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_search&patent_search=nortel
#200 /ipr/search/?patent_search=nortelxz&option=patent_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_search&patent_search=nortelxz # Empty result
200 /ipr/search/?patent_search=nortel&option=patent_search
200 /ipr/search/?patent_search=nortelxz&option=patent_search # Empty result
#200,sort,ignore:quote /ipr/search/?wg_search=dnsext&option=wg_search https://datatracker.ietf.org/public/ipr_search.cgi?option=wg_search&wg_search=dnsext
#200,sort,ignore:quote /ipr/search/?wg_search=aaa&option=wg_search https://datatracker.ietf.org/public/ipr_search.cgi?option=wg_search&wg_search=aaa # FIXME This fails, needs revisiting
#200,sort,ignore:quote /ipr/search/?wg_search=acct&option=wg_search https://datatracker.ietf.org/public/ipr_search.cgi?option=wg_search&wg_search=acct # Empty result
200 /ipr/search/?wg_search=dnsext&option=wg_search
200 /ipr/search/?wg_search=aaa&option=wg_search
200 /ipr/search/?wg_search=acct&option=wg_search # Empty result
#200,sort,ignore:quote /ipr/search/?option=title_search&title_search=AAA https://datatracker.ietf.org/public/ipr_search.cgi?option=title_search&title_search=AAA
#200,sort,ignore:quote /ipr/search/?option=title_search&title_search=AAAxz https://datatracker.ietf.org/public/ipr_search.cgi?option=title_search&title_search=AAAxz # Empty result
200 /ipr/search/?option=title_search&title_search=AAA
200 /ipr/search/?option=title_search&title_search=AAAxz # Empty result
#200,sort /ipr/search/?patent_info_search=123&option=patent_info_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_info_search&patent_info_search=123
#200,sort /ipr/search/?patent_info_search=31415&option=patent_info_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_info_search&patent_info_search=31415 # Empty result
200 /ipr/search/?patent_info_search=123&option=patent_info_search
200 /ipr/search/?patent_info_search=31415&option=patent_info_search # Empty result
200 /ipr/search/?patent_info_search=12&option=patent_info_search # Error: at least 3 characters
200 /ipr/search/?patent_info_search=abc&option=patent_info_search # Error: at least 1 digit
#200 /ipr/search/?patent_info_search=12&option=patent_info_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_info_search&patent_info_search=12 # Error: at least 3 characters
#200 /ipr/search/?patent_info_search=abc&option=patent_info_search https://datatracker.ietf.org/public/ipr_search.cgi?option=patent_info_search&patent_info_search=abc # Error: at least 1 digit
#200 /ipr/search/?option=ipr_title_search&ipr_title_search=nortel https://datatracker.ietf.org/public/ipr_search.cgi?option=ipr_title_search&ipr_title_search=nortel
#200 /ipr/search/?option=ipr_title_search&ipr_title_search=nortelxz https://datatracker.ietf.org/public/ipr_search.cgi?option=ipr_title_search&ipr_title_search=nortelxz # Empty result
200 /ipr/search/?option=ipr_title_search&ipr_title_search=nortel
200 /ipr/search/?option=ipr_title_search&ipr_title_search=nortelxz # Empty result
200 /ipr/about/
200 /ipr/by-draft/
200 /ipr/by-date/
#200 /ipr/y/2006/
#200 /ipr/y/2006/feb/
200 /ipr/about/
200 /ipr/by-draft/
200 /ipr/by-date/
#200 /ipr/y/2006/
#200 /ipr/y/2006/feb/
200 /feed/ipr/
200 /sitemap-ipr.xml

View file

@ -22,11 +22,6 @@
</table>
<hr />
{% endif %}
{% ifnotequal ipr.status 1 %}
<font color="red" size="3">
This IPR disclosure was {{ ipr.get_status_display }}<br>
</font>
{% endifnotequal %}
{% if section_list.legacy_intro %}
<font size="3">
This IPR disclosure was submitted by e-mail.<br>

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% load ietf_filters %}
{% block title %}IPR Details - {{ ipr.title }}{% endblock %}
{% block body_attributes %}
{% if section_list.holder_contact %}onload="toggle_submitter_info('holder')"{% endif %}
@ -22,11 +22,6 @@
</table>
<hr />
{% endif %}
{% ifnotequal ipr.status 1 %}
<font color="red" size="3">
This IPR disclosure was {{ ipr.get_status_display }}<br>
</font>
{% endifnotequal %}
{% if section_list.legacy_intro %}
<font size="3">
This IPR disclosure was submitted by e-mail.<br>
@ -172,11 +167,9 @@
</p>
{% endif %}
{% if section_list.form_legend %}
<p class="formlegend">
Fields marked with <span class="required">*</span> are required.
</p>
{% endif %}
</blockquote>
{% if section_list.holder %}
@ -191,7 +184,7 @@
</tr>
<tr class="{% cycle row_parity %}">
{% block section1_data %}
<td class="fixwidth">Legal Name:</td> <td><b> {{ ipr.legal_name }} </b></td>
<td class="fixwidth">Legal Name:</td> <td><b> {{ ipr.legal_name.errors }} <span class="required">*</span> {{ ipr.legal_name }} </b></td>
{% endblock %}
</tr>
</table>
@ -207,19 +200,15 @@
Patent Holder's Contact for License Application
</th>
</tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Name:</td> <td><b>{{ ipr.holder_contact.name }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Title:</td> <td><b>{{ ipr.holder_contact.title }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Department:</td> <td><b>{{ ipr.holder_contact.department }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address1:</td> <td><b>{{ ipr.holder_contact.address1 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address2:</td> <td><b>{{ ipr.holder_contact.address2 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Telephone:</td> <td><b>{{ ipr.holder_contact.telephone }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Fax:</td> <td><b>{{ ipr.holder_contact.fax }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Email:</td> <td><b>{{ ipr.holder_contact.email }}</b></td></tr>
{% for field in ipr.holder_contact %}
{% ifnotequal field.name "update_auth" %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">{{field.label }}:</td><td><b>{{ field.errors }} {% if field.field.required %}<span class="required">*</span>{%endif%} {{ field }}</b></td></tr>
{% endifnotequal %}
{% endfor %}
</table>
</blockquote>
{% endif %}
{% if section_list.ietf_contact %}
<blockquote class="{% cycle field_parity %}">
<table border="0" cellpadding="0" cellspacing="0" class="ipr person">
@ -229,18 +218,11 @@
Contact Information for the IETF Participant Whose Personal Belief Triggered this Disclosure:
</th>
</tr>
{% if ipr.ietf_contact.name %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">Name:</td> <td><b>{{ ipr.ietf_contact.name }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Title:</td> <td><b>{{ ipr.ietf_contact.title }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Department:</td> <td><b>{{ ipr.ietf_contact.department }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address1:</td> <td><b>{{ ipr.ietf_contact.address1 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address2:</td> <td><b>{{ ipr.ietf_contact.address2 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Telephone:</td> <td><b>{{ ipr.ietf_contact.telephone }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Fax:</td> <td><b>{{ ipr.ietf_contact.fax }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Email:</td> <td><b>{{ ipr.ietf_contact.email }}</b></td></tr>
{% else %}
<tr class="{% cycle row_parity %}"><td colspan="2"><i>No information submitted</i></td></tr>
{% endif %}
{% for field in ipr.ietf_contact %}
{% ifnotequal field.name "update_auth" %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">{{field.label }}:</td><td><b>{{ field.errors }} {% if field.field.required %}<span class="required">*</span>{%endif%} {{ field }}</b></td></tr>
{% endifnotequal %}
{% endfor %}
</table>
</blockquote>
{% endif %}
@ -251,28 +233,14 @@
<table border="0" cellpadding="0" cellspacing="0" class="ipr">
<tr class="{% cycle dark,light as row_parity %}">
<th colspan="2" >
{% if section_list.form_legend %}<span class="required">*</span>{% endif %}
<span class="required">*</span>
{% cycle section %}.
IETF Document or Other Contribution to Which this IPR Disclosure Relates:
</th>
</tr>
{% if ipr.rfclist %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">RFC Numbers:</td><td><b>{{ ipr.rfclist }}</b></td></tr>
{% else %}
{% for doc in ipr.rfcs.all %}
<tr class="{% cycle row_parity %}"><td class="fixwidth"><b>RFC {{ doc.document.rfc_number }}:</b></td><td><b>"{{ doc.document.title }}"</b></td></tr>
{% endfor %}
{% endif %}
{% if ipr.draftlist %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">I-D Filenames (draft-...):</td><td><b>{{ ipr.draftlist }}</b></td></tr>
{% else %}
{% for doc in ipr.drafts.all %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">Internet-Draft:</td><td><b>"{{ doc.document.title }}"<br />(<tt><big>{{ doc.document.filename }}-{{ doc.document.revision }}</big></tt>)</b></td></tr>
{% endfor %}
{% endif %}
{% if ipr.other_designations %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations }}</b></td></tr>
{% endif %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">RFC Numbers:</td><td><b>{{ ipr.rfclist.errors }} {{ ipr.rfclist }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">I-D Filenames (draft-...):</td><td><b>{{ ipr.draftlist.errors}} {{ ipr.draftlist }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations.errors }} {{ ipr.other_designations }}</b></td></tr>
</table>
</blockquote>
{% endif %}
@ -283,7 +251,6 @@
<tr class="{% cycle dark,light as row_parity %}">
<th colspan="2" >
{% cycle section %}.
{% if section_list.form_legend %}
{% if section_list.generic %}
Disclosure of Patent Information (i.e., patents or patent
applications required to be disclosed by Section 6 of RFC3979)
@ -296,10 +263,6 @@
Disclosure of Patent Information, if known (i.e., patents or
patent applications required to be disclosed by Section 6 of RFC3979)
{% endif %}
{% else %}
Disclosure of Patent Information (i.e., patents or patent
applications required to be disclosed by Section 6 of RFC 3979)
{% endif %}
</th>
</tr>
{% if ipr.patents or ipr.notes %}
@ -310,19 +273,15 @@
please provide the following information:</td>
</tr>
<tr><td class="fixwidth">Patent, Serial, Publication, Registration,
or Application/File number(s): </td><td><b>{{ ipr.patents }}</b></td></tr>
or Application/File number(s): </td><td><b>{{ ipr.patents.errors }} <span class="required">*</span> {{ ipr.patents }}</b></td></tr>
</tbody>
<tr class="{% cycle row_parity %}"><td>Date(s) granted or applied for: </td><td><b>{{ ipr.date_applied }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td>Country: </td><td><b>{{ ipr.country }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td>Additional Notes: </td><td><b>{{ ipr.notes }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td>Date(s) granted or applied for: </td><td><b>{{ ipr.date_applied.errors }} <span class="required">*</span> {{ ipr.date_applied }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td>Country: </td><td><b>{{ ipr.country.errors }} <span class="required">*</span> {{ ipr.country }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td>Additional Notes: </td><td><b>{{ ipr.notes.errors }} {{ ipr.notes }}</b></td></tr>
<tr class="{% cycle row_parity %}">
<td colspan="2">
{% if section_list.form_legend %}
B. Does your disclosure relate to an unpublished pending patent application?:
{% else %}
B. Does this disclosure relate to an unpublished pending patent application?:
{% endif %}
<b>{{ ipr.is_pending }}</b>
<b>{{ ipr.is_pending.errors }} {{ ipr.is_pending }}</b>
</td>
</tr>
<tbody class="{% cycle row_parity %}">
@ -331,7 +290,7 @@
<td colspan="2">
C. Does this disclosure apply to all IPR owned by
the submitter?:
<b>{{ ipr.applies_to_all }}</b>
<b>{{ ipr.applies_to_all.errors }} {{ ipr.applies_to_all }}</b>
</td>
</tr>
{% else %}
@ -346,7 +305,7 @@
</td>
</tr>
{% if ipr.document_sections %}
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td><b>{{ ipr.document_sections }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td><b>{{ ipr.document_sections.errors }} {{ ipr.document_sections }}</b></td></tr>
{% else %}
<tr class="{% cycle row_parity %}"><td class="fixwidth"></td><td></span><i>No information submitted</i></td></tr>
{% endif %}
@ -374,7 +333,6 @@
<tbody class="{% cycle row_parity %}">
<tr>
<td colspan="2">
{% if section_list.form_legend %}
{% if section_list.generic %}
The Patent Holder states that its position with respect
to licensing any patent claims contained in the patent(s) or patent
@ -399,46 +357,33 @@
("Necessary Patent Claims"), for the purpose of implementing such
specification, is as follows(select one licensing declaration option only):
{% endif %}
{% else %}
The Patent Holder states that its position with respect
to licensing any patent claims contained in the patent(s) or patent
application(s) disclosed above that would necessarily be infringed by
implementation of the technology required by the relevant IETF specification
("Necessary Patent Claims"), for the purpose of implementing such
specification, is as follows(select one licensing declaration option only):
{% endif %}
</td>
</tr>
<tr>
<td colspan="2">
<b>{{ ipr.licensing_option }}</b>
<b>{{ ipr.licensing_option.errors }} {{ ipr.licensing_option }}</b>
</td>
</tr>
</tbody>
{% if ipr.stdonly_license %}
<tr class="{% cycle row_parity %}">
<td></td><td>
<td></td><td> {{ ipr.stdonly_license.errors }}
{{ ipr.stdonly_license }}
Above licensing declaration is limited solely to standards-track IETF documents.
</td>
</tr>
{% endif %}
<tbody class="{% cycle row_parity %}">
<tr>
<td colspan="2">
Licensing information, comments, notes, or URL for further information:
</td>
</tr>
{% if ipr.comments %}
<tr ><td class="fixwidth"> </td><td><b>{{ ipr.comments }}</b></td></tr>
{% else %}
<tr ><td class="fixwidth"> </td><td><i>No information submitted</i></td></tr>
{% endif %}
<tr ><td class="fixwidth"> </td><td><b>{{ ipr.comments.errors }} {{ ipr.comments }}</b></td></tr>
</tbody>
{% if ipr.lic_checkbox %}
<tr class="{% cycle row_parity %}">
<td colspan="2">
<p>
{{ ipr.lic_checkbox.errors }}
{% ifnotequal ipr.lic_checkbox 1 %}{{ ipr.lic_checkbox }}{% endifnotequal %}
The individual submitting this template represents and warrants that all
terms and conditions that must be satisfied for implementers of any
@ -481,7 +426,6 @@
Contact Information above)
</th>
</tr>
{% if ipr.submitter.name %}
{% if ipr.ietf_contact_is_submitter %}
<tbody class="{% cycle row_parity %}">
{% if section_list.holder_contact %}
@ -502,17 +446,11 @@
{% endif %}
</tbody>
{% endif %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">Name:</td> <td><b>{{ ipr.submitter.name }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Title:</td> <td><b>{{ ipr.submitter.title }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Department:</td> <td><b>{{ ipr.submitter.department }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address1:</td> <td><b>{{ ipr.submitter.address1 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address2:</td> <td><b>{{ ipr.submitter.address2 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Telephone:</td> <td><b>{{ ipr.submitter.telephone }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Fax:</td> <td><b>{{ ipr.submitter.fax }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Email:</td> <td><b>{{ ipr.submitter.email }}</b></td></tr>
{% else %}
<tr class="{% cycle row_parity %}"><td colspan="2"><i>No information submitted</i></td></tr>
{% endif %}
{% for field in ipr.submitter %}
{% ifnotequal field.name "update_auth" %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">{{field.label }}:</td><td><b>{{ field.errors }} {% if field.field.required %}<span class="required">*</span>{%endif%} {{ field }}</b></td></tr>
{% endifnotequal %}
{% endfor %}
</table>
</blockquote>
{% endif %}
@ -527,27 +465,11 @@
Other Notes:
</th>
</tr>
{% if ipr.other_notes %}
<tr class="{% cycle row_parity %}"><td class="fixwidth"> </td><td><b>{{ ipr.other_notes }}</b></td></tr>
{% else %}
<tr class="{% cycle row_parity %}"><td colspan="2"><i>No information submitted</i></td></tr>
{% endif %}
<tr class="{% cycle row_parity %}"><td class="fixwidth"> </td><td><b>{{ ipr.other_notes.errors }} {{ ipr.other_notes }}</b></td></tr>
</table>
</blockquote>
{% endif %}
{% comment %} (doesn't work -- commented out for now)
{% if ipr.legacy_url_0 %}
<blockquote>
<h3>The text of the original IPR declaration:</h3>
<iframe src="{{ipr.legacy_url_0}}" style="width:55em; height:30em">
Warning: Could not embed {{ipr.legacy_url_0}}.
</iframe>
</blockquote>
{% endif %}
{% endcomment %}
{% if section_list.form_submit %}
<center><input type="submit" name="submit" value="Submit"></center>
</form>
<blockquote>
@ -555,6 +477,5 @@
<img src="/images/blue.gif" hspace="3" border="0"><a href="{% url ietf.ipr.views.default %}">IPR Disclosure Page</a><br>
<img src="/images/blue.gif" hspace="3" border="0"><a href="{% url ietf.ipr.views.showlist %}">View IPR Disclosures</a><br><br>
</blockquote>
{% endif %}
{% endblock %}

View file

@ -1,10 +0,0 @@
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% if errors %}
<ul class="errorlist">
{% for error in errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}
{% if field.required %}<span class="required">*</span>{% endif %}{{ text }}
{{ help_text }}

View file

@ -27,17 +27,16 @@
Contact Information for Submitter of this Update.
</th>
</tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Name:</td> <td><b>{{ form.name }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Title:</td> <td><b>{{ form.title }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Department:</td> <td><b>{{ form.department }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address1:</td> <td><b>{{ form.address1 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Address2:</td> <td><b>{{ form.address2 }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Telephone:</td> <td><b>{{ form.telephone }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Fax:</td> <td><b>{{ form.fax }}</b></td></tr>
<tr class="{% cycle row_parity %}"><td class="fixwidth">Email:</td> <td><b>{{ form.email }}</b></td></tr>
{% for field in form %}
{% ifnotequal field.name "update_auth" %}
<tr class="{% cycle row_parity %}"><td class="fixwidth">{{field.label }}:</td><td><b>{{ field.errors }} {% if field.field.required %}<span class="required">*</span>{%endif%} {{ field }}</b></td></tr>
{% endifnotequal %}
{% endfor %}
</table>
</blockquote>
<p>
{{ form.update_auth.errors }}
<span class="required">*</span>
{{ form.update_auth }}
<b>I am authorized to update this IPR disclosure, and I understand that notification of this update will be provided to the submitter of the original IPR disclosure and to the Patent Holder's Contact.</b>
</p>

View file

@ -6,10 +6,6 @@ from cache_foreign_key import FKAsOneToOne
from soup2text import TextSoup, soup2text
from draft_search import normalize_draftname
# DJANGO_096: needs to be removed
from templated_form import makeTemplatedForm
makeFormattingForm = makeTemplatedForm
# See http://docs.python.org/tut/node8.html regarding the use of __all__ and
# also regarding the practice of using "from xxx import *" in interactive
# sessions vs. in source files.

View file

@ -1,34 +0,0 @@
# Copyright The IETF Trust 2007, All Rights Reserved
from django.utils.html import escape
def makeTemplatedForm(template=None):
"""Create a form class which formats its fields using the provided template
The template is provided with a dictionary containing the following key-value
pairs:
"label": field label, if any,
"errors": list of errors, if any,
"text": widget rendering for an unbound form / field value for a bound form,
"help_text": field help text, if any
"""
from django.template import loader
import django.newforms as forms
class TemplatedForm(forms.BaseForm):
_template = template
def __getitem__(self, name):
"Returns a rendered field with the given name."
#syslog.syslog("FormattingForm.__getitem__(%s)" % (name, ))
try:
field = self.fields[name]
except KeyError:
raise KeyError('Key %r not found in Form' % name)
if not isinstance(field, forms.fields.Field):
return field
bf = forms.forms.BoundField(self, field, name)
errors = [escape(error) for error in bf.errors]
rendering = loader.render_to_string(self._template, { "errors": errors, "label": bf.label, "text": unicode(bf), "help_text": field.help_text, "field":field })
return rendering
return TemplatedForm