Exemple #1
0
class IConferencebreakFolder(model.Schema):
    title = schema.TextLine(
        title=_(safe_unicode('Title')),
        description=_(safe_unicode('Conference Break Folder Title')),
    )

    description = schema.Text(title=_(
        safe_unicode('Conference Break Summary')), )
class ITrainingFolder(model.Schema):
    title = schema.TextLine(
        title=_(safe_unicode('Title')),
        description=_(safe_unicode('Trainings folder title')),
        default=_(safe_unicode('Trainings')),
    )

    description = schema.Text(title=_(safe_unicode('Summary For Trainings')), )
Exemple #3
0
class ITWFolder(model.Schema):
    directives.mode(title='hidden')
    title = schema.TextLine(
        title=_(safe_unicode('Title')),
        description=_(safe_unicode('Talk workshop folder title')),
        default=_(safe_unicode('Talks / Workshops')),
    )

    description = schema.Text(title=_(
        safe_unicode('Summary For Talks And Workshops')), )
Exemple #4
0
class ITalksfolder(model.Schema):

    directives.mode(title='hidden')
    title = schema.TextLine(title=_(u'Name Of The Folder For Talks'),
                            default=_(u'Talks'))

    description = schema.Text(
        title=_(u'Talk Folder Description'),
        required=False,
    )
Exemple #5
0
class ISpeakerfolder(model.Schema):
    """A speaker folder. The speaker of the conference are created in the folder.
    """

    title = schema.TextLine(title=_(u"Name of the speaker folder"), )

    description = schema.Text(
        title=_(u"speakerfolder description"),
        required=False,
    )
class IWorkshopfolder(model.Schema):

    directives.mode(title='hidden')
    title = schema.TextLine(title=_(u'Name Of The Workshopfolder'),
                            default=_(u'Workshops'))

    description = schema.Text(
        title=_(u'Workshop Folder Description'),
        required=False,
    )
Exemple #7
0
class IRoomfolder(model.Schema):
    """A folder for the rooms of a conference.
    """

    title = schema.TextLine(title=_(u"Name of the room folder"), )

    description = schema.Text(title=_(u"roomfolder description"), )

    primary('details')
    details = RichText(title=_(u"Information about the Conference Rooms"),
                       required=False)
class IAttendeefolder(model.Schema):
    """A attendee folder. The attendee of the conference are created in the folder.
    """

    title = schema.TextLine(title=_(u"Name of the attendee folder"), )

    description = schema.Text(
        title=_(u"attendee folder description"),
        required=False,
    )

    primary('moreinformation')
    moreinformation = RichText(
        title=_(u"Information about registration process"), required=False)
class IRoomfolder(model.Schema):
    """A folder for the rooms of a conference.
    """

    title = schema.TextLine(title=_(safe_unicode('Name of the room folder')), )

    description = schema.Text(title=_(
        safe_unicode('roomfolder description')), )

    primary('details')
    details = RichText(
        title=_(safe_unicode('Information about the Conference Rooms')),
        required=False,
    )
Exemple #10
0
class IRegistration(model.Schema):
    title = schema.TextLine(
        title=_(safe_unicode('Title of the Registration Page')),
    )

    description = schema.Text(
        title=_(safe_unicode('Registration Description')),
        required=False,
    )

    primary('moreinformation')
    moreinformation = RichText(
        title=_(safe_unicode('Information About The Registration Process')),
        required=False,
    )
Exemple #11
0
 def validateStartEnd(data):
     if data.trackstart is not None and data.trackend is not None:
         if data.trackstart > data.trackend:
             raise StartBeforeEnd(
                 _(
                     safe_unicode(
                         'The start date must be before the end date.')))
Exemple #12
0
 def validateplanedlengthchoosen(data):
     if not data.planedtraininglength:
         raise ChoosePlanedLength(
             _(
                 safe_unicode(
                     'Please choose a planed length for your training.'), ),
         )
