* Added IPR form fields for listing rfcs and drafts

* Some style tweaks
 - Legacy-Id: 142
This commit is contained in:
Henrik Levkowetz 2007-05-21 16:49:26 +00:00
parent 68970cb597
commit f9c6c5c7d3
3 changed files with 29 additions and 17 deletions

View file

@ -16,6 +16,9 @@ def ipr_detail_form_callback(field, **kwargs):
return forms.IntegerField(widget=forms.RadioSelect(choices=models.LICENSE_CHOICES), required=True)
if field.name in ["selecttype", "selectowned"]:
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)
def ipr_contact_form_callback(field, **kwargs):
@ -97,6 +100,8 @@ def new(request, type):
for contact in ["holder_contact", "ietf_contact", "submitter"]:
if contact in section_list:
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)
BaseIprForm.__init__(self, *args, **kw)
# Special validation code

View file

@ -244,13 +244,20 @@
IETF Document or Other Contribution to Which this IPR Disclosure Relates:
</th>
</tr>
{% if ipr.rfclist %}
<tr><td class="fixwidth">RFC Numbers:</td><td><b>{{ ipr.rfclist }}</b></td></tr>
{% else %}
{% for rfc in ipr.rfcs.all %}
<tr><td class="fixwidth"><b>RFC {{ rfc.rfc_number.rfc_number }}:</b></td><td><b>"{{ rfc.rfc_number.rfc_name }}"</b></td></tr>
{% endfor %}
<!-- XXX: Omitting code to display information from the rfc_number field of ipr here, as it's always NULL in the database today. -->
{% 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 %}
<tr><td class="fixwidth">Designations for Other Contributions:</td><td><b>{{ ipr.other_designations }}</b></td></tr>
{% endif %}
@ -335,7 +342,7 @@
</td>
</tr>
<tr>
<td> </td><td>
<td colspan="2">
<b>{{ ipr.licensing_option }}<br/>
{{ ipr.get_lic_opt_a_sub_display }}
{{ ipr.get_lic_opt_b_sub_display }}

View file

@ -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; }
.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 {
padding:2px;
border-width:1px;
padding:0.2ex;
border-width:0.1ex;
border-style:solid;
border-color:#305076;
}
.ipr th { border: 0px; margin: 0px; padding: 4px; }
.ipr td { border: 0px; margin: 0px; padding: 4px; }
td.fixwidth { width: 14ex; }
.ipr ul { list-style-type: none; }
.ipr th { border: 0px; margin: 0px; padding: 0.4ex; }
.ipr td { border: 0px; margin: 0px; padding: 0.4ex; }
td.fixwidth { width: 18ex; }
.ipr ul { list-style-type: none; margin-left: 13ex;}
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="checkbox"] { 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%; }
.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 .required { float: none; vertical-align: -0.5ex; padding: 0; }
/* baseline | sub | super | top | text-top | middle | bottom | text-bottom | <length> | <percentage> */