5b544ceed2
* Add is_present field for csv import of users. * Refactor JS functions get_full_name and get_short_name (Fixes #2136). - Show participant number in get_full_name() output. - Sort users by first or last name. - Extend config option to sort users. - Mark unused Python methods get_short_name and get_full_name.
86 lines
2.6 KiB
Python
86 lines
2.6 KiB
Python
from openslides.core.config import ConfigVariable
|
|
|
|
|
|
def get_config_variables():
|
|
"""
|
|
Generator which yields all config variables of this app.
|
|
|
|
They are grouped in 'Sorting' and 'PDF'. The generator has to be evaluated
|
|
during app loading (see apps.py).
|
|
"""
|
|
# Sorting
|
|
yield ConfigVariable(
|
|
name='users_sort_by',
|
|
default_value='firstName',
|
|
input_type='choice',
|
|
label='Sort name of participants by',
|
|
choices=(
|
|
{'value': 'firstName', 'display_name': 'First name'},
|
|
{'value': 'lastName', 'display_name': 'Last name'}),
|
|
weight=510,
|
|
group='Participants',
|
|
subgroup='General')
|
|
|
|
# PDF
|
|
|
|
yield ConfigVariable(
|
|
name='users_pdf_welcometitle',
|
|
default_value='Welcome to OpenSlides',
|
|
label='Title for access data and welcome PDF',
|
|
weight=520,
|
|
group='Participants',
|
|
subgroup='PDF',
|
|
translatable=True)
|
|
|
|
yield ConfigVariable(
|
|
name='users_pdf_welcometext',
|
|
default_value='[Place for your welcome and help text.]',
|
|
label='Help text for access data and welcome PDF',
|
|
weight=530,
|
|
group='Participants',
|
|
subgroup='PDF',
|
|
translatable=True)
|
|
|
|
# TODO: Use Django's URLValidator here.
|
|
yield ConfigVariable(
|
|
name='users_pdf_url',
|
|
default_value='http://example.com:8000',
|
|
label='System URL',
|
|
help_text='Used for QRCode in PDF of access data.',
|
|
weight=540,
|
|
group='Participants',
|
|
subgroup='PDF')
|
|
|
|
yield ConfigVariable(
|
|
name='users_pdf_wlan_ssid',
|
|
default_value='',
|
|
label='WLAN name (SSID)',
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
|
weight=550,
|
|
group='Participants',
|
|
subgroup='PDF')
|
|
|
|
yield ConfigVariable(
|
|
name='users_pdf_wlan_password',
|
|
default_value='',
|
|
label='WLAN password',
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
|
weight=560,
|
|
group='Participants',
|
|
subgroup='PDF')
|
|
|
|
yield ConfigVariable(
|
|
name='users_pdf_wlan_encryption',
|
|
default_value='',
|
|
input_type='choice',
|
|
label='WLAN encryption',
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
|
choices=(
|
|
{'value': '', 'display_name': '---------'},
|
|
{'value': 'WEP', 'display_name': 'WEP'},
|
|
{'value': 'WPA', 'display_name': 'WPA/WPA2'},
|
|
{'value': 'nopass', 'display_name': 'No encryption'}),
|
|
weight=570,
|
|
group='Participants',
|
|
subgroup='PDF')
|