class IFocalPoint(IOrganisationBase): model.fieldset( 'about_fop', label=_(u'About your Focal Point'), fields=[ 'title', 'organisation_type', 'description', 'street', 'address_extra', 'city', 'zip_code', 'country', 'email', 'phone', 'fax', 'url', 'campaign_url', 'logo', 'mission_statement', 'campaign_pledge', 'ceo_image', 'key_name', 'key_email', 'key_phone', ], ) formdirectives.no_omit(IAddForm, 'campaign_pledge') formdirectives.no_omit(IAddForm, 'mission_statement') formdirectives.no_omit(IEditForm, 'mission_statement') formdirectives.no_omit(IEditForm, 'campaign_pledge') formdirectives.no_omit(IAddForm, 'logo') formdirectives.no_omit(IAddForm, 'ceo_image') formdirectives.no_omit(IEditForm, 'ceo_image') description = schema.Text(title=_(u'Description'), ) directives.languageindependent('description') organisation_type = schema.Choice( title=_(u"Organisation type"), vocabulary=vocabularies.fop_organisation_types, ) directives.languageindependent('organisation_type')
def adaptWidgets(self): self.groups[0].widgets['campaign_pledge'].label = _(u"Campaign pledge") self.groups[0].widgets['campaign_pledge'].field.description = _( u"Please summarise briefly the support that you will provide " u"for this campaign.") self.groups[0].widgets['title'].label = _(u'Organisation name') self.groups[0].widgets['logo'].label = _(u"Flag image") self.groups[0].widgets['logo'].field.description = _( u"Please use a format suited for web display if possible (JPEG, " u"PNG or GIF).") self.groups[0].widgets['ceo_image'].label = _(u"Organisation logo") self.groups[0].widgets['mission_statement'].label = _(u"Mandate") self.groups[0].widgets['mission_statement'].field.description = u""
def adaptWidgets(self): self.groups[0].widgets['campaign_pledge'].label = _( u"Campaign pledge") self.groups[0].widgets['campaign_pledge'].field.description = _( u"Please summarise briefly the support that you will provide " u"for this campaign.") self.groups[0].widgets['title'].label = _(u'Organisation name') self.groups[0].widgets['logo'].label = _(u"Flag image") self.groups[0].widgets['logo'].field.description = _( u"Please use a format suited for web display if possible (JPEG, " u"PNG or GIF).") self.groups[0].widgets['ceo_image'].label = _(u"Organisation logo") self.groups[0].widgets['mission_statement'].label = _(u"Mandate") self.groups[0].widgets['mission_statement'].field.description = u""
def adaptWidgets(self): self.groups[0].widgets['mission_statement'].label = _( u"Our contribution") self.groups[0].widgets['mission_statement'].field.description = _( u"Please summarise briefly the support that you will provide " u"for this campaign.") self.groups[0].widgets['title'].label = _(u'Publication name') self.groups[0].widgets['url'].label = _(u"URL") self.groups[0].widgets['url'].field.description = u"" self.groups[0].widgets['logo'].label = _(u"Logo") self.groups[0].widgets['logo'].field.description = _( u"Please use a format suited for web display if possible (JPEG, " u"PNG or GIF).")
class IMediaPartner(IOrganisationBase): model.fieldset( 'about_fop', label=_(u'About your publication'), fields=[ 'title', 'logo', 'country', 'mission_statement', 'publication_type', 'readership', 'key_name', 'key_position', 'key_email', 'editor_in_chief', 'url', 'social_media', 'street', 'address_extra', 'city', 'zip_code', 'phone', 'privacy_policy_text', 'privacy_policy', ], ) formdirectives.no_omit(IAddForm, 'logo') formdirectives.no_omit(IAddForm, 'mission_statement') formdirectives.no_omit(IEditForm, 'mission_statement') formdirectives.no_omit(IAddForm, 'street') formdirectives.no_omit(IEditForm, 'street') formdirectives.omitted('fax') formdirectives.omitted('campaign_url') formdirectives.omitted('email') formdirectives.omitted('key_phone') formdirectives.omitted('organisation_type') form.widget(publication_type=CheckBoxFieldWidget) publication_type = schema.List( title=_(u"Type of publication"), description=_(u"Multiple selections are possible"), value_type=schema.Choice(vocabulary=vocabularies.media_types, )) directives.languageindependent('publication_type') form.widget(readership=CheckBoxFieldWidget) readership = schema.List( title=_(u"Readership"), description=_(u"Multiple selections are possible"), value_type=schema.Choice(vocabulary=vocabularies.media_readership, )) directives.languageindependent('publication_type') key_position = schema.TextLine( title=_(u"Position of the main contact person"), ) directives.languageindependent('key_position') editor_in_chief = schema.TextLine(title=_(u"Editor in Chief"), ) directives.languageindependent('editor_in_chief') social_media = schema.List( title=_(u"Social media profiles"), required=False, value_type=DictRow( title=u"tablerow", required=False, schema=ITableRowSchema, ), ) form.widget(social_media=CustomTableWidgetFactory) privacy_policy_text = RichText( title=u"", required=False, ) formdirectives.omitted('privacy_policy_text') formdirectives.no_omit(IAddForm, 'privacy_policy_text') privacy_policy = schema.Bool( title=_( u"label_accept_privacy", default= u"I confirm that I have read and accept the terms of privacy " u"conditions and I authorise the treatment of my personal data."), required=True, constraint=isTicked, ) formdirectives.omitted('privacy_policy') formdirectives.no_omit(IAddForm, 'privacy_policy')