示例#1
0
class ICollection(model.Schema):

    model.fieldset('ownership',
                   label='Ownership',
                   fields=('attribution', 'external_description'))

    attribution = List(
        title=u'Citation and Attribution',
        description=u'',
        required=False,
        value_type=RichTextField(),
    )

    external_description = RichTextField(
        title=u'Full description:',
        description=u'Text describing access to the external landing page',
        required=False,
    )

    model.fieldset('categorization',
                   label='Categorization',
                   fields=('categories', ))

    categories = List(
        title=u'Scientific Categories',
        description=u'',
        unique=True,
        required=False,
        value_type=Choice(vocabulary='scientific_category_source'))

    BCCDataGenre = List(title=u'Data Genre',
                        description=u'',
                        unique=True,
                        required=False,
                        value_type=Choice(vocabulary='genre_source'))
示例#2
0
class ICpskinEventViewSettings(model.Schema):
    model.fieldset(
        'eventview',
        label=_(u'Event view'),
        fields=('image_banner', ),
    )

    model.fieldset(
        'eventview',
        label=_(u'Event view'),
        fields=('image_header', ),
    )

    image_banner = namedfile.NamedBlobImage(
        title=_(u'label_bannerimage', default=u'Banner image'),
        description=_(
            u'help_bannerimage',
            default=
            u'Image used as banner replacement when viewing this event.<br/>This image can be crop into banner format'
        ),
        required=False,
    )

    image_header = namedfile.NamedBlobImage(
        title=_(u'label_headerimage', default=u'Header image'),
        description=_(
            u'help_headerimage',
            default=
            u'Image used as header in the event.<br/>This image can be crop into banner_event or banner format if banner_event is not available.'
        ),
        required=False,
    )
示例#3
0
class IMinuta(model.Schema):
    """Modelagem do tipo de conteúdo Minuta: campos e widgets.
    """
    # Aba com dados de coteúdo extra
    model.fieldset('extra_texto',
                   label=u"Texto extra",
                   fields=['titulo_extra', 'texto_extra'])

    titulo_extra = schema.TextLine(title=u'Título do conteúdo extra',
                                   required=False,
                                   max_length=200)

    texto_extra = RichText(
        title=u"Texto de conteúdo extra. (Exemplo: Lei Original)",
        required=False,
    )

    # Aba com configurações de comentários
    model.fieldset('extra',
                   label=u"Comentários inline",
                   fields=['disableAnnotator', 'readOnlyAnnotator'])

    disableAnnotator = schema.Bool(
        title=u'Desativar avaliação',
        description=u'Desativa o sistema de comentários para esta minuta.',
        required=False,
        default=False)

    readOnlyAnnotator = schema.Bool(
        title=u'Finalizar avaliação',
        description=u'Habilita modo de leitura, suspendendo os comentários.',
        required=False,
        default=False)
示例#4
0
class IContattiVenue(IContatti):

    model.fieldset(
        "orari",
        label=_("orari_label", default="Orari di apertura"),
        fields=["orario_pubblico"],
    )

    model.fieldset(
        "contatti",
        label=_("contatti_label", default="Contatti"),
        fields=["telefono", "fax", "email", "pec", "web"],
    )
class IBiologieForm(model.Schema):

    biogefaehrdung = schema.Choice(
        title=
        u"Mit folgenden biologischen Gefährdungen ist diese Tätigkeit verbunden:",
        vocabulary=biogefahr,
        default=u"bakterien_pilze",
        required=True)

    model.fieldset('weitere-gefaehrdungen',
                   label=_(u"Weitere Gefährdungen"),
                   fields=['gefahrstoffe', 'mechanik'])

    gefahrstoffe = schema.List(
        title=u"Chemische Gefährdungen",
        description=
        u"Folgende Gefahrstoffe kommen bei dieser Tätigkeit zur Anwendung:",
        value_type=schema.Choice(vocabulary=dummy_gefahrstoffe),
        required=False)

    mechanik = schema.Bool(
        title=u"Mechanische Gefährdungen",
        description=
        u"(Beispiel: Arbeit mit spitzen oder scharfkantigen Gegenstände, Stosseinwirkung)",
        required=False)

    model.fieldset('weitere-anforderungen',
                   label=_(u"Weitere Anforderungen"),
                   fields=['schichtstaerke', 'stulpenlaenge'])

    #directives.widget('gefaehrdung', RadioFieldWidget)
    schichtstaerke = schema.Choice(
        title=u"Schichtstärke des Handschuhs",
        description=
        u"Je nach Tätigkeit spielt die Schichtstärke des Handschuhs eine Rolle bei der Frage wie\
                                          feinfühlig gearbeitet werden muss. Bitte wählen Sie hier die gewünschte Schichtstärke des Handschuhs.",
        vocabulary=vocab_schichtstaerke,
        default='alle',
        required=False)

    #directives.widget('gefaehrdung', RadioFieldWidget)
    stulpenlaenge = schema.Choice(
        title=u"Stulpenlänge des Handschuhs",
        description=
        u"Wenn bei der von Ihnen beschriebenen Tätigkeit die Länge der Stulpen ein Rolle spielt,\
                                          können Sie diese hier für Ihre Produktauswahl angeben.",
        vocabulary=vocab_stulpenlaenge,
        default='alle',
        required=False)
