Skip to content

Commit f9c6c5c

Browse files
committed
* Added IPR form fields for listing rfcs and drafts
* Some style tweaks - Legacy-Id: 142
1 parent 68970cb commit f9c6c5c

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

ietf/ipr/view_new.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def ipr_detail_form_callback(field, **kwargs):
1616
return forms.IntegerField(widget=forms.RadioSelect(choices=models.LICENSE_CHOICES), required=True)
1717
if field.name in ["selecttype", "selectowned"]:
1818
return forms.IntegerField(widget=forms.RadioSelect(choices=((1, "YES"), (2, "NO"))), required=False)
19+
if field.name in ["rfc_number", "id_document_tag"]:
20+
log(field.name)
21+
return forms.CharFieldField(required=False)
1922
return field.formfield(**kwargs)
2023

2124
def ipr_contact_form_callback(field, **kwargs):
@@ -97,6 +100,8 @@ def __init__(self, *args, **kw):
97100
for contact in ["holder_contact", "ietf_contact", "submitter"]:
98101
if contact in section_list:
99102
self.base_fields[contact] = ContactForm(prefix=contact[:4], *args, **kw)
103+
self.base_fields["rfclist"] = forms.CharField(required=False)
104+
self.base_fields["draftlist"] = forms.CharField(required=False)
100105
self.base_fields["ietf_contact_is_submitter"] = forms.BooleanField(required=False)
101106
BaseIprForm.__init__(self, *args, **kw)
102107
# Special validation code

ietf/templates/ipr/details.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,20 @@ <h4 class="ipr">The Patent Disclosure and Licensing Declaration Template for {{
244244
IETF Document or Other Contribution to Which this IPR Disclosure Relates:
245245
</th>
246246
</tr>
247-
{% for rfc in ipr.rfcs.all %}
248-
<tr><td class="fixwidth"><b>RFC {{ rfc.rfc_number.rfc_number }}:</b></td><td><b>"{{ rfc.rfc_number.rfc_name }}"</b></td></tr>
249-
{% endfor %}
250-
<!-- XXX: Omitting code to display information from the rfc_number field of ipr here, as it's always NULL in the database today. -->
251-
{% for draft in ipr.drafts.all %}
252-
<tr><td class="fixwidth">Internet-Draft:</td><td><b>"{{ draft.document.id_document_name }}"<br />(<tt><big>{{ draft.document.filename }}-{{ draft.document.revision }}</big></tt>)</b></td></tr>
253-
{% endfor %}
247+
{% if ipr.rfclist %}
248+
<tr><td class="fixwidth">RFC Numbers:</td><td><b>{{ ipr.rfclist }}</b></td></tr>
249+
{% else %}
250+
{% for rfc in ipr.rfcs.all %}
251+
<tr><td class="fixwidth"><b>RFC {{ rfc.rfc_number.rfc_number }}:</b></td><td><b>"{{ rfc.rfc_number.rfc_name }}"</b></td></tr>
252+
{% endfor %}
253+
{% endif %}
254+
{% if ipr.draftlist %}
255+
<tr><td class="fixwidth">I-D Filenames (draft-...):</td><td><b>{{ ipr.draftlist }}</b></td></tr>
256+
{% else %}
257+
{% for draft in ipr.drafts.all %}
258+
<tr><td class="fixwidth">Internet-Draft:</td><td><b>"{{ draft.document.id_document_name }}"<br />(<tt><big>{{ draft.document.filename }}-{{ draft.document.revision }}</big></tt>)</b></td></tr>
259+
{% endfor %}
260+
{% endif %}
254261
{% if ipr.other_designations %}
255262
<tr><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations }}</b></td></tr>
256263
{% endif %}
@@ -335,7 +342,7 @@ <h4 class="ipr">The Patent Disclosure and Licensing Declaration Template for {{
335342
</td>
336343
</tr>
337344
<tr>
338-
<td> </td><td>
345+
<td colspan="2">
339346
<b>{{ ipr.licensing_option }}<br/>
340347
{{ ipr.get_lic_opt_a_sub_display }}
341348
{{ ipr.get_lic_opt_b_sub_display }}

ietf/templates/ipr/style.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
.even tr:first-child th { background: #aaa; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
88
.odd tr:first-child th { background: #cca; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
99
table.ipr {
10-
padding:2px;
11-
border-width:1px;
10+
padding:0.2ex;
11+
border-width:0.1ex;
1212
border-style:solid;
1313
border-color:#305076;
1414
}
15-
.ipr th { border: 0px; margin: 0px; padding: 4px; }
16-
.ipr td { border: 0px; margin: 0px; padding: 4px; }
17-
td.fixwidth { width: 14ex; }
18-
.ipr ul { list-style-type: none; }
15+
.ipr th { border: 0px; margin: 0px; padding: 0.4ex; }
16+
.ipr td { border: 0px; margin: 0px; padding: 0.4ex; }
17+
td.fixwidth { width: 18ex; }
18+
.ipr ul { list-style-type: none; margin-left: 13ex;}
1919
h4.ipr { text-align: center; }
20-
input { width: 72ex; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
20+
input { width: 68ex; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
2121
input[type="radio"] { width: auto; }
2222
input[type="checkbox"] { width: auto; }
2323
input[type="submit"] { width: auto; }
24-
textarea { width: 72ex; height: 5em; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
24+
textarea { width: 68ex; height: 5em; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
2525
.required { color: red; float: right; padding-top: 0.7ex; font-size: 130%; }
26-
.errorlist { background: red; padding: 0 0 0 2px; border: 0px; margin: 0px; }
26+
.errorlist { background: red; padding: 0 0 0 0.2ex; border: 0px; margin: 0px; }
2727
.formlegend { }
2828
.formlegend .required { float: none; vertical-align: -0.5ex; padding: 0; }
2929
/* baseline | sub | super | top | text-top | middle | bottom | text-bottom | <length> | <percentage> */

0 commit comments

Comments
 (0)