def update_muser_schema(baseSchema): specificSchema = Schema(( DateTimeField( name='start_date_function', widget=DateTimeField._properties['widget']( label='start_date_function', label_msgid='MeetingAndenne_label_start_date_function', i18n_domain='PloneMeeting', ), searchable=True, required=False), DateTimeField(name='end_date_function', widget=DateTimeField._properties['widget']( label='end_date_function', label_msgid='MeetingAndenne_label_end_date_function', i18n_domain='PloneMeeting', ), searchable=True, required=False), ), ) completeUserSchema = baseSchema + specificSchema.copy() return completeUserSchema
label="Temporal Extent", description=( "The time period covered by the content of the resource"), label_msgid='dataservice_label_coverage', description_msgid='dataservice_help_coverage', i18n_domain='eea', ) ), DateTimeField( name='lastUpload', languageIndependent=True, required=False, default=DateTime(), schemata="metadata", imports="from DateTime import DateTime", widget=CalendarWidget( show_hm=False, label="Date of publication", description=("The date of the resource when available"), label_msgid='dataservice_label_last_upload', description_msgid='dataservice_help_last_upload', i18n_domain='eea', ), ), StringField( name='sectionTitleQuality', # ======================================== schemata='metadata', widget=LabelWidget( label=('QUALITY AND VALIDITY'), i18n_domain="eea", visible={'edit': 'visible', 'view': 'invisible'} )
from Products.ATContentTypes.interfaces import IATTopicSearchCriterion from Products.ATContentTypes.permission import ChangeTopics from Products.CMFCore.permissions import View from zope.interface import implements RELEVANT_INDICES = list(DATE_INDICES) RELEVANT_INDICES.remove('DateRangeIndex') RELEVANT_INDICES = tuple(RELEVANT_INDICES) ATDateRangeCriterionSchema = ATBaseCriterionSchema + Schema(( DateTimeField( 'start', required=1, mode="rw", write_permission=ChangeTopics, default=None, widget=CalendarWidget( label=_(u'label_date_range_criteria_start', default=u'Start Date'), description=_( u'help_date_range_criteria_start', default=u'The beginning of the date range to search')), ), DateTimeField( 'end', required=1, mode="rw", write_permission=ChangeTopics, default=None, widget=CalendarWidget( label=_(u'label_date_range_criteria_end', default=u'End Date'), description=_(u'help_date_range_criteria_end', default=u'The ending of the date range to search.')),
widget=SelectionWidget( label=_("Report Options"), checkbox_bound=0, format="select", visible=True, default="r", ), ), StringField( "AttachmentKeys", searchable=True, widget=StringWidget(label=_("Attachment Keys"), ), ), DateTimeField( "DateLoaded", required=1, default_method="current_date", widget=DateTimeWidget(label=_("Date Loaded"), ), ), )) schema["id"].required = False schema["title"].required = False class Attachment(BaseFolder, ClientAwareMixin): """Attachments are stored per client and can be linked to ARs or Analyses """ security = ClassSecurityInfo() displayContentsTab = False schema = schema _at_rename_after_creation = True
widget=SelectionWidget( label=_("Report Options"), checkbox_bound=0, format='select', visible=True, default='a', ), ), StringField( 'AttachmentKeys', searchable=True, widget=StringWidget(label=_("Attachment Keys"), ), ), DateTimeField( 'DateLoaded', required=1, default_method='current_date', widget=DateTimeWidget(label=_("Date Loaded"), ), ), ComputedField( 'AttachmentTypeUID', expression= "context.getAttachmentType().UID() if context.getAttachmentType() else ''", widget=ComputedWidget(visible=False, ), ), ComputedField( 'ClientUID', expression='here.aq_parent.UID()', widget=ComputedWidget(visible=False, ), ), ))
from DateTime import DateTime from Products.Archetypes.atapi import Schema from Products.Archetypes.atapi import BaseSchema from Products.Archetypes.atapi import DateTimeField from Products.Archetypes.atapi import registerType from Products.Archetypes.examples.SimpleType import SimpleType from plone.formwidget.datetime.at import DateWidget from plone.formwidget.datetime.at import DatetimeWidget from plone.formwidget.datetime.at import MonthYearWidget schema = BaseSchema.copy() + Schema(( DateTimeField('datefield', default_method=DateTime, widget=DateWidget( label='Date field', description='', )), DateTimeField('datetimefield', default_method=DateTime, widget=DatetimeWidget( label='Datetime field', description='', ampm=1, )), DateTimeField('monthyearfield', default_method=DateTime, widget=MonthYearWidget( label='MonthYear field', description='', )),
from Products.EEAContentTypes.config import PROJECTNAME schema = Schema(( StringField(name='callForId', widget=StringWidget( label='Reference ID', label_msgid='EEAContentTypes_label_callForId', description=_(u'E.g: EEA/NSV/14/004'), i18n_domain='EEAContentTypes', ), required=1), DateTimeField(name='closeDate', widget=CalendarWidget( label='Close date', label_msgid='EEAContentTypes_label_closeDate', i18n_domain='EEAContentTypes', ), required=1), DateTimeField(name='openDate', widget=CalendarWidget( label='Open date', label_msgid='EEAContentTypes_label_openDate', i18n_domain='EEAContentTypes', ), required=1), DateTimeField(name='applicationDate', widget=CalendarWidget( label='Application date', label_msgid='EEAContentTypes_label_applicationDate', i18n_domain='EEAContentTypes',
), StringField( name='dpsir', widget=SelectionWidget( label="DPSIR", label_msgid='indicators_label_dpsir', i18n_domain='indicators', ), vocabulary=NamedVocabulary("indicator_dpsir"), ), DateTimeField( name='assessment_date', widget=DateTimeField._properties['widget']( label="Assessment date", description="Date when the assessment analysis was made. " "This does not necesserly coincide with the " "underline data time coverage which can be older.", label_msgid='indicators_label_assessment_date', i18n_domain='indicators', ), ), StringField( name='source_code', searchable=True, widget=StringField._properties['widget']( label="Source code", description="another code who may indentify this indicator " "in other source databases.", label_msgid='indicators_label_source_code', i18n_domain='indicators', ),
Column("Years frequency"), }, auto_insert=False, label_msgid='indicators_label_codes', i18n_domain='indicators', ), columns=("years_freq",), required_for_published=True, #validators=('isInt',), #allow_empty_rows=True, ), DateTimeField( name='starting_date', #required=True, widget=CalendarWidget( label="Starting with this date, indicator is published at " \ "regular intervals" ), #default_method='get_default_frequency_of_updates_starting_date', ), DateTimeField( name='ending_date', required=False, widget=CalendarWidget( label="Date after which indicator is discontinued, meaning " \ "no longer being updated regularly" ), #default_method='get_default_frequency_of_updates_ending_date', ), ))
), BooleanField('display_size_left', default=False, widget=BooleanWidget( visible={'edit': 'visible', 'view': 'invisible'}, label=_('field_display_size_left', default=u'Display seats left'), description=_('fieldhelp_display_size_left', default=u"Choose to show in the subscription page the number of seats left",) ) ), DateTimeField('startDate', required=False, searchable=False, accessor='start', write_permission=ModifyPortalContent, languageIndependent=True, widget=CalendarWidget( description='', label=_E(u'label_event_start', default=u'Event Starts') ) ), DateTimeField('endDate', required=False, searchable=False, accessor='end', write_permission=ModifyPortalContent, languageIndependent=True, widget=CalendarWidget( description='', label=_E(u'label_event_end', default=u'Event Ends') )
def update_meeting_schema(baseSchema): specificSchema = Schema(( TextField( name='preMeetingAssembly', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition="python: here.attributeIsUsed('preMeetingAssembly')", description="PreMeetingAssembly", description_msgid="premeeting_assembly_descr", label='Premeetingassembly', label_msgid='MeetingLalouviere_label_preMeetingAssembly', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_2', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_2')", label='Premeetingdate_2', label_msgid='PloneMeeting_label_preMeetingDate_2', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_2', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_2')", label='Premeetingplace_2', label_msgid='PloneMeeting_label_preMeetingPlace_2', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_2', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_2')", description="PreMeetingAssembly_2", description_msgid="premeeting_assembly_2_descr", label='Premeetingassembly_2', label_msgid='MeetingLalouviere_label_preMeetingAssembly_2', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_2", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_3', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_3')", label='Premeetingdate_3', label_msgid='PloneMeeting_label_preMeetingDate_3', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_3', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_3')", label='Premeetingplace_3', label_msgid='PloneMeeting_label_preMeetingPlace_3', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_3', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_3')", description="PreMeetingAssembly_3", description_msgid="premeeting_assembly_3_descr", label='Premeetingassembly_3', label_msgid='MeetingLalouviere_label_preMeetingAssembly_3', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_3", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_4', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_4')", label='Premeetingdate_4', label_msgid='PloneMeeting_label_preMeetingDate_4', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_4', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_4')", label='Premeetingplace_4', label_msgid='PloneMeeting_label_preMeetingPlace_4', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_4', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_4')", description="PreMeetingAssembly_4", description_msgid="premeeting_assembly_4_descr", label='Premeetingassembly_4', label_msgid='MeetingLalouviere_label_preMeetingAssembly_4', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_4", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_5', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_5')", label='Premeetingdate_5', label_msgid='PloneMeeting_label_preMeetingDate_5', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_5', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_5')", label='Premeetingplace_5', label_msgid='PloneMeeting_label_preMeetingPlace_5', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_5', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_5')", description="PreMeetingAssembly_5", description_msgid="premeeting_assembly_5_descr", label='Premeetingassembly_5', label_msgid='MeetingLalouviere_label_preMeetingAssembly_5', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_5", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_6', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_6')", label='Premeetingdate_6', label_msgid='PloneMeeting_label_preMeetingDate_6', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_6', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_6')", label='Premeetingplace_6', label_msgid='PloneMeeting_label_preMeetingPlace_6', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_6', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_6')", description="PreMeetingAssembly_6", description_msgid="premeeting_assembly_6_descr", label='Premeetingassembly_6', label_msgid='MeetingLalouviere_label_preMeetingAssembly_6', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_6", default_content_type="text/plain", ), DateTimeField( name='preMeetingDate_7', widget=DateTimeField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingDate_7')", label='Premeetingdate_7', label_msgid='PloneMeeting_label_preMeetingDate_7', i18n_domain='PloneMeeting', ), optional=True, ), StringField( name='preMeetingPlace_7', widget=StringField._properties['widget']( condition="python: here.attributeIsUsed('preMeetingPlace_7')", label='Premeetingplace_7', label_msgid='PloneMeeting_label_preMeetingPlace_7', i18n_domain='PloneMeeting', ), optional=True, ), TextField( name='preMeetingAssembly_7', allowable_content_types="text/plain", optional=True, widget=TextAreaWidget( condition= "python: here.attributeIsUsed('preMeetingAssembly_7')", description="PreMeetingAssembly_7", description_msgid="premeeting_assembly_7_descr", label='Premeetingassembly_7', label_msgid='MeetingLalouviere_label_preMeetingAssembly_7', i18n_domain='PloneMeeting', ), default_output_type="text/html", default_method="getDefaultPreMeetingAssembly_7", default_content_type="text/plain", ), ), ) baseSchema['observations'].widget.label_method = "getLabelObservations" completeMeetingSchema = baseSchema + specificSchema.copy() return completeMeetingSchema
description_msgid='Poi_help_subject', i18n_domain='Poi', ), searchable=True, vocabulary='getTagsVocab', enforceVocabulary=False, write_permission=permissions.ModifyIssueTags, accessor="Subject" ), DateTimeField( 'deadline', languageIndependent = True, widget=CalendarWidget( label="Deadline", description=("Date until this issues needs to be resolved."), label_msgid="Poi_label_deadline", description_msgid="Poi_help_deadline", i18n_domain="Poi", with_time=1), ), IntegerField( name='progress', widget=SelectionWidget( label="Progress achieved", description="Select the amount of progress archieved for this issue.", label_msgid='Poi_label_progress', description_msgid='Poi_help_progress', i18n_domain='Poi', format='select',
from Products.Archetypes.atapi import BooleanField from Products.Archetypes.atapi import BooleanWidget from Products.Archetypes.atapi import CalendarWidget from Products.Archetypes.atapi import DateTimeField from Products.Archetypes.atapi import OrderedBaseFolder from Products.Archetypes.atapi import OrderedBaseFolderSchema from Products.Archetypes.atapi import registerType from Products.Archetypes.atapi import Schema from Products.eXtremeManagement.interfaces import IXMOffer schema = Schema(( DateTimeField( name='startDate', validators=('isValidDate', ), widget=CalendarWidget(show_hm=False, label='Start date', label_msgid='eXtremeManagement_label_startDate', i18n_domain='eXtremeManagement'), ), DateTimeField( name='endDate', validators=('isValidDate', ), widget=CalendarWidget(show_hm=False, label='End date', label_msgid='eXtremeManagement_label_endDate', i18n_domain='eXtremeManagement'), ), BooleanField( name='show_draft', default="False", widget=BooleanWidget(
description_msgid="help_instrument_location", visible={ 'view': 'invisible', 'edit': 'visible' })), ImageField( 'Photo', schemata='Additional info.', widget=ImageWidget( label=_("Photo image file"), description=_("Photo of the instrument"), ), ), DateTimeField('InstallationDate', schemata='Additional info.', widget=DateTimeWidget( label=_("InstallationDate"), description=_("The date the instrument was installed"), )), BlobFileField('InstallationCertificate', schemata='Additional info.', widget=FileWidget( label=_("Installation Certificate"), description=_("Installation certificate upload"), )), )) schema.moveField('AssetNumber', before='description') schema.moveField('SupplierName', before='Model') schema.moveField('ManufacturerName', before='SupplierName') schema.moveField('InstrumentTypeName', before='ManufacturerName')
label_msgid='dataservice_label_eea_mp', description_msgid='dataservice_help_eea_mp', i18n_domain='eea', ) ), DateTimeField( name='lastUpload', languageIndependent=True, required=True, default=DateTime(), imports="from DateTime import DateTime", widget=CalendarWidget( visible={ "edit": "invisible", "view": "invisible"}, show_hm=False, label="Last upload", description=("Date when the data resource was last uploaded in " "EEA data service. If not manually provided it will " "coincide with publishing date. It can later be used " "when a dataset is re-uploaded due to corrections " "and when a whole new version is not necessary."), label_msgid='dataservice_label_last_upload', description_msgid='dataservice_help_last_upload', i18n_domain='eea', ), ), LinesField( name='dataOwner', languageIndependent=True, multiValued=1, required=True,
widget=BooleanWidget( label=_("Internal Certificate"), description=_( "Select if is an in-house calibration certificate"))), StringField( 'Agency', widget=StringWidget( label=_("Agency"), description= _("Organization responsible of granting the calibration certificate" )), ), DateTimeField( 'Date', widget=DateTimeWidget( label=_("Date"), description=_("Date when the calibration certificate was granted"), ), ), StringField( 'ExpirationInterval', vocabulary="getInterval", widget=ComboBoxWidget( label=_("Interval"), description=_("The interval is calculated from the 'From' field " "and defines when the certificate expires in days. " "Setting this inverval overwrites the 'To' field " "on save."), default="", # configures the HTML input attributes for the additional field field_config={
from Products.feedfeeder.config import PROJECTNAME from Products.feedfeeder import _ copied_fields = {} copied_fields['text'] = ATDocument.schema['text'].copy() copied_fields['text'].required = 0 schema = Schema( ( StringField(name='feedItemAuthor', widget=StringWidget(label=_( 'feedfeeder_label_feedItemAuthor', default='Feeditemauthor'), )), DateTimeField(name='feedItemUpdated', default=DateTime('2000/01/01'), widget=CalendarWidget(label=_( 'feedfeeder_label_feedItemUpdated', 'Feeditemupdated'), )), copied_fields['text'], StringField(name='link', widget=StringWidget(label=_('feedfeeder_label_link', default='Link'), )), ComputedField(name='objectids', widget=ComputedWidget( label=_('feedfeeder_label_objectids', default='Object Ids'), )), ComputedField(name='hasBody', widget=ComputedWidget( label=_('feedfeeder_label_hasbody', default='Has body text'), )), StringField(name='feedTitle',
from Products.ATContentTypes.lib.historyaware import HistoryAwareMixin from Products.ATContentTypes import ATCTMessageFactory as _ ATEventSchema = ATContentTypeSchema.copy() + Schema(( StringField('location', searchable=True, write_permission=ModifyPortalContent, widget=StringWidget(description='', label=_(u'label_event_location', default=u'Event Location'))), DateTimeField('startDate', required=True, searchable=False, accessor='start', write_permission=ModifyPortalContent, default_method=DateTime, languageIndependent=True, widget=CalendarWidget(description='', label=_(u'label_event_start', default=u'Event Starts'))), DateTimeField('endDate', required=True, searchable=False, accessor='end', write_permission=ModifyPortalContent, default_method=DateTime, languageIndependent=True, widget=CalendarWidget(description='', label=_(u'label_event_end', default=u'Event Ends'))), TextField('text',
label_msgid = 'label_answer_template', description = 'You can provide a template for the students\' answers', description_msgid = 'help_answer_template', i18n_domain = config.I18N_DOMAIN, rows = 12, #format = 0, ), ), DateTimeField( 'submission_period_start', #mutator = 'setEffectiveDate', languageIndependent = True, #default=FLOOR_DATE, widget = CalendarWidget( label = "Start of Submission Period", description = ("Date after which students are allowed to " "submit their assignments"), label_msgid = "label_submission_period_start", description_msgid = "help_submission_period_start", i18n_domain = config.I18N_DOMAIN ), ), DateTimeField( 'submission_period_end', #mutator = 'setExpirationDate', languageIndependent = True, #default=CEILING_DATE, widget = CalendarWidget( label = "End of Submission Period", description = ("Date after which assignments can no longer "
# Widgets from Products.Archetypes.atapi import StringWidget from Products.Archetypes.atapi import TextAreaWidget from bika.lims.browser.widgets import DateTimeWidget from bika.lims.browser.widgets import ReferenceWidget from bika.lims.config import PROJECTNAME from bika.lims import bikaMessageFactory as _ from bika.lims.interfaces import IInstrumentValidation schema = BikaSchema.copy() + Schema(( DateTimeField( 'DateIssued', with_time=1, with_date=1, widget=DateTimeWidget( label=_("Report Date"), description=_("Validation report date"), ), ), DateTimeField( 'DownFrom', with_time=1, with_date=1, widget=DateTimeWidget( label=_("From"), description=_( "Date from which the instrument is under validation"), ), ), DateTimeField(
), StringField( name='status', widget=SelectionWidget( label='Status', label_msgid='indicators_label_status', i18n_domain='indicators', ), required=True, vocabulary=["Not started", "In progress", "Completed"], ), DateTimeField( name='due_date', widget=DateTimeField._properties['widget']( label="Due date", label_msgid='indicators_label_due_date', i18n_domain='indicators', ), required=True, ), ), ) WorkItem_schema = ATContentTypeSchema.copy() + \ getattr(ATCTContent, 'schema', Schema(())).copy() + \ schema.copy() finalizeATCTSchema(WorkItem_schema) WorkItem_schema['relatedItems'].widget.visible = { 'view': 'invisible', 'edit': 'invisible'