Skip to main content

User token widget

Project description

Introduction

Select2 integration for Plone and z3c.form

Example:

from zope import schema
from zope.interface import Interface
from .field import Select2MultiField
from .field import Select2Field

class ISchema(Interface):

    users = Select2MultiField(
        title=u"Users",
        value_type=schema.Choice(
            title=u"User ID",
            source="plone.app.vocabularies.Users"
        ),
        search_view=lambda x: '{}/select2-users-search'.format(x),
        required=True
    )

    user = Select2Field(
        title=u"Single User",
        source="plone.app.vocabularies.Users",
        search_view=lambda x: '{}/select2-users-search'.format(x),
        required=True
    )

    categories = Select2MultiField(
        title=u"Categories",
        value_type=schema.TextLine(
            title=u"Category"
        ),
        search_view=lambda x: '{}/select2-subjects-search'.format(x),
        required=False
    )

Contributors

  • Giorgio Borelli [gborelli], Original Author

Changelog

1.0b (2014-05-14)

  • Register categories and users search views to INavigationRoot [gborelli]

  • Add specific fields for single and multiple selection widgets [gborelli]

  • Improved IUserTokenInputWidget and UserSearch view [gborelli]

  • Package created using templer [gborelli]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.select2-1.0b.zip (52.3 kB view details)

Uploaded Source

File details

Details for the file collective.select2-1.0b.zip.

File metadata

File hashes

Hashes for collective.select2-1.0b.zip
Algorithm Hash digest
SHA256 924167dfb974cb01e22cfd65c4787d27db04c9aba5402275cd1601194a1953f9
MD5 0df5d068d0752723a887720f932aee36
BLAKE2b-256 c03dbfd7493f2a274593e0fc36772b75751dc35fc82cd0d8d6c6bac36f83ad58

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page