Formatting...
authorThierry Florac <thierry.florac@onf.fr>
Wed, 11 Apr 2018 11:39:16 +0200
changeset 116 89df87450c0c
parent 115 12c5513ee71a
child 117 bab0e0098c8e
Formatting...
src/pyams_security/views/login.py
src/pyams_security/views/userfolder.py
--- a/src/pyams_security/views/login.py	Fri Mar 30 15:34:15 2018 +0200
+++ b/src/pyams_security/views/login.py	Wed Apr 11 11:39:16 2018 +0200
@@ -190,8 +190,10 @@
 @forbidden_view_config(request_type=IPyAMSLayer, renderer='json', xhr=True)
 def ForbiddenAJAXView(request):
     """AJAX call forbidden view"""
-    return {'status': 'modal',
-            'location': 'login-dialog.html'}
+    return {
+        'status': 'modal',
+        'location': 'login-dialog.html'
+    }
 
 
 class ILoginDialogFormButtons(Interface):
--- a/src/pyams_security/views/userfolder.py	Fri Mar 30 15:34:15 2018 +0200
+++ b/src/pyams_security/views/userfolder.py	Wed Apr 11 11:39:16 2018 +0200
@@ -131,14 +131,18 @@
 
     def get_ajax_output(self, changes):
         translate = self.request.localizer.translate
-        return {'status': 'success',
-                'messagebox': {'status': 'success',
-                               'title': translate(_("Your registration is recorded!")),
-                               'icon': 'fa fa-fw fa-user',
-                               'content': translate(_("Your registration is recorded. You should receive a "
-                                                      "confirmation email soon which will allow you to "
-                                                      "confirm your inscription.")),
-                               'timeout': None}}
+        return {
+            'status': 'success',
+            'messagebox': {
+                'status': 'success',
+                'title': translate(_("Your registration is recorded!")),
+                'icon': 'fa fa-fw fa-user',
+                'content': translate(_("Your registration is recorded. You should receive a "
+                                       "confirmation email soon which will allow you to "
+                                       "confirm your inscription.")),
+                'timeout': None
+            }
+        }
 
 
 #
@@ -216,8 +220,10 @@
     """User registration confirmation form, AJAX view"""
 
     def get_ajax_output(self, changes):
-        return {'status': 'redirect',
-                'location': 'user-registration-end.html'}
+        return {
+            'status': 'redirect',
+            'location': 'user-registration-end.html'
+        }
 
 
 @pagelet_config(name='user-registration-end.html', layer=IPyAMSLayer)