示例#6
0
class IArgomentiDocument(IArgomentiSchema):
    """ """

    model.fieldset(
        "correlati",
        label=_("correlati_label", default="Contenuti collegati"),
        fields=["correlato_in_evidenza"],
    )
    model.fieldset(
        "testata",
        label=_("testata_fieldset_label", default="Testata"),
        fields=["tassonomia_argomenti"],
    )
    form.order_after(correlato_in_evidenza="IRelatedItems.relatedItems")
    form.order_after(tassonomia_argomenti="IInfoTestata.mostra_navigazione")
示例#7
0
class IOpenGeverBase(model.Schema):
    """ IOpengeverBase contains title and description fields
    This is a schema interface, not a marker interface!
    """
    model.fieldset(
        u'common',
        label=_(u'fieldset_common', default=u'Common'),
        fields=[
            u'title',
            u'description',
            ],
        )

    dexteritytextindexer.searchable('title')
    title = schema.TextLine(
        title=_(u'label_title', default=u'Title'),
        required=True
        )

    dexteritytextindexer.searchable('description')
    description = schema.Text(
        title=_(u'label_description', default=u'Description'),
        required=False,
        missing_value=u'',
        default=u'',
        )
示例#8
0
class IDocumentSchema(model.Schema):
    """Document Schema Interface."""

    model.fieldset(
        u'common',
        label=_(u'fieldset_common', u'Common'),
        fields=[
            u'title',
            u'file',
        ],
    )

    dexteritytextindexer.searchable('title')
    form.order_before(title='IDocumentMetadata.description')
    title = schema.TextLine(title=_(u'label_title', default=u'Title'),
                            required=False)

    model.primary('file')
    form.order_after(file='IDocumentMetadata.document_author')
    file = field.NamedBlobFile(
        title=_(u'label_file', default='File'),
        description=_(u'help_file', default=''),
        required=False,
    )

    @invariant
    def title_or_file_required(data):
        if not data.title and not data.file:
            raise Invalid(
                _(u'error_title_or_file_required',
                  default=u'Either the title or the file is '
                  'required.'))
class IRepositoryRoot(model.Schema):
    """ Repository root marker / schema interface
    """

    model.fieldset(
        u'common',
        label=bmf(u'fieldset_common', default=u'Common'),
        fields=[
            'valid_from',
            'valid_until',
            'version',
        ],
    )

    valid_from = schema.Date(
        title=_(u'label_valid_from', default=u'Valid from'),
        required=False,
    )

    valid_until = schema.Date(
        title=_(u'label_valid_until', default=u'Valid until'),
        required=False,
    )

    version = schema.TextLine(
        title=_(u'label_version', default=u'Version'),
        required=False,
    )
class IGeolocatableUnitaOrganizzativa(IGeolocatable):

    model.fieldset(
        "contatti",
        label=_("contatti_label", default="Contatti"),
        fields=["geolocation"],
    )
class IExcludeFromNavigation(model.Schema):
    """Behavior interface to exclude items from navigation.
    """

    model.fieldset(
        'settings',
        label=_(u"Settings"),
        fields=['exclude_from_nav']
    )

    exclude_from_nav = schema.Bool(
        title=_(
            u'label_exclude_from_nav',
            default=u'Exclude from navigation'
        ),
        description=_(
            u'help_exclude_from_nav',
            default=u'If selected, this item will not appear in the ' +
                    u'navigation tree'
        ),
        default=False
    )

    form.omitted('exclude_from_nav')
    form.no_omit(IEditForm, 'exclude_from_nav')
    form.no_omit(IAddForm, 'exclude_from_nav')