Exemple #13
0
 def validateStartEnd(data):
     if data.startitem is not None and data.enditem is not None:
         if data.startitem > data.enditem:
             raise StartBeforeEnd(
                 _(
                     safe_unicode(
                         'The start date must be before the end date.')))
Exemple #14
0
 def validatecfptopicchoosen(data):
     if not data.call_for_paper_topic:
         raise ChooseCfpTopic(
             _(
                 safe_unicode(
                     'Please choose a call for paper topic for your workshop.'
                 ), ), )
Exemple #15
0
 def validateplanedlengthchoosen(data):
     if not data.planedworkshoplength:
         raise ChoosePlanedLength(
             _(
                 safe_unicode(
                     'Please choose a planed length for your workshop.'), ),
         )
Exemple #16
0
 def trackpositionset(value):
     if value.conferencetrack and not value.positionintrack:
         raise Invalid(
             _(
                 safe_unicode(
                     'You need to choose a position in the track. Please '
                     "add this position to the field 'Position in Track'."))
         )
class IRoom(model.Schema):
    """A conference room.
    """
    
    title = schema.TextLine(
            title=_(u"Name of the Room"),
        )


    description = schema.Text(
            title=_(u"A description of the room and its location"),
        )

    
    picture = NamedBlobImage(
            title=_(u"A picture of the room"),
            description=_(u"Please upload an image"),
            required=False,
        )
    
    primary ('details')
    details = RichText(
             title=_(u"A full description of the room, it's location and the way to get there"),
             required=True,                          
        )
    
    capacity = schema.Int(
             title=_(u"Capacity of the room"),
             description=_(u"Please fill in the maximum number of attendees"),
             required=False,
        )
class NewWorkshopSchema(interface.Interface):

    workshoptitle=schema.TextLine(
        title=_(u'The Title Of Your Workshop'),
        description=_(u'Fill in the title of your proposed conference workshop'),
    )

    workshopdescription = schema.Text(
        title=_(u"Workshop summary"),
    )

    workshopdetails = RichText(
            title=_(u"Workshop details"),
            required=True
        )

    cfp_topic = schema.List(
        title=_(u"Choose the topic for your workshop"),
        value_type=schema.Choice(source=vocabCfPTopics),
        required=True,
    )

    wtalklength = schema.List(
        title=_(u"Planed Length"),
        description=_(u"Give an estimation about the time you'd plan for your workshop."),
        value_type=schema.Choice(source=vocabWorkshopLength),
        required=True,
    )
Exemple #19
0
class NewTalkSchema(interface.Interface):

    talktitle=schema.TextLine(
        title=_(u'The Title Of Your Talk'),
        description=_(u'Fill in the title of your proposed conference talk'),
    )

    talkdescription = schema.Text(
        title=_(u"Talk summary"),
    )

    talkdetails = RichText(
            title=_(u"Talk details"),
            required=True
        )

    cfp_topic = schema.List(
        title=_(u"Choose the topic for your talk"),
        value_type=schema.Choice(source=vocabCfPTopics),
        required=True,
    )

    ptalklength = schema.List(
        title=_(u"Planed Length"),
        description=_(u"Give an estimation about the time you'd plan for your talk."),
        value_type=schema.Choice(source=vocabTalkLength),
        required=True,
    )
    def handleApply(self, action):
        data, errors = self.extractData()
        captcha = getMultiAdapter(
            (aq_inner(self.context), self.request),
            name='recaptcha',
        )

        if errors:
            self.status = self.formErrorsMessage
            return

        elif captcha.verify():
            logger.info('ReCaptcha validation passed.')
        else:
            logger.info(
                'Please validate the recaptcha field before sending the form.',
            )
            api.portal.show_message(
                message=_(
                    safe_unicode('Please validate the recaptcha field '
                                 'before sending the form.')),
                request=self.request,
                type='error')
            return

        portal=api.portal.get()
        obj=api.content.create(
            type='collective.conferences.workshop',
            title=data['workshoptitle'],
            description=data['workshopdescription'],
            details=data['workshopdetails'],
            call_for_paper_topic=data['cfp_topic'],
            planedworkshoplength=data['wtalklength'],
            container=portal['workshops'],
        )

        api.portal.show_message(
            message=_(safe_unicode('The workshop has been submitted.')),
            request=self.request,
            type='info')

        contextURL = self.context.absolute_url()
        self.request.response.redirect(contextURL)
