# HG changeset patch # User Thierry Florac # Date 1512726460 -3600 # Node ID 18da24db44b63483cc479fef77dd89c7e00c80f0 # Parent 2e71fb238b1cd1845a7f78f82e722ecf235e706d Updated CSS class diff -r 2e71fb238b1c -r 18da24db44b6 src/pyams_content/component/extfile/zmi/__init__.py --- a/src/pyams_content/component/extfile/zmi/__init__.py Fri Dec 08 10:46:50 2017 +0100 +++ b/src/pyams_content/component/extfile/zmi/__init__.py Fri Dec 08 10:47:40 2017 +0100 @@ -84,7 +84,7 @@ """External file add menu""" label = _("Add external file") - label_css_class = 'fa fa-fw fa-file-o' + label_css_class = 'fa fa-fw fa-file-text-o' url = 'add-extfile.html' modal_target = True @@ -96,7 +96,7 @@ """External file add form""" legend = _("Add new external file") - icon_css_class = 'fa fa-fw fa-file-o' + icon_css_class = 'fa fa-fw fa-file-text-o' fields = field.Fields(IExtFile).select('title', 'description', 'author', 'language', 'data', 'filename') ajax_handler = 'add-extfile.json' @@ -143,7 +143,7 @@ """External file properties edit form""" legend = _("Update file properties") - icon_css_class = 'fa fa-fw fa-file-o' + icon_css_class = 'fa fa-fw fa-file-text-o' dialog_class = 'modal-large' fields = field.Fields(IExtFile).select('title', 'description', 'author', 'language', 'data', 'filename') @@ -214,6 +214,13 @@ 'language', 'data', 'filename') ajax_handler = 'add-extimage.json' + def updateWidgets(self, prefix=None): + super(ExtImageAddForm, self).updateWidgets(prefix) + if 'title' in self.widgets: + self.widgets['title'].description = None + if 'description' in self.widgets: + self.widgets['description'].description = None + def create(self, data): factory = EXTERNAL_FILES_FACTORIES.get('image') if factory is not None: @@ -252,6 +259,13 @@ fields = field.Fields(IExtImage).select('title', 'alt_title', 'description', 'author', 'language', 'data', 'filename') + def updateWidgets(self, prefix=None): + super(ExtImagePropertiesEditForm, self).updateWidgets(prefix) + if 'title' in self.widgets: + self.widgets['title'].description = None + if 'description' in self.widgets: + self.widgets['description'].description = None + @view_config(name='properties.json', context=IExtImage, request_type=IPyAMSLayer, permission=MANAGE_CONTENT_PERMISSION, renderer='json', xhr=True)