示例#12
0
class IPublication(model.Schema):
    # dates fieldset
    model.fieldset(
        'dates',
        label=_PMF(u'label_schema_dates', default=u'Dates'),
        fields=['effective', 'expires'],
    )

    effective = schema.Datetime(
        title=_PMF(u'label_effective_date', u'Publishing Date'),
        description=_PMF(
            u'help_effective_date',
            default=u"If this date is in the future, the content will "
            "not show up in listings and searches until this date."),
        required=False)

    expires = schema.Datetime(
        title=_PMF(u'label_expiration_date', u'Expiration Date'),
        description=_PMF(
            u'help_expiration_date',
            default=u"When this date is reached, the content will no"
            "longer be visible in listings and searches."),
        required=False)

    form.omitted('effective', 'expires')
    form.no_omit(IEditForm, 'effective', 'expires')
    form.no_omit(IAddForm, 'effective', 'expires')
示例#13
0
class IStruttureCorrelate(model.Schema):

    strutture_politiche = RelationList(
        title="Strutture politiche coinvolte",
        default=[],
        value_type=RelationChoice(
            title=_("Struttura politica coinvolta"),
            vocabulary="plone.app.vocabularies.Catalog",
        ),
        required=False,
        missing_value=(),
        description=_(
            "strutture_politiche_help",
            default="Seleziona la lista delle strutture politiche coinvolte.",
        ),
    )
    form.widget(
        "strutture_politiche",
        RelatedItemsFieldWidget,
        vocabulary="plone.app.vocabularies.Catalog",
        pattern_options={
            "maximumSelectionSize": 10,
            "selectableTypes": ["UnitaOrganizzativa"],
        },
    )

    model.fieldset(
        "informazioni",
        label=_("informazioni_label", default="Ulteriori informazioni"),
        fields=["strutture_politiche"],
    )
示例#14
0
class IBluechurchpage(model.Schema):
    """ Marker interface for Bluechurchpage
    """

    homepage = URI_bluechurch(
        title=_(u"Website"),
        description=_(u"e.g. www.abcjazzz.com"),
        required=False,
    )

    beteiligte = RelationList(
        title=_(u"Artists"),
        description=_(u"Beteiligte Artists, Veranstalter"),
        required=False,
        value_type=RelationChoice(
            vocabulary='plone.app.vocabularies.Catalog', ))
    widget('beteiligte',
           RelatedItemsFieldWidget,
           pattern_options={
               'selectableTypes': [
                   'dexterity.membrane.bluechurchmembraneprofile',
               ],
               'basePath': get_profiles_base_path,
           })
    model.fieldset('categorization', fields=[
        'beteiligte',
    ])

    model.load('bluechurchpage.xml')
示例#15
0
class IMusicMan(model.Schema):
    """ Add Music Man behavior """

    model.fieldset('musicman',
                   label=_(u"musicman / recommend"),
                   fields=[
                       'mmTitle',
                       'mmInfo',
                       'mmImage',
                       'mmAudio',
                   ])

    mmTitle = schema.TextLine(
        title=_(u"Music Man Title"),
        required=False,
    )

    mmInfo = schema.Text(
        title=_(u"Music Man Infomation"),
        required=False,
    )

    mmImage = NamedBlobImage(
        title=_(u"Music Man Image"),
        required=False,
    )

    mmAudio = NamedBlobFile(
        title=_(u"Music Man Audio"),
        description=_(u"Audio file format: *.mp3"),
        required=False,
    )
class IWFEffectiveRange(metadata.IPublication):
    """Workflow based publication and expiration
    """
    model.fieldset(
        'dates',
        label=_(u'label_schema_dates', default=u'Dates'),
        fields=['effective_transition', 'expires_transition'],
    )

    # form.order_after(effective_transition='IPublication.effective')
    effective_transition = schema.Choice(
        title=_(u'Publication Transition'),
        description=_(u'Required if a publishing date is set'),
        source=EffectiveTransitionSource(),
        required=False,
        default=None,
    )

    # form.order_after(expires_transition='IPublication.expires')
    expires_transition = schema.Choice(
        title=_(u'Expiration Transition'),
        description=_(u'Required if a expiration date is set'),
        source=ExpiresTransitionSource(),
        required=False,
        default=None,
    )

    form.omitted('effective_transition', 'expires_transition')
    form.no_omit(IEditForm, 'effective_transition', 'expires_transition')
    form.no_omit(IAddForm, 'effective_transition', 'expires_transition')
