[PATCH 3 of 3 saem] [views] Do not propose to add property from a user's 'add' submenu

Sylvain Thenault sylvain.thenault at logilab.fr
Thu Apr 13 15:27:09 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1492089933 -7200
#      Thu Apr 13 15:25:33 2017 +0200
# Node ID 59570eded33ac790bf756a321584294eeb21f7a1
# Parent  dc7d9b0f53e67ee4f194cb8f6a49aeb1b03a7d68
[views] Do not propose to add property from a user's 'add' submenu

The CWProperty mecanism should be hidden from the UI.

diff --git a/cubicweb_saem_ref/views/__init__.py b/cubicweb_saem_ref/views/__init__.py
--- a/cubicweb_saem_ref/views/__init__.py
+++ b/cubicweb_saem_ref/views/__init__.py
@@ -46,10 +46,11 @@ affk = uicfg.autoform_field_kwargs
 pvs.tag_subject_of(('*', 'ark_naa', '*'), 'attributes')
 afs.tag_subject_of(('*', 'ark_naa', '*'), 'main', 'attributes')
 afs.tag_subject_of(('*', 'custom_workflow', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'primary_email', '*'), 'main', 'hidden')
 
+abaa.tag_object_of(('*', 'for_user', '*'), False)  # do not expose CWProperties mecanism
 abaa.tag_subject_of(('*', 'use_email', '*'), False)
 abaa.tag_subject_of(('*', 'phone_number', '*'), False)
 
 affk.set_field_kwargs('*', 'ark', widget=fw.TextInput({'size': 80}), required=False)
 


More information about the saem-devel mailing list