Extract icon from paragraph class
authorThierry Florac <thierry.florac@onf.fr>
Mon, 12 Nov 2018 16:42:02 +0100
changeset 1082 18e6d6cddcc9
parent 1081 a7a2eeb833b7
child 1083 112b6aa11de4
Extract icon from paragraph class
src/pyams_content/component/paragraph/zmi/contact.py
--- a/src/pyams_content/component/paragraph/zmi/contact.py	Mon Nov 12 14:50:19 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/contact.py	Mon Nov 12 16:42:02 2018 +0100
@@ -46,7 +46,7 @@
     """Contact paragraph add menu"""
 
     label = _("Contact card...")
-    label_css_class = 'fa fa-fw fa-id-card-o'
+    label_css_class = 'fa fa-fw ' + ContactParagraph.icon_class
     url = 'add-contact-paragraph.html'
     paragraph_type = CONTACT_PARAGRAPH_TYPE
 
@@ -60,7 +60,7 @@
 
     legend = _("Add new contact card")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-id-card-o'
+    icon_css_class = 'fa fa-fw ' + ContactParagraph.icon_class
 
     fields = field.Fields(IContactParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -82,7 +82,7 @@
     prefix = 'contact_properties.'
 
     legend = _("Edit contact card properties")
-    icon_css_class = 'fa fa-fw fa-id-card-o'
+    icon_css_class = 'fa fa-fw ' + ContactParagraph.icon_class
 
     fields = field.Fields(IContactParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget