Added properties edit form marker interface
authorThierry Florac <thierry.florac@onf.fr>
Thu, 14 Jun 2018 14:03:59 +0200
changeset 683 20acd0a6d5a5
parent 682 d093aba47072
child 684 8c9e0b4b8430
Added properties edit form marker interface
src/pyams_content/component/links/zmi/__init__.py
--- a/src/pyams_content/component/links/zmi/__init__.py	Thu Jun 14 14:03:31 2018 +0200
+++ b/src/pyams_content/component/links/zmi/__init__.py	Thu Jun 14 14:03:59 2018 +0200
@@ -25,6 +25,7 @@
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 # import packages
 from pyams_content.component.association.zmi import AssociationItemAJAXAddForm, AssociationItemAJAXEditForm
@@ -39,6 +40,7 @@
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
 from z3c.form import field
+from zope.interface import implementer
 
 from pyams_content import _
 
@@ -114,6 +116,7 @@
 @pagelet_config(name='properties.html', context=IInternalLink, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
 @ajax_config(name='properties.json', context=IInternalLink, layer=IPyAMSLayer,
              permission=MANAGE_CONTENT_PERMISSION, base=AssociationItemAJAXEditForm)
+@implementer(IPropertiesEditForm)
 class InternalLinkPropertiesEditForm(AdminDialogEditForm):
     """Internal link properties edit form"""
 
@@ -121,6 +124,7 @@
 
     legend = _("Edit internal link properties")
     icon_css_class = 'fa fa-fw fa-external-link-square fa-rotate-90'
+    dialog_class = 'modal-large'
 
     fields = field.Fields(IInternalLink).select('reference', 'title', 'description', 'pictogram_name')
     fields['pictogram_name'].widgetFactory = PictogramSelectFieldWidget
@@ -211,6 +215,7 @@
 @pagelet_config(name='properties.html', context=IExternalLink, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
 @ajax_config(name='properties.json', context=IExternalLink, layer=IPyAMSLayer,
              permission=MANAGE_CONTENT_PERMISSION, base=AssociationItemAJAXEditForm)
+@implementer(IPropertiesEditForm)
 class ExternalLinkPropertiesEditForm(AdminDialogEditForm):
     """External link properties edit form"""
 
@@ -308,6 +313,7 @@
 @pagelet_config(name='properties.html', context=IMailtoLink, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
 @ajax_config(name='properties.json', context=IMailtoLink, layer=IPyAMSLayer,
              permission=MANAGE_CONTENT_PERMISSION, base=AssociationItemAJAXEditForm)
+@implementer(IPropertiesEditForm)
 class MailtoLinkPropertiesEditForm(AdminDialogEditForm):
     """Mailto link properties edit form"""