class IConference(model.Schema):

    title = schema.TextLine(title=_(u"Conference Title"), )

    description = schema.Text(title=_(u"Conference summary"), required=False)

    primary('details')
    details = RichText(
        title=_(u"Details"),
        description=_(u"Write information about the conference"),
        required=False,
    )

    break_length = schema.List(
        title=_(u"Length Of Conference Breaks"),
        description=
        _(u"Fill in the time slots for conference breaks in minutes. Use a new line for every "
          u"value / talk length. Write only the numbers without the addition 'minutes'."
          ),
        value_type=schema.TextLine(),
        required=True,
    )

    talk_length = schema.List(
        title=_(u"Length Of Talks"),
        description=
        _(u"Fill in the time slots for conference talks in minutes. Use a new line for every "
          u"value / talk length. Write only the numbers without the addition 'minutes'."
          ),
        value_type=schema.TextLine(),
        required=True,
    )

    workshop_length = schema.List(
        title=_(u"Length Of Workshops"),
        description=
        _(u"Fill in the time slots for workshops at the conference in minutes. Use a new line for every "
          u"value / workshop length. Write only the numbers without the addition 'minutes'."
          ),
        value_type=schema.TextLine(),
        required=True,
    )
Exemple #22
0
 def validateEndNotAfterProgram(data):
     if data.trackend is not None:
         catalog = api.portal.get_tool(name='portal_catalog')
         result = catalog.uniqueValuesFor('programend')
         trackend = DateTime(data.trackend).toZone('UTC')
         if DateTime(trackend) > DateTime(result[0]):
             raise EndAfterConferenceProgram(
                 _(
                     safe_unicode(
                         "The end date couldn't be set after the end of the conference program."
                     )))
Exemple #23
0
 def validateStartNotBeforeProgram(data):
     if data.trackstart is not None:
         catalog = api.portal.get_tool(name='portal_catalog')
         result = catalog.uniqueValuesFor('programstart')
         trackstart = DateTime(data.trackstart).toZone('UTC')
         if DateTime(trackstart) < DateTime(result[0]):
             raise StartBeforeConferenceProgram(
                 _(
                     safe_unicode(
                         'The start date could not be set before the begin of the conference program.'
                     )))
class ICallforpaper(model.Schema):
    """A call for paper for a conferences.
    A call for paper can contain incomming talks.
    """
    title = schema.TextLine(
        title=_(safe_unicode('Call for paper title')),
    )

    description = schema.Text(
        title=_(safe_unicode('Call for paper summary')),
        required=False,
    )

    primary('details')
    details = RichText(
        title=_(safe_unicode('Details')),
        description=_(safe_unicode('Details about the program')),
        required=True,
    )

    cfp_topics = schema.List(title=_(safe_unicode('Topics for the Call for Papers')),
                             description=_(
                                 safe_unicode('Fill in the topics for conference talks and workshops. '
                                              'Use a new line for every value / topic.')),
                             default=['Development',
                                      'Documentation',
                                      'Project-Administration'],
                             value_type=schema.TextLine(),
                             )
Exemple #25
0
    def validate(self, value):
        # Perform the standard validation first

        super(ValidateTrainingUniqueness, self).validate(value)
        if value is not None:
            catalog = api.portal.get_tool(name='portal_catalog')
            results = catalog({
                'Title': quote_chars(value),
                'object_provides': ITraining.__identifier__
            })
            contextUUID = api.content.get_uuid(self.context)
            for result in results:
                if result.UID != contextUUID:
                    raise Invalid(_(u'The training title is already in use.'))
