* Added IPR form fields for listing rfcs and drafts
* Some style tweaks - Legacy-Id: 142
This commit is contained in:
parent
68970cb597
commit
f9c6c5c7d3
|
@ -16,6 +16,9 @@ def ipr_detail_form_callback(field, **kwargs):
|
||||||
return forms.IntegerField(widget=forms.RadioSelect(choices=models.LICENSE_CHOICES), required=True)
|
return forms.IntegerField(widget=forms.RadioSelect(choices=models.LICENSE_CHOICES), required=True)
|
||||||
if field.name in ["selecttype", "selectowned"]:
|
if field.name in ["selecttype", "selectowned"]:
|
||||||
return forms.IntegerField(widget=forms.RadioSelect(choices=((1, "YES"), (2, "NO"))), required=False)
|
return forms.IntegerField(widget=forms.RadioSelect(choices=((1, "YES"), (2, "NO"))), required=False)
|
||||||
|
if field.name in ["rfc_number", "id_document_tag"]:
|
||||||
|
log(field.name)
|
||||||
|
return forms.CharFieldField(required=False)
|
||||||
return field.formfield(**kwargs)
|
return field.formfield(**kwargs)
|
||||||
|
|
||||||
def ipr_contact_form_callback(field, **kwargs):
|
def ipr_contact_form_callback(field, **kwargs):
|
||||||
|
@ -97,6 +100,8 @@ def new(request, type):
|
||||||
for contact in ["holder_contact", "ietf_contact", "submitter"]:
|
for contact in ["holder_contact", "ietf_contact", "submitter"]:
|
||||||
if contact in section_list:
|
if contact in section_list:
|
||||||
self.base_fields[contact] = ContactForm(prefix=contact[:4], *args, **kw)
|
self.base_fields[contact] = ContactForm(prefix=contact[:4], *args, **kw)
|
||||||
|
self.base_fields["rfclist"] = forms.CharField(required=False)
|
||||||
|
self.base_fields["draftlist"] = forms.CharField(required=False)
|
||||||
self.base_fields["ietf_contact_is_submitter"] = forms.BooleanField(required=False)
|
self.base_fields["ietf_contact_is_submitter"] = forms.BooleanField(required=False)
|
||||||
BaseIprForm.__init__(self, *args, **kw)
|
BaseIprForm.__init__(self, *args, **kw)
|
||||||
# Special validation code
|
# Special validation code
|
||||||
|
|
|
@ -244,13 +244,20 @@
|
||||||
IETF Document or Other Contribution to Which this IPR Disclosure Relates:
|
IETF Document or Other Contribution to Which this IPR Disclosure Relates:
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for rfc in ipr.rfcs.all %}
|
{% if ipr.rfclist %}
|
||||||
<tr><td class="fixwidth"><b>RFC {{ rfc.rfc_number.rfc_number }}:</b></td><td><b>"{{ rfc.rfc_number.rfc_name }}"</b></td></tr>
|
<tr><td class="fixwidth">RFC Numbers:</td><td><b>{{ ipr.rfclist }}</b></td></tr>
|
||||||
{% endfor %}
|
{% else %}
|
||||||
<!-- XXX: Omitting code to display information from the rfc_number field of ipr here, as it's always NULL in the database today. -->
|
{% for rfc in ipr.rfcs.all %}
|
||||||
{% for draft in ipr.drafts.all %}
|
<tr><td class="fixwidth"><b>RFC {{ rfc.rfc_number.rfc_number }}:</b></td><td><b>"{{ rfc.rfc_number.rfc_name }}"</b></td></tr>
|
||||||
<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>
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
{% if ipr.draftlist %}
|
||||||
|
<tr><td class="fixwidth">I-D Filenames (draft-...):</td><td><b>{{ ipr.draftlist }}</b></td></tr>
|
||||||
|
{% else %}
|
||||||
|
{% for draft in ipr.drafts.all %}
|
||||||
|
<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>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% if ipr.other_designations %}
|
{% if ipr.other_designations %}
|
||||||
<tr><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations }}</b></td></tr>
|
<tr><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations }}</b></td></tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -335,7 +342,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td> </td><td>
|
<td colspan="2">
|
||||||
<b>{{ ipr.licensing_option }}<br/>
|
<b>{{ ipr.licensing_option }}<br/>
|
||||||
{{ ipr.get_lic_opt_a_sub_display }}
|
{{ ipr.get_lic_opt_a_sub_display }}
|
||||||
{{ ipr.get_lic_opt_b_sub_display }}
|
{{ ipr.get_lic_opt_b_sub_display }}
|
||||||
|
|
|
@ -7,23 +7,23 @@
|
||||||
.even tr:first-child th { background: #aaa; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
|
.even tr:first-child th { background: #aaa; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
|
||||||
.odd tr:first-child th { background: #cca; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
|
.odd tr:first-child th { background: #cca; color: #336; font-family: Arial, sans-serif; font-size: small; text-align: left; font-weight: bold; }
|
||||||
table.ipr {
|
table.ipr {
|
||||||
padding:2px;
|
padding:0.2ex;
|
||||||
border-width:1px;
|
border-width:0.1ex;
|
||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-color:#305076;
|
border-color:#305076;
|
||||||
}
|
}
|
||||||
.ipr th { border: 0px; margin: 0px; padding: 4px; }
|
.ipr th { border: 0px; margin: 0px; padding: 0.4ex; }
|
||||||
.ipr td { border: 0px; margin: 0px; padding: 4px; }
|
.ipr td { border: 0px; margin: 0px; padding: 0.4ex; }
|
||||||
td.fixwidth { width: 14ex; }
|
td.fixwidth { width: 18ex; }
|
||||||
.ipr ul { list-style-type: none; }
|
.ipr ul { list-style-type: none; margin-left: 13ex;}
|
||||||
h4.ipr { text-align: center; }
|
h4.ipr { text-align: center; }
|
||||||
input { width: 72ex; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
|
input { width: 68ex; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
|
||||||
input[type="radio"] { width: auto; }
|
input[type="radio"] { width: auto; }
|
||||||
input[type="checkbox"] { width: auto; }
|
input[type="checkbox"] { width: auto; }
|
||||||
input[type="submit"] { width: auto; }
|
input[type="submit"] { width: auto; }
|
||||||
textarea { width: 72ex; height: 5em; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
|
textarea { width: 68ex; height: 5em; font-family: sans-serif; font-size: 11pt; font-weight: normal; }
|
||||||
.required { color: red; float: right; padding-top: 0.7ex; font-size: 130%; }
|
.required { color: red; float: right; padding-top: 0.7ex; font-size: 130%; }
|
||||||
.errorlist { background: red; padding: 0 0 0 2px; border: 0px; margin: 0px; }
|
.errorlist { background: red; padding: 0 0 0 0.2ex; border: 0px; margin: 0px; }
|
||||||
.formlegend { }
|
.formlegend { }
|
||||||
.formlegend .required { float: none; vertical-align: -0.5ex; padding: 0; }
|
.formlegend .required { float: none; vertical-align: -0.5ex; padding: 0; }
|
||||||
/* baseline | sub | super | top | text-top | middle | bottom | text-bottom | <length> | <percentage> */
|
/* baseline | sub | super | top | text-top | middle | bottom | text-bottom | <length> | <percentage> */
|
||||||
|
|
Loading…
Reference in a new issue