Example #1
0
 def FIELD_DATA(cls):
     title_item = {
         'price': 0,
         'is_billable': False,
         'places_limit': 0,
         'is_enabled': True
     }
     return [
         (cls.title, {
             'title': 'Title',
             'input_type': 'single_choice',
             'data': {
                 'item_type':
                 'dropdown',
                 'with_extra_slots':
                 False,
                 'choices': [
                     dict(title_item, id=unicode(uuid4()), caption=t)
                     for t in TitlesRegistry.getList() if t
                 ]
             }
         }),
         (cls.first_name, {
             'title': 'First Name',
             'input_type': 'text'
         }),
         (cls.last_name, {
             'title': 'Last Name',
             'input_type': 'text'
         }),
         (cls.email, {
             'title': 'Email Address',
             'input_type': 'email'
         }),
         (cls.affiliation, {
             'title': 'Affiliation',
             'input_type': 'text'
         }),
         (cls.address, {
             'title': 'Address',
             'input_type': 'textarea',
             'is_enabled': False
         }),
         (cls.country, {
             'title': 'Country',
             'input_type': 'country',
             'is_enabled': False
         }),
         (cls.phone, {
             'title': 'Phone Number',
             'input_type': 'phone',
             'is_enabled': False
         }),
         (cls.position, {
             'title': 'Position',
             'input_type': 'text',
             'is_enabled': False
         }),
     ]
Example #2
0
 def FIELD_DATA(cls):
     title_item = {'price': 0,
                   'is_billable': False,
                   'places_limit': 0,
                   'is_enabled': True}
     return [
         (cls.title, {
             'title': 'Title',
             'input_type': 'single_choice',
             'data': {
                 'item_type': 'dropdown',
                 'with_extra_slots': False,
                 'choices': [dict(title_item, id=unicode(uuid4()), caption=t) for t in TitlesRegistry.getList() if t]
             }
         }),
         (cls.first_name, {
             'title': 'First Name',
             'input_type': 'text'
         }),
         (cls.last_name, {
             'title': 'Last Name',
             'input_type': 'text'
         }),
         (cls.email, {
             'title': 'Email Address',
             'input_type': 'email'
         }),
         (cls.affiliation, {
             'title': 'Affiliation',
             'input_type': 'text'
         }),
         (cls.address, {
             'title': 'Address',
             'input_type': 'textarea',
             'is_enabled': False
         }),
         (cls.country, {
             'title': 'Country',
             'input_type': 'country',
             'is_enabled': False
         }),
         (cls.phone, {
             'title': 'Phone Number',
             'input_type': 'phone',
             'is_enabled': False
         }),
         (cls.position, {
             'title': 'Position',
             'input_type': 'text',
             'is_enabled': False
         }),
     ]