88from plone .supermodel .directives import fieldset
99from plone .supermodel .model import Schema
1010from ploneorg import _
11+ from ploneorg .app .vocabularies import AllContentLanguages
1112from ploneorg .content .foundationsponsor import isEmail
1213from ploneorg .content .foundationsponsor import isHTTP
13- from ploneorg .vocabularies import countries_vocabulary
14- from ploneorg .vocabularies import languages_vocabulary
14+ from ploneorg .vocabularies .countries import countries_vocabulary
1515from zope import schema
1616from zope .interface import alsoProvides
1717from zope .interface import implementer
2020class IServiceProvider (Schema ):
2121
2222 fieldset (
23- "ContactPerson" ,
24- label = "Contact Person" ,
25- fields = ["contact_fullname" , "contact_email" , "contact_phone" , "contact_role" ],
26- )
27-
28- fieldset (
29- "Contacts" ,
23+ "Location" ,
3024 label = "Contacts" ,
3125 fields = [
3226 "address" ,
3327 "city" ,
3428 "zip_code" ,
35- "contact_country " ,
29+ "country " ,
3630 "email1" ,
3731 "email2" ,
3832 "phone1" ,
@@ -42,6 +36,24 @@ class IServiceProvider(Schema):
4236 ],
4337 )
4438
39+ fieldset (
40+ "ContactPerson" ,
41+ label = "Contact Person" ,
42+ fields = ["contact_fullname" , "contact_email" , "contact_phone" , "contact_role" ],
43+ )
44+
45+ fieldset (
46+ "Services" ,
47+ label = "Services and Portfolio" ,
48+ fields = [
49+ "services" ,
50+ "portfolio" ,
51+ "industries" ,
52+ "customer_retention" ,
53+ "certificates" ,
54+ ],
55+ )
56+
4557 fieldset (
4658 "Social" ,
4759 label = "Social Media" ,
@@ -72,11 +84,16 @@ class IServiceProvider(Schema):
7284 required = True ,
7385 )
7486
75- sponsor_level = schema .Choice (
76- title = _ ("Sponsor Level" ),
77- description = _ ("Choose the sponsorship level if applicable." ),
78- values = ["Basic" , "Standard" , "Premium" ],
79- required = False ,
87+ sponsorship_type = schema .Choice (
88+ title = _PMF ("Sponsor Type" , default = "Sponsor Type" ),
89+ vocabulary = "ploneorg.vocabulary.sponsorship_types" ,
90+ required = True ,
91+ )
92+ orgsize = schema .Choice (
93+ title = _ ("Organization size" ),
94+ description = _ ("Number of people in your organization. It's fine to estimate." ),
95+ vocabulary = org_size_vocabulary ,
96+ required = True ,
8097 )
8198
8299 website = schema .URI (
@@ -97,7 +114,7 @@ class IServiceProvider(Schema):
97114 languages = schema .List (
98115 title = _ ("Languages" ),
99116 description = _ ("Languages spoken or supported by the provider." ),
100- value_type = schema .Choice (vocabulary = languages_vocabulary ),
117+ value_type = schema .Choice (vocabulary = AllContentLanguages ),
101118 required = False ,
102119 )
103120
@@ -120,8 +137,8 @@ class IServiceProvider(Schema):
120137 required = False ,
121138 )
122139
123- certifications = RichText (
124- title = _ ("Certifications " ),
140+ certificates = RichText (
141+ title = _ ("Certificates " ),
125142 description = _ ("Relevant certifications or awards." ),
126143 required = False ,
127144 )
@@ -206,13 +223,6 @@ class IServiceProvider(Schema):
206223 required = False ,
207224 )
208225
209- contact_country = schema .Choice (
210- title = _ ("Country" ),
211- description = _ ("Country of the contact office." ),
212- vocabulary = countries_vocabulary ,
213- required = False ,
214- )
215-
216226 email1 = schema .TextLine (
217227 title = _ ("Email 1" ),
218228 description = _ ("General contact email address." ),
@@ -296,6 +306,29 @@ class IServiceProvider(Schema):
296306 title = _ ("Photo 5" ), description = _ ("Optional showcase photo." ), required = False
297307 )
298308
309+ start_date = schema .Date (
310+ title = _PMF ("Start Date" , default = "Start Date" ), required = False
311+ )
312+
313+ end_date = schema .Date (title = _PMF ("End Date" , default = "End Date" ), required = False )
314+
315+ payment_date = schema .Date (
316+ title = _PMF ("Payment Date" , default = "Payment Date" ), required = False
317+ )
318+
319+ last_verified_date = schema .Date (
320+ title = _PMF ("Status last verified date" , default = "Status last verified date" ),
321+ required = False ,
322+ )
323+
324+ notes = RichText (
325+ title = _PMF ("Private notes" , default = "Private notes" ), required = False
326+ )
327+
328+ public_notes = RichText (
329+ title = _PMF ("Public notes" , default = "Public notes" ), required = False
330+ )
331+
299332
300333alsoProvides (IServiceProvider ["logo" ], IPrimaryField )
301334
0 commit comments