diff --git a/vc_zoom/README.md b/vc_zoom/README.md index de652aa..69577ce 100644 --- a/vc_zoom/README.md +++ b/vc_zoom/README.md @@ -16,6 +16,8 @@ - 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 +- Fix showing the zoom join link in the info box ### 2.3b2 diff --git a/vc_zoom/indico_vc_zoom/plugin.py b/vc_zoom/indico_vc_zoom/plugin.py index 817add5..bb249be 100644 --- a/vc_zoom/indico_vc_zoom/plugin.py +++ b/vc_zoom/indico_vc_zoom/plugin.py @@ -11,8 +11,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 @@ -43,7 +44,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']), @@ -112,6 +113,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: @@ -143,7 +147,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..d034908 100644 --- a/vc_zoom/indico_vc_zoom/templates/info_box.html +++ b/vc_zoom/indico_vc_zoom/templates/info_box.html @@ -1,6 +1,13 @@ {% 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') %} +{% set passcode_visible = ( + event_vc_room.data.password_visibility == 'everyone' or + event_vc_room.event.can_manage(session.user) or + (session.user and event_vc_room.data.password_visibility == 'logged_in') or + (session.user and event_vc_room.data.password_visibility == 'registered' and event_vc_room.event.is_user_registered(session.user)) +) %}
{% trans %}Zoom Meeting ID{% endtrans %}
{{ vc_room.data.zoom_id }}
@@ -24,17 +31,23 @@ {{ alt_hosts | map('decodeprincipal') | map(attribute='full_name') | join(', ') }} {% endif %} - {% if event_vc_room.data.password_visibility == 'everyone' or - event_vc_room.event.can_manage(session.user) or - (session.user and event_vc_room.data.password_visibility == 'logged_in') or - (session.user and event_vc_room.data.password_visibility == 'registered' and event_vc_room.event.is_user_registered(session.user)) %} + {% if passcode_visible %}
{% trans %}Passcode{% endtrans %}
{{ vc_room.data.password }}
{% endif %} - {% if event_vc_room.data.show_autojoin %} -
{% trans %}Zoom URL{% endtrans %}
-
- {{ clipboard_input(vc_room.data.url, name="vc-room-url-%s"|format(event_vc_room.id)) }} + {% if phone_link %} +
+ {% trans %}Useful links{% endtrans %} +
+
+ + {% trans %}Join via phone{% endtrans %} +
{% endif %} +
{% trans %}Zoom URL{% endtrans %}
+
+ {{ clipboard_input(vc_room.data.url if passcode_visible else vc_room.data.public_url, + name="vc-room-url-%s"|format(event_vc_room.id)) }} +