publisher_serial = CharField(_('publisher serial number'))
booklet_author = CharField(_('author of published notice'))
external_references = TextField(_('bibliographic references'))
- doctype_code = IntegerField(_('document type'))
+ doctype_code = IntegerField(_('document type'), null=True, blank=True)
public_access = CharField(_('public access'), choices=PUBLIC_ACCESS_CHOICES,
max_length=16, default="metadata")
legal_rights = WeakForeignKey('LegalRight', related_name="collections",
{% dl_field collection "booklet_author" %}
<dt>{% trans "Bibliographic references" %}</dt>
<dd>{{ collection.external_references|html_line_break|safe }}</dd>
- {% dl_field collection "doctype_code" %}
+ {% if collection.doctype_code %}
+ {% dl_field collection "doctype_code" %}
+ {% endif %}
{% dl_field collection "public_access_label" %}
{% dl_field collection "legal_rights" %}
</dl>
<tr><td colspan="2">{% for error in form.non_field_errors %}<li class="error">{{ error }}</li>{% endfor %}</td></tr>
{% for field in form %}
<tr>
- {% if field.html_name == "copied_from_item" or field.html_name == "doctype_code" %}
+ {% if field.html_name == "copied_from_item" %}
<td>{{ field.label_tag.as_hidden }}</td><td>{{ field.as_hidden }}</td>
{% else %}
<tr><td class="error">{{ field.errors }}</td></tr>