Пример #1
0
class ArtAdvisorForm(MultipleFormField):
    fields = [
        StringField("lastName", "Last Name"),
        StringField("firstName", "First Name"),
        StringField("origName", "Name in orig. Language"),
        ConfigChoiceField('title', 'Title', 'Title'),
        ConfigChoiceField('gender', 'Gender', 'Gender'),
        StringField("company", "Company"),
        PlainHeadingField("Contact", tag="h5", classes="controls"),
        EmailField("email", "Email"),
        URLField("facebook", "Facebook", input_classes='input-large'),
        URLField("linkedin", "Linked-in", input_classes='input-large')
    ]
Пример #2
0
class DirectorForm(MultipleFormField):
    fields = [
        ConfigChoiceField('position', 'Position', 'CollectionPosition'),
        StringField("lastName", "Last Name"),
        StringField("firstName", "First Name"),
        StringField("origName", "Name in orig. Language"),
        ConfigChoiceField('title', 'Title', 'Title'),
        ConfigChoiceField('gender', 'Gender', 'Gender'),
        PlainHeadingField("Contact", tag="h5", classes="controls"),
        EmailField("email", "Email"),
        URLField("facebook", "Facebook", input_classes='input-large'),
        URLField("linkedin", "Linked-in", input_classes='input-large'),
        HiddenField('id')
    ]
class SocietyMemberForm(MultipleFormField):
    fields = [
        StringField("societyName", "Name of society")
        , URLField("website", "Website")
        , ConfigTypeAheadField("position", "Position", "EngagementPosition")
        , StringField("year", "Year")
        , PlainHeadingField("Location", tag="h5", classes="controls")
        , TokenTypeAheadField('Country', 'Country', '/admin/search/address', 'AddressSearchResult', None)
        , TokenTypeAheadField('Region', 'Region', '/admin/search/address', 'AddressSearchResult', 'Country')
        , TokenTypeAheadField('City', 'City', '/admin/search/address', 'AddressSearchResult', 'Country Region')
        , StringField('postCode', 'Post Code')
        , StringField('line1', 'Street 1')
        , StringField('line2', 'Street 2')
        , StringField('line3', 'Street 3')
    ]
class MuseumForm(MultipleFormField):
    fields = [
        ConfigChoiceField("museum", "Top 100 Museum", "TopMuseum", attrs = HtmlAttrs(**{'data-custom-module':'views/museum'}),  input_classes="custom-control")
        , StringField("other_name", "Not Top 100 Museum, then name", label_classes='double')
        , ConfigTypeAheadField('position', 'Position', 'EngagementPosition')
        , StringField("year", "Year")
        , URLField("website", "Website")
        , PlainHeadingField("Location", tag="h5", classes="controls")
        , TokenTypeAheadField('Country', 'Country', '/admin/search/address', 'AddressSearchResult', None)
        , TokenTypeAheadField('Region', 'Region', '/admin/search/address', 'AddressSearchResult', 'Country')
        , TokenTypeAheadField('City', 'City', '/admin/search/address', 'AddressSearchResult', 'Country Region')
        , StringField('postCode', 'Post Code')
        , StringField('line1', 'Street 1')
        , StringField('line2', 'Street 2')
        , StringField('line3', 'Street 3')
    ]
class CompanyForm(MultipleFormField):
    """
        "name": "ESSO", "position": "CEO and Founder", "industry": "Automotive", "url": "http://esso.com", "city": "Berlin", "postCode": "BN3 1BA", "line1": "1 the av" },
    """
    fields = [
        StringField("name", "Name of company")
        , ConfigChoiceField("position", "Position", "Position")
        , ConfigChoiceField("industry", "Industry", "Industry")
        , URLField("url", "Link")
        , PlainHeadingField("Location", tag="span", classes = "heading-absolute")
        , TokenTypeAheadField('Country', 'Country', '/admin/search/address', 'AddressSearchResult', None)
        , TokenTypeAheadField('Region', 'Region', '/admin/search/address', 'AddressSearchResult', 'Country')
        , TokenTypeAheadField('City', 'City', '/admin/search/address', 'AddressSearchResult', 'Country Region')
        , StringField('postCode', 'Post Code')
        , StringField('line1', 'Street 1')
        , StringField('line2', 'Street 2')
        , StringField('line3', 'Street 3')
    ]
Пример #6
0
class MuseumForm(MultipleFormField):
    fields = [
        StringField("permanentSpace", "If yes, name"),
        StringField("year", "Founded in year"),
        StringField("url", "Website"),
        PlainHeadingField("Location", tag="h5", classes="controls"),
        TokenTypeAheadField('Country', 'Country', '/admin/search/address',
                            'AddressSearchResult', None),
        TokenTypeAheadField('Region', 'Region', '/admin/search/address',
                            'AddressSearchResult', 'Country'),
        TokenTypeAheadField('City', 'City', '/admin/search/address',
                            'AddressSearchResult', 'Country Region'),
        StringField('postCode', 'Post Code'),
        StringField('line1', 'Street 1'),
        StringField('line2', 'Street 2'),
        StringField('line3', 'Street 3'),
        StringField('telephone', 'Telephone')
    ]
