Template formatting changes, to more easily see what's going on. And sorting on area within the timeslot.
- Legacy-Id: 152
This commit is contained in:
parent
fca8b30b51
commit
d981d5a617
|
@ -79,11 +79,11 @@ class IprDetail(models.Model):
|
|||
|
||||
# Patent Information fieldset
|
||||
p_applications = models.TextField("Patent Applications", maxlength=255)
|
||||
date_applied = models.DateField(maxlength=255)
|
||||
date_applied = models.CharField(maxlength=255)
|
||||
country = models.CharField(maxlength=100)
|
||||
p_notes = models.TextField("Additional notes", blank=True)
|
||||
selecttype = models.IntegerField("Unpublished Pending Patent Application", null=True, choices=SELECT_CHOICES)
|
||||
selectowned = models.IntegerField("Applies to all IPR owned by Submitter", null=True, blank=True, choices=SELECT_CHOICES)
|
||||
selecttype = models.IntegerField("Unpublished Pending Patent Application", choices=SELECT_CHOICES)
|
||||
selectowned = models.IntegerField("Applies to all IPR owned by Submitter", choices=SELECT_CHOICES)
|
||||
|
||||
# Licensing Declaration fieldset
|
||||
#licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
|
||||
|
@ -94,16 +94,18 @@ class IprDetail(models.Model):
|
|||
comments = models.TextField("Licensing Comments", blank=True)
|
||||
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed")
|
||||
|
||||
third_party = models.BooleanField(editable=False)
|
||||
|
||||
# Other notes fieldset
|
||||
other_notes = models.TextField(blank=True)
|
||||
|
||||
# Generated fields, not part of the submission form
|
||||
# Hidden fields
|
||||
third_party = models.BooleanField()
|
||||
generic = models.BooleanField()
|
||||
comply = models.BooleanField()
|
||||
|
||||
status = models.IntegerField(null=True, blank=True)
|
||||
comply = models.BooleanField(editable=False)
|
||||
generic = models.BooleanField(editable=False)
|
||||
submitted_date = models.DateField(null=True, blank=True)
|
||||
submitted_date = models.DateField(blank=True)
|
||||
update_notified_date = models.DateField(null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
@ -7,6 +7,7 @@ from django.shortcuts import render_to_response as render
|
|||
from ietf.utils import log
|
||||
from ietf.ipr.view_sections import section_table
|
||||
from ietf.idtracker.models import Rfc, InternetDraft
|
||||
from django.http import HttpResponseRedirect
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Callback methods for special field cases.
|
||||
|
@ -20,6 +21,8 @@ def ipr_detail_form_callback(field, **kwargs):
|
|||
if field.name in ["rfc_number", "id_document_tag"]:
|
||||
log(field.name)
|
||||
return forms.CharFieldField(required=False)
|
||||
if field.name in ["date_applied"]:
|
||||
return forms.DateField()
|
||||
return field.formfield(**kwargs)
|
||||
|
||||
def ipr_contact_form_callback(field, **kwargs):
|
||||
|
@ -154,7 +157,15 @@ def new(request, type):
|
|||
raise forms.ValidationError("Unknown Internet-Draft: %s - please correct this." % filename)
|
||||
if rev and id.revision != rev:
|
||||
raise forms.ValidationError("Unexpected revision '%s' for draft %s - the current revision is %s. Please check this." % (rev, filename, id.revision))
|
||||
pass
|
||||
def clean_document_title(self):
|
||||
log("clean_data: %s" % self.data)
|
||||
if type == "general":
|
||||
return """%(p_h_legal_name)s's license statement""" % self.data
|
||||
if type == "specific":
|
||||
return """%(p_h_legal_name)s's Statement about IPR related to ...""" % self.data
|
||||
if type == "third-party":
|
||||
return """%(submitter)s's Statement about IPR related to ... belonging to %(p_h_legal_name)s""" % self.data
|
||||
raise KeyError("Unexpected IPR disclosure type '%s'" % type)
|
||||
|
||||
if request.method == 'POST':
|
||||
data = request.POST.copy()
|
||||
|
@ -170,8 +181,8 @@ def new(request, type):
|
|||
if form.ietf_contact_is_submitter:
|
||||
form.ietf_contact_is_submitter_checked = "checked"
|
||||
if form.is_valid():
|
||||
#instance = form.save()
|
||||
#return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id)
|
||||
instance = form.save()
|
||||
return HttpResponseRedirect("/ipr/ipr-%s" % instance.ipr_id)
|
||||
#return HttpResponseRedirect("/ipr/")
|
||||
|
||||
pass
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
section_table = {
|
||||
"index": { "index": True },
|
||||
"specific": { "index": False, "title": True, "specific": True,
|
||||
"specific": { "index": False, "title": True,
|
||||
"specific": 1, "generic": 0, "third_party": 0,
|
||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||
"holder": True, "holder_contact": True, "ietf_contact": True,
|
||||
"ietf_doc": True, "patent_info": True, "licensing": True,
|
||||
|
@ -9,7 +10,8 @@ section_table = {
|
|||
"disclosure_type": "Specific", "form_legend": False,
|
||||
"per_rfc_disclosure": True, "also_specific": False,
|
||||
},
|
||||
"generic": { "index": False, "title": True, "generic": True,
|
||||
"generic": { "index": False, "title": True,
|
||||
"specific": 0, "generic": 1, "third_party": 0,
|
||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||
"holder": True, "holder_contact": True, "ietf_contact": False,
|
||||
"ietf_doc": False, "patent_info": True, "licensing": True,
|
||||
|
@ -17,7 +19,8 @@ section_table = {
|
|||
"disclosure_type": "Generic", "form_legend": False,
|
||||
"per_rfc_disclosure": False, "also_specific": True,
|
||||
},
|
||||
"third-party": {"index": False, "title": True, "third_party": True,
|
||||
"third-party": {"index": False, "title": True,
|
||||
"specific": 0, "generic": 0, "third_party": 1,
|
||||
"legacy_intro": False, "new_intro": True, "form_intro": False,
|
||||
"holder": True, "holder_contact": False, "ietf_contact": True,
|
||||
"ietf_doc": True, "patent_info": True, "licensing": False,
|
||||
|
|
|
@ -5,6 +5,7 @@ from django.shortcuts import render_to_response as render
|
|||
from django.utils.html import escape
|
||||
from ietf.ipr.view_new import new
|
||||
from ietf.ipr.view_sections import section_table
|
||||
from ietf.utils import log
|
||||
|
||||
def linebreaks(value):
|
||||
if value:
|
||||
|
@ -62,9 +63,10 @@ def show(request, ipr_id=None):
|
|||
ipr.comments = linebreaks(escape(ipr.comments))
|
||||
ipr.other_notes = linebreaks(escape(ipr.other_notes))
|
||||
|
||||
if ipr.licensing_option:
|
||||
ipr.licensing_option = dict(models.LICENSE_CHOICES)[ipr.licensing_option]
|
||||
if ipr.selecttype:
|
||||
ipr.selecttype = dict(models.SELECT_CHOICES)[ipr.selecttype]
|
||||
|
||||
if ipr.selectowned:
|
||||
ipr.selectowned = dict(models.SELECT_CHOICES)[ipr.selectowned]
|
||||
return render("ipr/details.html", {"ipr": ipr, "section_list": section_list})
|
||||
|
@ -82,9 +84,9 @@ def get_section_list(ipr):
|
|||
if ipr.old_ipr_url:
|
||||
return section_table["legacy"]
|
||||
elif ipr.generic:
|
||||
assert not ipr.third_party
|
||||
#assert not ipr.third_party
|
||||
return section_table["generic"]
|
||||
elif ipr.third_party:
|
||||
return section_table["third_party"]
|
||||
return section_table["third-party"]
|
||||
else:
|
||||
return section_table["specific"]
|
||||
|
|
|
@ -475,6 +475,9 @@
|
|||
{% endif %}
|
||||
|
||||
{% if section_list.form_submit %}
|
||||
<input type="hidden" name="third_party" value="{{ section_list.third_party }}">
|
||||
<input type="hidden" name="generic" value="{{ section_list.generic }}">
|
||||
<input type="hidden" name="comply" value="1">
|
||||
<center><input type="submit" name="submit" value="Submit"></center>
|
||||
</form>
|
||||
<blockquote>
|
||||
|
|
Loading…
Reference in a new issue