示例#17
0
class ICategorization(model.Schema):
    # categorization fieldset
    model.fieldset(
        'categorization',
        label=_PMF(u'label_schema_categorization', default=u'Categorization'),
        fields=['subjects', 'language'],
    )

    subjects = schema.Tuple(
        title=_PMF(u'label_tags', default=u'Tags'),
        description=_PMF(
            u'help_tags',
            default=
            u'Tags are commonly used for ad-hoc organization of content.'),
        value_type=schema.TextLine(),
        required=False,
        missing_value=(),
    )
    form.widget(subjects=TextLinesFieldWidget)

    language = schema.Choice(
        title=_PMF(u'label_language', default=u'Language'),
        vocabulary='plone.app.vocabularies.AvailableContentLanguages',
        required=False,
        missing_value='',
    )

    form.omitted('subjects', 'language')
    form.no_omit(IEditForm, 'subjects', 'language')
    form.no_omit(IAddForm, 'subjects', 'language')
class ILuoghiCorrelatiEvento(model.Schema):
    """
    Events have a differente fieldset for this field
    """

    luoghi_correlati = RelationList(
        title=_("luoghi_correlati_label", default="Luoghi correlati"),
        description=_(
            "luoghi_correlati_event_help",
            default="Seleziona una lista di luoghi citati. Se il luogo "
            "dell'evento non è presente sul sito, inserisci le sue "
            "informazioni nei campi seguenti.",
        ),
        default=[],
        value_type=RelationChoice(vocabulary="plone.app.vocabularies.Catalog"),
        required=False,
    )
    form.widget(
        "luoghi_correlati",
        RelatedItemsFieldWidget,
        vocabulary="plone.app.vocabularies.Catalog",
        pattern_options={
            "selectableTypes": ["Venue"],
            "maximumSelectionSize": 50,
        },
    )

    model.fieldset(
        "luogo",
        label=_("luogo_label", default="Luogo"),
        fields=["luoghi_correlati"],
    )
class IRootNavigationPortlet(model.Schema):
    
    model.fieldset(
        'navigation',
        label=_(u"Navigation"),
        fields=['portlet_nav_root', 'portlet_nav_root_title',
                'portlet_nav_topLevel',
        ]
    )
    
    portlet_nav_root = schema.Bool(
        title=_(
            u'label_portlet_nav_root',
            default=u'Navigation root'
        ),
        description=_(
            u"help_portlet_nav_root",
            default=u"Use as root of the navigation tree"
        ),
        required=False,
    )
    
    portlet_nav_root_title = schema.TextLine(
        title=_(
            u'label_portlet_nav_root_title',
            default=u'Navigation root title'
        ),
        description=_(
            u"help_portlet_nav_root_title",
            default=u"if selected, use this as title "
                     "of the navigation root, instead of content title"
        ),
        required=False,
    )
    
    portlet_nav_topLevel = schema.Int(
        title=_navigation(u"label_navigation_startlevel", default=u"Start level"),
        description=_navigation(u"help_navigation_start_level",
            default=u"An integer value that specifies the number of folder "
                     "levels below the site root that must be exceeded "
                     "before the navigation tree will display. 0 means "
                     "that the navigation tree should be displayed "
                     "everywhere including pages in the root of the site. "
                     "1 means the tree only shows up inside folders "
                     "located in the root and downwards, never showing "
                     "at the top level."),
        required=False,
    )
    
    directives.omitted(
        'portlet_nav_root', 'portlet_nav_root_title', 'portlet_nav_topLevel'
    )
    directives.no_omit(
        IEditForm, 'portlet_nav_root', 'portlet_nav_root_title',
        'portlet_nav_topLevel'
    )
    directives.no_omit(
        IEditForm, 'portlet_nav_root', 'portlet_nav_root_title',
        'portlet_nav_topLevel'
    )
示例#20
0
class ICpskinDirectoryViewSettings(model.Schema):
    model.fieldset(
        'directoryview',
        label=_(u'Directory view'),
        fields=(
            'taxonomy_category',
            'show_organization_images',
            'organization_image_scale',
        ),
    )

    taxonomy_category = schema.TextLine(
        title=_(u'Which taxonomy id should be use to display category'),
        description=_(u'Please write which taxonomy id should be used.'),
        default=u'',
        required=False,
    )

    show_organization_images = schema.Bool(
        title=_(u'Show organizations images'),
        description=
        _(u'Do you want to show images for organizations preview in directory ?'
          ),  # noqa
        required=False,
        default=False,
    )

    organization_image_scale = schema.Choice(
        title=_(
            u'Which image scale use for organizations preview in directory ?'
        ),  # noqa
        description=_(u'Please select the scale.'),
        required=False,
        default='mini',
        vocabulary=u'plone.app.vocabularies.ImagesScales')