Пример #7
0
class LoanForm(MultipleFormField):
    fields = [
        StringField("name", "What donated / on loan"),
        StringField("comment", "Comment"),
        StringField("year", "Year"),
        StringField("institution", "Name of institution"),
        URLField("website", "Website"),
        PlainHeadingField("Location", tag="h5", classes="controls"),
        TokenTypeAheadField('Country', 'Country', '/admin/search/address',
                            'AddressSearchResult', None),
        TokenTypeAheadField('Region', 'Region', '/admin/search/address',
                            'AddressSearchResult', 'Country'),
        TokenTypeAheadField('City', 'City', '/admin/search/address',
                            'AddressSearchResult', 'Country Region'),
        StringField('postCode', 'Post Code'),
        StringField('line1', 'Street 1'),
        StringField('line2', 'Street 2'),
        StringField('line3', 'Street 3')
    ]
Пример #8
0
class CooperationForm(MultipleFormField):
    fields = [
        ConfigTypeAheadField('type', "Type of Cooperation", "CooperationType"),
        StringField("comment",
                    "Name of cooperation / Comment",
                    label_classes="double"),
        StringField("year", "Year"),
        StringField("institution", "Name of institution"),
        URLField("website", "Website"),
        PlainHeadingField("Location", tag="h5", classes="controls"),
        TokenTypeAheadField('Country', 'Country', '/admin/search/address',
                            'AddressSearchResult', None),
        TokenTypeAheadField('Region', 'Region', '/admin/search/address',
                            'AddressSearchResult', 'Country'),
        TokenTypeAheadField('City', 'City', '/admin/search/address',
                            'AddressSearchResult', 'Country Region'),
        StringField('postCode', 'Post Code'),
        StringField('line1', 'Street 1'),
        StringField('line2', 'Street 2'),
        StringField('line3', 'Street 3')
    ]
    fields = [
        StringField('name', 'Name of University')
        , StringField('city', 'City')
    ]
collectorCreateFields = [
        StringField('firstName', 'First Name', REQUIRED)
        , StringField('lastName', 'Last Name', REQUIRED)
        , StringField('origName', 'Name in orig. Language')
        , ConfigChoiceField('title', 'Title', 'Title', IMPORTANT)
        , StringField('dob', 'Born', IMPORTANT)
        , ConfigChoiceField('gender', 'Gender', 'Gender', IMPORTANT)
        , ConfigChoiceField('nationality', 'Nationality', 'Nationality', IMPORTANT)
        , PictureUploadField('picture', 'Picture', attrs = PictureUploadAttrs())
        , AddressForm('Address', 'Location')
        , UniversityForm('University', classes = 'form-embedded-wrapper form-inline')
        , PlainHeadingField("Areas of Interest")
        , TagSearchField('Interest', "Interest", "/admin/search/interest", "Interest", api_allow_new = True, classes='tagsearch input-xxlarge')
    ]






class MultiEmailField(MultipleFormField):
    fields = [EmailField('address', 'Email', IMPORTANT, input_classes="input-xlarge")]
class NetworkField(MultipleFormField):
    fields = [ConfigChoiceField('name', None, 'Network', default_none = False), URLField('url', '', attrs = Placeholder("link"))]
collectorContactsFields = [
        URLField('wikipedia', 'Wikipedia', IMPORTANT, input_classes="input-xlarge")
        , MultiEmailField('Email', None)
Пример #10
0
baseCollectionFields = [
    ApproxField('totalWorks',
                'totalWorksAprx',
                "Total number of artworks in collection",
                IMPORTANT,
                label_classes="double"),
    ApproxField('totalArtists',
                'totalArtistsAprx',
                "Total number of artists in collection",
                IMPORTANT,
                label_classes="double"),
    StringField("name", "Name of collection", IMPORTANT),
    StringField("foundation", "Name of foundation"),
    IntField('started', "Started collecting in year"),
    PlainHeadingField("Themes in collection"),
    TagSearchField('Theme',
                   "Tags",
                   "/admin/search/theme",
                   "Theme",
                   api_allow_new=True,
                   classes='tagsearch input-xxlarge'),
    PlainHeadingField("Art Genre / Movement"),
    TagSearchField('Genre',
                   "Genre",
                   "/admin/search/genre",
                   "Genre",
                   api_allow_new=False,
                   classes='tagsearch input-xxlarge tagsearch-required',
                   group_classes='tagsearch-required'),
    PlainHeadingField("Medium of artworks"),