Exemple #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')
    ]
Exemple #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 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')
    ]
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')
    ]
Exemple #5
0
class SingleSourceForm(MultipleFormField):
    fields = [
        ConfigChoiceField('type',
                          None,
                          'SourceType',
                          attrs=Placeholder('Source type')),
        StringField('url',
                    None,
                    input_classes='input-xxlarge',
                    attrs=DependentAttrs(
                        'Internet / Blog / Online Mag url',
                        dependency='type',
                        dependencyValue='Internet/Blogs/Online Mag')),
        StringField('title',
                    None,
                    attrs=DependentAttrs(
                        'Book title/Newspaper name',
                        dependency='type',
                        dependencyValue='Book Magazine Newspaper')),
        StringField('publisher',
                    None,
                    attrs=DependentAttrs('Publisher',
                                         dependency='type',
                                         dependencyValue='Book')),
        StringField('author',
                    None,
                    attrs=DependentAttrs('Author',
                                         dependency='type',
                                         dependencyValue='Book')),
        StringField('year',
                    None,
                    input_classes="input-mini",
                    attrs=DependentAttrs('Year published',
                                         dependency='type',
                                         dependencyValue='Book')),
        StringField('name',
                    None,
                    attrs=DependentAttrs(
                        'Article title',
                        dependency='type',
                        dependencyValue='Newspaper Magazine')),
        StringField('date',
                    None,
                    attrs=DependentAttrs('Date / Volume',
                                         dependency='type',
                                         dependencyValue='Newspaper Magazine'))
    ]
class NetworkField(MultipleFormField):
    fields = [ConfigChoiceField('name', None, 'Network', default_none = False), URLField('url', '', attrs = Placeholder("link"))]
class ArtFairForm(MultipleFormField):
    fields = [
        ConfigTypeAheadField("name", "Art Fair", "ArtFair")
        , ConfigChoiceField("position", "Position", 'ArtFairPosition')
        , ConfigChoiceField("year", "Year", "RankingYear")
    ]
class RankingForm(MultipleFormField):
    fields = [
        ConfigChoiceField("name", "Ranking", "Ranking")
        , ConfigChoiceField("year", "Year", "RankingYear")
    ]
        , TokenTypeAheadField('City', 'City', '/admin/search/address', 'AddressSearchResult', 'Country Region', REQUIRED)
        , StringField('postCode', 'Post Code')
        , StringField('line1', 'Street 1')
        , StringField('line2', 'Street 2')
        , StringField('line3', 'Street 3')
    ]
class UniversityForm(MultipleFormField):
    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')
    ]