diff --git a/vc_zoom/README.md b/vc_zoom/README.md index de652aa..8ea4084 100644 --- a/vc_zoom/README.md +++ b/vc_zoom/README.md @@ -16,6 +16,7 @@ - Fix deleting Zoom meetings that were already deleted on the Zoom side when running outside a web request context (e.g. during scheduled deletion of events) - Fix overwriting co-hosts added via the Zoom client when using "make me co-host" in Indico - Always refresh data from Zoom before editing via Indico to avoid saving with stale data +- Add option to link to an external page with phone-in instructions ### 2.3b2 diff --git a/vc_zoom/indico_vc_zoom/plugin.py b/vc_zoom/indico_vc_zoom/plugin.py index b59cf4d..4929191 100644 --- a/vc_zoom/indico_vc_zoom/plugin.py +++ b/vc_zoom/indico_vc_zoom/plugin.py @@ -13,8 +13,9 @@ from requests.exceptions import HTTPError from sqlalchemy.orm.attributes import flag_modified from wtforms.fields import TextAreaField from wtforms.fields.core import BooleanField +from wtforms.fields.html5 import URLField from wtforms.fields.simple import StringField -from wtforms.validators import DataRequired, ValidationError +from wtforms.validators import DataRequired, Optional, URL, ValidationError from indico.core import signals from indico.core.auth import multipass @@ -45,7 +46,7 @@ class PluginSettingsForm(VCPluginSettingsFormBase): _fieldsets = [ (_('API Credentials'), ['api_key', 'api_secret', 'webhook_token']), (_('Zoom Account'), ['user_lookup_mode', 'email_domains', 'authenticators', 'enterprise_domain', - 'allow_webinars']), + 'allow_webinars', 'phone_link']), (_('Room Settings'), ['mute_audio', 'mute_host_video', 'mute_participant_video', 'join_before_host', 'waiting_room']), (_('Notifications'), ['creation_email_footer', 'send_host_url', 'notification_emails']), @@ -114,6 +115,9 @@ class PluginSettingsForm(VCPluginSettingsFormBase): description=_('Whether to send an e-mail with the Host URL to the meeting host upon ' 'creation of a meeting')) + phone_link = URLField(_('Join via phone'), [Optional(), URL()], + description=_('Link to the list of VidyoVoice phone numbers')) + def validate_authenticators(self, field): invalid = set(field.data) - set(multipass.identity_providers) if invalid: @@ -145,7 +149,8 @@ class ZoomPlugin(VCPluginMixin, IndicoPlugin): 'join_before_host': True, 'waiting_room': False, 'creation_email_footer': None, - 'send_host_url': False + 'send_host_url': False, + 'phone_link': '', }) def init(self): diff --git a/vc_zoom/indico_vc_zoom/templates/info_box.html b/vc_zoom/indico_vc_zoom/templates/info_box.html index 08ed536..6a8e671 100644 --- a/vc_zoom/indico_vc_zoom/templates/info_box.html +++ b/vc_zoom/indico_vc_zoom/templates/info_box.html @@ -1,6 +1,7 @@ {% from '_clipboard_input.html' import clipboard_input %} {% set host = vc_room.data.host %} {% set alt_hosts = vc_room.data.alternative_hosts %} +{% set phone_link = settings.get('phone_link') %}