# HG changeset patch # User Damien Correia # Date 1542114414 -3600 # Node ID 978a2b9123b9d0ea24e785da58ffd431cd8beecf # Parent 3d259e1718ef50ba9ee5fed454d5a1946554f928 Updated contact, added phone_number and company diff -r 3d259e1718ef -r 978a2b9123b9 src/pyams_content/component/paragraph/contact.py --- a/src/pyams_content/component/paragraph/contact.py Tue Nov 13 14:05:02 2018 +0100 +++ b/src/pyams_content/component/paragraph/contact.py Tue Nov 13 14:06:54 2018 +0100 @@ -46,8 +46,10 @@ name = FieldProperty(IContactParagraph['name']) charge = FieldProperty(IContactParagraph['charge']) + company = FieldProperty(IContactParagraph['company']) contact_email = FieldProperty(IContactParagraph['contact_email']) contact_form = FieldProperty(IContactParagraph['contact_form']) + phone_number = FieldProperty(IContactParagraph['phone_number']) _photo = FileProperty(IContactParagraph['photo']) if have_gis: diff -r 3d259e1718ef -r 978a2b9123b9 src/pyams_content/component/paragraph/interfaces/contact.py --- a/src/pyams_content/component/paragraph/interfaces/contact.py Tue Nov 13 14:05:02 2018 +0100 +++ b/src/pyams_content/component/paragraph/interfaces/contact.py Tue Nov 13 14:06:54 2018 +0100 @@ -9,6 +9,7 @@ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # +from zope.schema._field import ASCIILine __docformat__ = 'restructuredtext' @@ -50,12 +51,16 @@ name = TextLine(title=_("Contact identity"), description=_("Name of the contact"), - required=True) + required=False) charge = I18nTextLineField(title=_("In charge of"), description=_("Label of contact function"), required=False) + company = TextLine(title=_("Company"), + description=_("Business name of the employer"), + required=False) + contact_email = MailAddressField(title=_("Email address"), description=_("Contact email address"), required=False) @@ -65,6 +70,10 @@ required=False, content_type=FORM_CONTENT_TYPE) + phone_number = ASCIILine(title=_('Phone number'), + description=_('Phone number in international format.\n E.g. +33 ....'), + required=False, ) + photo = ImageField(title=_("Photo"), description=_("Use 'browse' button to select contact picture"), required=False)