Updated contact paragraph renderer dev-dc
authorDamien Correia
Tue, 20 Nov 2018 15:19:28 +0100
branchdev-dc
changeset 238 df8da54d790a
parent 237 df13285543de
child 239 a6429e91f091
child 274 39bf2d8df31d
Updated contact paragraph renderer
src/pyams_default_theme/component/paragraph/contact.py
src/pyams_default_theme/component/paragraph/interfaces/contact.py
--- a/src/pyams_default_theme/component/paragraph/contact.py	Tue Nov 20 15:18:10 2018 +0100
+++ b/src/pyams_default_theme/component/paragraph/contact.py	Tue Nov 20 15:19:28 2018 +0100
@@ -43,6 +43,7 @@
     photo_position = FieldProperty(IContactParagraphDefaultRendererSettings['photo_position'])
     display_map = FieldProperty(IContactParagraphDefaultRendererSettings['display_map'])
     map_position = FieldProperty(IContactParagraphDefaultRendererSettings['map_position'])
+    button_label = FieldProperty(IContactParagraphDefaultRendererSettings['button_label'])
 
     @property
     def can_display_photo(self):
--- a/src/pyams_default_theme/component/paragraph/interfaces/contact.py	Tue Nov 20 15:18:10 2018 +0100
+++ b/src/pyams_default_theme/component/paragraph/interfaces/contact.py	Tue Nov 20 15:19:28 2018 +0100
@@ -22,6 +22,7 @@
 from zope.schema import Bool, Choice
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
+from pyams_i18n.schema import I18nTextLineField
 from pyams_default_theme import _
 
 
@@ -60,3 +61,8 @@
                           default='right')
 
     can_display_map = Attribute("Check if location map can be displayed")
+
+    button_label = I18nTextLineField(title=_("Button label"),
+                                     description=_("Label of the navigation button displayed by "
+                                                   "front-office template"),
+                                     required=False)