[saem-devel] [PATCH 2 of 2 eac] Set 'authorized' as default value for NameEntry.form_variant

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Feb 21 17:58:33 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1485807550 -3600
#      Mon Jan 30 21:19:10 2017 +0100
# Node ID d0d8097e694699e7a6f996fd92a8d3a0cf26608f
# Parent  5ae979d1498b42c106d0a304f9470a8c0301946f
Set 'authorized' as default value for NameEntry.form_variant

so it's the value set on creation of an authority record.

diff --git a/views.py b/views.py
--- a/views.py
+++ b/views.py
@@ -62,10 +62,13 @@ for etype, attr in (
     ('EACSource', 'url'),
 ):
     affk.set_field_kwargs(etype, attr, widget=fw.TextInput({'size': 80}))
 
 
+affk.set_field_kwargs('NameEntry', 'form_variant', value=u'authorized')
+
+
 def unrelated_authorityrecord(rtype, form, field, **kwargs):
     """Choices function returning AuthorityRecord choices.
 
     Choices values are unrelated through `rtype` to edited entity thus
     filtering out possible ExternalURI targets. It also account for __linkto


More information about the saem-devel mailing list