Exemple #26
0
class ICallforpaper(model.Schema):
    """A call for paper for a conferences.
    A call for paper can contain incomming talks.
    """

    title = schema.TextLine(title=_(u"Call for paper title"), )

    description = schema.Text(
        title=_(u"Call for paper summary"),
        required=False,
    )

    primary('details')
    details = RichText(
        title=_(u"Details"),
        description=_(u"Details about the program"),
        required=True,
    )

    cfp_topics = schema.List(
        title=_(u"Topics for the Call for Papers"),
        default=['Development', 'Documentation', 'Project-Administration'],
        value_type=schema.TextLine())
Exemple #27
0
    def validate(self, value):
        # Perform the standard validation first

        super(ValidateWorkshopUniqueness, self).validate(value)
        if value is not None:
            catalog = api.portal.get_tool(name='portal_catalog')
            results = catalog({
                'Title':
                quote_chars(value),
                'portal_type': ('collective.conferences.workshop',
                                'collective.conferences.talk')
            })
            contextUUID = api.content.get_uuid(self.context)
            for result in results:
                if result.UID != contextUUID:
                    raise Invalid(_(u'The talk title is already in use.'))
Exemple #28
0
class IConferencebreak(model.Schema):

    title = schema.TextLine(
        title=_(u"Title"),
        description=_(u"Conference break title"),
    )

    description = schema.Text(title=_(u"Conference break summary"),
                              required=False)

    primary('details')
    details = RichText(title=_(u"Conference break details"), required=False)

    #    form.widget(track=AutocompleteFieldWidget)
    #    track = RelationChoice(
    #            title=_(u"Track"),
    #            source=ObjPathSourceBinder(object_provides=ITrack.__identifier__),
    #            required=False,
    #        )

    write_permission(startitem='collective.conferences.ModifyTalktime')
    startitem = schema.Datetime(
        title=_(u"Startdate"),
        description=_(u"Start date"),
        required=False,
    )

    write_permission(enditem='collective.conferences.ModifyTalktime')
    enditem = schema.Datetime(
        title=_(u"Enddate"),
        description=_(u"End date"),
        required=False,
    )

    directives.widget(breaklength=RadioFieldWidget)
    breaklength = schema.List(
        title=_(u"Length"),
        value_type=schema.Choice(source=vocabBreakLength),
        required=True,
    )
Exemple #29
0
class IProgram(model.Schema):
    """A conference program. Programs can contain Tracks.
    """

    title = schema.TextLine(title=_(safe_unicode('Program name')), )

    description = schema.Text(title=_(safe_unicode('Program summary')), )

    start = schema.Datetime(
        title=_(safe_unicode('Start date')),
        required=False,
        defaultFactory=startDefaultValue,
    )

    end = schema.Datetime(
        title=_(safe_unicode('End date')),
        required=False,
        defaultFactory=endDefaultValue,
    )

    primary('details')
    details = RichText(
        title=_(safe_unicode('Details')),
        description=_(safe_unicode('Details about the program')),
        required=False,
    )

    directives.widget(organizer=AjaxSelectFieldWidget)
    organizer = schema.Choice(
        title=_(safe_unicode('Organiser')),
        vocabulary=safe_unicode('plone.app.vocabularies.Users'),
        required=False,
    )

    @invariant
    def validateStartEnd(data):
        if data.start is not None and data.end is not None:
            if data.start > data.end:
                raise StartBeforeEnd(
                    _(
                        safe_unicode(
                            'The start date must be before the end date.')))
 def validateStartEnd(data):
     if data.start is not None and data.end is not None:
         if data.start > data.end:
             raise StartBeforeEnd(_(
                 u"The start date must be before the end date."))
def validateEmail(value):
    if not checkEmail(value):
        raise Invalid(_(safe_unicode('Invalid email address')))
    return True
def validateEmail(value):
    if not checkEmail(value):
        raise Invalid(_(u"Invalid email address"))
    return True