2016-06-02 12:47:01 +02:00
|
|
|
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(
|
2016-11-04 13:26:44 +01:00
|
|
|
name='users_sort_by',
|
2016-11-04 11:57:23 +01:00
|
|
|
default_value='first_name',
|
2016-11-04 13:26:44 +01:00
|
|
|
input_type='choice',
|
|
|
|
label='Sort name of participants by',
|
|
|
|
choices=(
|
2016-12-07 19:49:25 +01:00
|
|
|
{'value': 'first_name', 'display_name': 'Given name'},
|
|
|
|
{'value': 'last_name', 'display_name': 'Surname'}),
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=510,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2016-11-04 13:26:44 +01:00
|
|
|
subgroup='General')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
2017-11-21 10:32:31 +01:00
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_enable_presence_view',
|
|
|
|
default_value=False,
|
|
|
|
input_type='boolean',
|
|
|
|
label='Enable participant presence view',
|
|
|
|
weight=511,
|
|
|
|
group='Participants',
|
|
|
|
subgroup='General')
|
|
|
|
|
2016-06-02 12:47:01 +02:00
|
|
|
# PDF
|
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_welcometitle',
|
2016-06-28 10:05:52 +02:00
|
|
|
default_value='Welcome to OpenSlides',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='Title for access data and welcome PDF',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=520,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2017-08-22 14:17:20 +02:00
|
|
|
subgroup='PDF')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_welcometext',
|
2016-06-09 16:12:13 +02:00
|
|
|
default_value='[Place for your welcome and help text.]',
|
|
|
|
label='Help text for access data and welcome PDF',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=530,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2017-08-22 14:17:20 +02:00
|
|
|
subgroup='PDF')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
# TODO: Use Django's URLValidator here.
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_url',
|
|
|
|
default_value='http://example.com:8000',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='System URL',
|
|
|
|
help_text='Used for QRCode in PDF of access data.',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=540,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2016-06-09 16:12:13 +02:00
|
|
|
subgroup='PDF')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_wlan_ssid',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='WLAN name (SSID)',
|
|
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=550,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2016-06-09 16:12:13 +02:00
|
|
|
subgroup='PDF')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_wlan_password',
|
|
|
|
default_value='',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='WLAN password',
|
|
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=560,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2016-06-09 16:12:13 +02:00
|
|
|
subgroup='PDF')
|
2016-06-02 12:47:01 +02:00
|
|
|
|
|
|
|
yield ConfigVariable(
|
|
|
|
name='users_pdf_wlan_encryption',
|
|
|
|
default_value='',
|
|
|
|
input_type='choice',
|
2016-06-09 16:12:13 +02:00
|
|
|
label='WLAN encryption',
|
|
|
|
help_text='Used for WLAN QRCode in PDF of access data.',
|
2016-06-02 12:47:01 +02:00
|
|
|
choices=(
|
|
|
|
{'value': '', 'display_name': '---------'},
|
2016-06-09 16:12:13 +02:00
|
|
|
{'value': 'WEP', 'display_name': 'WEP'},
|
|
|
|
{'value': 'WPA', 'display_name': 'WPA/WPA2'},
|
|
|
|
{'value': 'nopass', 'display_name': 'No encryption'}),
|
2016-06-02 12:47:01 +02:00
|
|
|
weight=570,
|
2016-06-28 10:05:52 +02:00
|
|
|
group='Participants',
|
2016-06-09 16:12:13 +02:00
|
|
|
subgroup='PDF')
|