示例#21
0
class IProductTilesViewSettingsBehavior(model.Schema):
    """Product tiles view settings behavior.

    This behavior is not applied to any content types by default. It can be
    used on folderish objects where product tiles view is enabled in order to
    configure product tiles view.
    """
    model.fieldset('settings',
                   fields=[
                       'product_tiles_view_columns',
                       'product_tiles_view_image_scale'
                   ])

    product_tiles_view_columns = schema.Int(
        title=_(u'product_tiles_view_columns_title',
                default=u'Product tiles view Columns'),
        description=_(
            u'product_tiles_view_columns_description',
            default=u'Number of columns shown in product tiles view'),
        required=False)

    product_tiles_view_image_scale = schema.Choice(
        title=_(u'product_tiles_view_image_scale_title',
                default=u'Product tiles image scale'),
        description=_(u'product_tiles_view_image_scale_description',
                      default=u'Image scale used for product tiles'),
        vocabulary='bda.plone.productshop.ImageScaleVocabulary',
        required=False)
示例#22
0
class IVersionable(model.Schema):
    """ Behavior for enabling CMFEditions's versioning for dexterity
    content types. Be shure to enable versioning in the plone types
    control-panel for your content type.
    """

    model.fieldset('settings',
                   label=_(u'Settings'),
                   fields=['versioning_enabled'])
    changeNote = schema.TextLine(
        title=_(u'label_change_note', default=u'Change Note'),
        description=_(
            u'help_change_note',
            default=u'Enter a comment that describes the changes you made. '
            u'If versioning is manual, you must set a change note '
            u'to create the new version.'),
        required=False)

    versioning_enabled = schema.Bool(
        title=_(u'label_versioning_enabled', default=u'Versioning enabled'),
        description=_(u'help_versioning_enabled',
                      default=u'Enable/disable versioning for this document.'),
        default=True,
        required=False)

    form.order_after(changeNote='*')
    form.omitted('changeNote')
    form.no_omit(IEditForm, 'changeNote')
    form.no_omit(IAddForm, 'changeNote')
class IGeolocatableEvent(IGeolocatable):

    model.fieldset(
        "luogo",
        label=_("luogo_label", default="Luogo"),
        fields=["geolocation"],
    )
示例#24
0
class ISyncSettings(model.Schema):
    """Configure content syncing."""

    model.fieldset(
        "collective.contentsync",
        label=_("Content Sync"),
        fields=[
            "sync_disabled",
            "sync_settings",
        ],
    )

    sync_disabled = schema.Bool(
        default=False,
        description=_(
            "When activated synchronization of sub content will stop at this "
            u"content item for all sync targets.", ),
        required=False,
        title=_("Exclude item from content sync"),
    )

    directives.widget(sync_settings=DataGridFieldFactory)
    sync_settings = schema.List(
        default=[],
        required=False,
        title=_("Sync Settings"),
        value_type=DictRow(title=_("Sync Setting"), schema=ISyncSettingRow),
    )
示例#25
0
class IPublication(model.Schema):
    # dates fieldset
    model.fieldset(
        'dates',
        label=_(u'label_schema_dates', default=u'Dates'),
        fields=['effective', 'expires'],
    )

    effective = schema.Datetime(
        title=_(u'label_effective_date', u'Publishing Date'),
        description=_(
            u'help_effective_date',
            default=u"If this date is in the future, the content will "
            u"not show up in listings and searches until this date."),
        required=False)
    directives.widget('effective', DatetimeFieldWidget)

    expires = schema.Datetime(
        title=_(u'label_expiration_date', u'Expiration Date'),
        description=_(u'help_expiration_date',
                      default=u"When this date is reached, the content will no"
                      u"longer be visible in listings and searches."),
        required=False)
    directives.widget('expires', DatetimeFieldWidget)

    @invariant
    def validate_start_end(data):
        if data.effective and data.expires and data.effective > data.expires:
            raise EffectiveAfterExpires(
                _("error_expiration_must_be_after_effective_date",
                  default=u"Expiration date must be after publishing date."))

    directives.omitted('effective', 'expires')
    directives.no_omit(IEditForm, 'effective', 'expires')
    directives.no_omit(IAddForm, 'effective', 'expires')
