Changed mode in user profile edit form
authorThierry Florac <thierry.florac@onf.fr>
Wed, 02 Aug 2017 09:05:58 +0200
changeset 89 2f97a2669867
parent 88 64ed37f17e0f
child 90 d58453809379
Changed mode in user profile edit form
src/pyams_security/zmi/profile.py
--- a/src/pyams_security/zmi/profile.py	Thu Jul 13 11:04:50 2017 +0200
+++ b/src/pyams_security/zmi/profile.py	Wed Aug 02 09:05:58 2017 +0200
@@ -20,6 +20,7 @@
 from pyams_security.interfaces.profile import IPublicProfile
 from pyams_skin.interfaces.viewlet import IUserMenusViewletManager
 from pyams_skin.layer import IPyAMSLayer
+from z3c.form.interfaces import INPUT_MODE
 
 # import packages
 from pyams_form.form import AJAXEditForm
@@ -71,6 +72,9 @@
     def getContent(self):
         return self.request.root
 
+    def check_mode(self):
+        self.mode = INPUT_MODE
+
 
 @view_config(name='user-profile.json', request_type=IPyAMSLayer, renderer='json', xhr=True)
 class UserProfileAJAXEditForm(AJAXEditForm, UserProfileEditForm):