Updated login form base class
authorThierry Florac <thierry.florac@onf.fr>
Wed, 23 May 2018 15:09:56 +0200
changeset 125 44639c19ec9b
parent 124 9d6720585e2f
child 126 18711a1f3140
Updated login form base class
src/pyams_security/views/login.py
--- a/src/pyams_security/views/login.py	Thu May 03 11:50:02 2018 +0200
+++ b/src/pyams_security/views/login.py	Wed May 23 15:09:56 2018 +0200
@@ -26,7 +26,12 @@
 from z3c.form.interfaces import IDataExtractedEvent
 
 # import packages
-from pyams_form.form import AddForm, AJAXAddForm, DialogAddForm
+try:
+    from pyams_zmi.form import AdminAddForm as AddForm, AdminDialogAddForm as DialogAddForm
+except ImportError:
+    from pyams_form.form import AddForm, DialogAddForm
+
+from pyams_form.form import AJAXAddForm
 from pyams_form.schema import ResetButton, CloseButton
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_security.credential import Credentials