示例#26
0
class IRating(model.Schema):
    """ Interface for rate """

    model.fieldset(
        u"Rating field",
        label=_(u"Rating's field"),
        fields=[u"active_rating", u"max_rating"],
    )

    active_rating = schema.Bool(
        title=_(u"active_rating_title", default=u"Rating is active"),
        default=True,
        required=True,
    )

    max_rating = schema.Int(
        title=_(u"max_rating_title", default=u"Num of stars"),
        required=True,
        defaultFactory=default_stars,
    )

    def avg_rating():
        """ return avg of rating """

    def num_rating():
        """ return num of rating """

    def update_avg_rating():
        """ update avg rating on catalog """
示例#27
0
class IMemberSearchSchema(model.Schema):
    """Provide schema for member search."""

    model.fieldset(
        'extra',
        label=_(u'legend_member_search_criteria',
                default=u'User Search Criteria'),
        fields=['login', 'email', 'fullname']
    )

    login = schema.TextLine(
        title=_(u'label_name', default=u'Name'),
        description=_(
            u'help_search_name',
            default=u'Find users whose login name contain'),
        required=False,
    )
    email = schema.TextLine(
        title=_(u'label_email', default=u'E-mail'),
        description=_(
            u'help_search_email',
            default=u'Find users whose email address contain'),
        required=False,
    )
    fullname = schema.TextLine(
        title=_(u'label_fullname', default=u'Full Name'),
        description=_(
            u'help_search_fullname',
            default=u'Find users whose full names contain'),
        required=False,
    )
    # disabled: https://dev.plone.org/ticket/13862
    """
示例#28
0
class IDatasetCorrelati(model.Schema):

    dataset_correlati = RelationList(
        title=_("dataset_correlati_label", default="Dataset correlati"),
        description=_(
            "dataset_correlati_help",
            default="Seleziona una lista di schede dataset collegate a questo"
            " contenuto.",
        ),
        default=[],
        value_type=RelationChoice(vocabulary="plone.app.vocabularies.Catalog"),
        required=False,
    )
    form.widget(
        "dataset_correlati",
        RelatedItemsFieldWidget,
        vocabulary="plone.app.vocabularies.Catalog",
        pattern_options={
            "selectableTypes": ["Dataset"],
            "maximumSelectionSize": 50,
        },
    )

    model.fieldset(
        "correlati",
        label=_("correlati_label", default="Contenuti collegati"),
        fields=["dataset_correlati"],
    )
示例#29
0
class ICollectionFields(model.Schema):

    model.fieldset(
        'settings',
        label=_(u'Settings'),
        fields=[
            'order_by_id',
            'order_by_title',
            'show_person_areas',
        ],
    )

    order_by_id = schema.List(
        title=_(u"Order by id"),
        description=_(u"The content will show items with the listed ids first, and then sort by the default sort order.  One per line."),
        value_type=schema.TextLine(required=True),
        required=False,
    )

    order_by_title = schema.List(
        title=_(u"Order by Title"),
        description=_(u"The content will show items matching the specified regex patterns first, and then sort by the default sort order.  One per line."),
        value_type=schema.TextLine(required=True),
        required=False,
    )

    show_person_areas = schema.Bool(
        title=_(u"Show 'Areas of Expertise' for people in results."),
        description=_(u""),
        required=False,
    )
示例#30
0
class IAddTaskSchema(ITask):
    """Define a schema for adding tasks."""
    form.widget('responsible', KeywordFieldWidget, async=True)

    model.fieldset(
        u'additional',
        fields=[u'tasktemplate_position'],
    )

    form.widget(
        'responsible',
        KeywordFieldWidget,
        async=True,
        template_selection='usersAndGroups',
        template_result='usersAndGroups',
    )

    responsible = schema.List(
        title=_(u"label_responsible", default=u"Responsible"),
        description=_(u"help_responsible", default=""),
        value_type=schema.Choice(
            source=AllUsersInboxesAndTeamsSourceBinder(include_teams=True),
            ),
        required=True,
        missing_value=[],
        default=[]
        )

    tasktemplate_position = schema.Int(
        title=_(u"label_tasktemplate_position",
                default=u"Tasktemplate Position"),
        required=False,
    )