Added edit form prefix
authorThierry Florac <thierry.florac@onf.fr>
Wed, 11 Apr 2018 10:59:51 +0200
changeset 94 015fe46dfa2a
parent 93 da8b061840c8
child 95 6de807f76c67
Added edit form prefix
src/pyams_file/zmi/file.py
--- a/src/pyams_file/zmi/file.py	Wed Apr 11 10:59:26 2018 +0200
+++ b/src/pyams_file/zmi/file.py	Wed Apr 11 10:59:51 2018 +0200
@@ -51,6 +51,8 @@
 class FilePropertiesEditForm(AdminDialogEditForm):
     """File properties edit form"""
 
+    prefix = 'file_properties.'
+
     legend = _("Update file properties")
     icon_css_class = 'fa fa-fw fa-edit'
 
@@ -76,9 +78,10 @@
     def get_ajax_output(self, changes):
         info_changes = changes.get(IFileInfo, ())
         if ('title' in info_changes) or ('filename' in info_changes):
-            return {'status': 'reload',
-                    'smallbox': self.request.localizer.translate(self.successMessage),
-                    'smallbox_status': 'success'}
+            return {
+                'status': 'reload',
+                'message': self.request.localizer.translate(self.successMessage)
+            }
         else:
             return super(FilePropertiesAJAXEditForm, self).get_ajax_output(changes)