diff --git a/pretalx_broadcast_tools/forms.py b/pretalx_broadcast_tools/forms.py index db3cd00..c849f46 100644 --- a/pretalx_broadcast_tools/forms.py +++ b/pretalx_broadcast_tools/forms.py @@ -22,6 +22,14 @@ class BroadcastToolsSettingsForm(I18nFormMixin, HierarkeyForm): required=False, widget=I18nTextInput, ) + broadcast_tools_room_info_feedback_instead_of_public = BooleanField( + help_text=_( + "If checked, the qr code shown on the 'room info' page will " + "link to the feedback page instead of the talk detail page." + ), + label=_("Show feedback QR code instead of talk detail QR code"), + required=False, + ) broadcast_tools_pdf_show_internal_notes = BooleanField( help_text=_( "If checked, the value of the 'internal notes' field in a " diff --git a/pretalx_broadcast_tools/static/pretalx_broadcast_tools/room_info.js b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/room_info.js index fd00913..625a364 100644 --- a/pretalx_broadcast_tools/static/pretalx_broadcast_tools/room_info.js +++ b/pretalx_broadcast_tools/static/pretalx_broadcast_tools/room_info.js @@ -41,9 +41,15 @@ function update_room_info() { current_talk = get_current_talk(15); if (current_talk) { + if (event_info['room-info']['qr_type'] == 'feedback') { + qr_info = '
Leave Feedback by scanning the code or visiting ' + current_talk['urls']['feedback'] + '
'; + } else { + qr_info = '' + current_talk['urls']['public'] + '
'; + } + $('#broadcast_tools_room_info_title').text(current_talk['title']); $('#broadcast_tools_room_info_speaker').text(current_talk['persons'].join(', ')); - $('#broadcast_tools_room_info_qr').html('Leave Feedback by scanning the code or visiting ' + current_talk['urls']['feedback'] + '
'); + $('#broadcast_tools_room_info_qr').html(qr_info); } else { $('#broadcast_tools_room_info_title').text(event_info['name']); $('#broadcast_tools_room_info_speaker').text(room_name); diff --git a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html index c75523e..7c1fb9b 100644 --- a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html +++ b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html @@ -59,6 +59,12 @@ hide itself. +