Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
dde925813aaa
Commit
f96816f2
authored
Jun 15, 2016
by
Sylvain Thénault
Browse files
[ui] Allow not to choose a value for boolean fields
Closes #13562322
parent
bbd0d0fc553f
Changes
2
Hide whitespace changes
Inline
Side-by-side
views/uicfg.py
View file @
dde92581
...
...
@@ -540,6 +540,9 @@ affk.tag_subject_of(('*', 'comment', '*'), {'widget': fw.TextInput({'size': 80})
affk
.
tag_subject_of
((
'*'
,
'id'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'service_level'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'classification_owner'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'need_authorization'
,
'*'
),
{
'allow_none'
:
True
})
affk
.
tag_subject_of
((
'*'
,
'need_reassessing_authorization'
,
'*'
),
{
'allow_none'
:
True
})
affk
.
tag_subject_of
((
'*'
,
'prevent_inheritance'
,
'*'
),
{
'allow_none'
:
True
})
affk
.
tag_subject_of
((
'*'
,
'restriction_rule_id_ref'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'restriction_value'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'title'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
...
...
@@ -559,6 +562,7 @@ affk.tag_subject_of(('*', 'temporal', '*'), {'widget': fw.TextInput({'size': 80}
affk
.
tag_subject_of
((
'*'
,
'juridictional'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'keyword_content'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'custodial_history_item'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'compressed'
,
'*'
),
{
'allow_none'
:
True
})
affk
.
tag_subject_of
((
'*'
,
'creating_application_name'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'creating_application_version'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
affk
.
tag_subject_of
((
'*'
,
'creating_os'
,
'*'
),
{
'widget'
:
fw
.
TextInput
({
'size'
:
80
})})
...
...
xsd2uicfg.py
View file @
dde92581
...
...
@@ -136,6 +136,9 @@ class UICFGGenerator(CodeGenerator):
if
target_etype
==
'String'
and
(
'affk'
,
rtype
)
not
in
self
.
_processed
:
self
.
_processed
.
add
((
'affk'
,
rtype
))
yield
rtype
,
'subject'
,
{
'widget'
:
Code
(
"fw.TextInput({'size': 80})"
)}
elif
target_etype
==
'Boolean'
and
(
'aff'
,
rtype
)
not
in
self
.
_processed
:
self
.
_processed
.
add
((
'aff'
,
rtype
))
yield
rtype
,
'subject'
,
{
'allow_none'
:
True
}
def
autoform_field_kwargs_for_rdef_mapping
(
self
,
mapping
):
if
mapping
.
rtype
.
endswith
(
'code_list_version_to'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment