diff --git a/amd/build/form.min.js b/amd/build/form.min.js
index 0e6103e6..d2333e7e 100644
--- a/amd/build/form.min.js
+++ b/amd/build/form.min.js
@@ -6,6 +6,6 @@
* @author Kubilay Agi
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-define("mod_zoom/form",["jquery","core/form-autocomplete","core/str","core/notification"],(function($,autocomplete,str,notification){var SELECTORS_REPEAT_SELECT='select[name="recurrence_type"]',SELECTORS_REPEAT_INTERVAL=".repeat_interval",SELECTORS_REPEAT_INTERVAL_DAILY="#interval_daily",SELECTORS_REPEAT_INTERVAL_WEEKLY="#interval_weekly",SELECTORS_REPEAT_INTERVAL_MONTHLY="#interval_monthly",SELECTORS_REPEAT_INTERVAL_OPTIONS='select[name="repeat_interval"] option',SELECTORS_START_TIME='select[name*="start_time"]',SELECTORS_DURATION='*[name*="duration"]',SELECTORS_RECURRING='input[name="recurring"][type!="hidden"]',SELECTORS_OPTION_JBH='input[name="option_jbh"][type!="hidden"]',SELECTORS_OPTION_WAITING_ROOM='input[name="option_waiting_room"][type!="hidden"]',REPEAT_OPTIONS_REPEAT_OPTION_NONE=0,REPEAT_OPTIONS_REPEAT_OPTION_DAILY=1,REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY=2,REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY=3,REPEAT_MAX_OPTIONS_REPEAT_OPTION_WEEKLY=12,REPEAT_MAX_OPTIONS_REPEAT_OPTION_MONTHLY=3,toggleStartTimeDuration=function(){var disabled=!1,repeatVal=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);$(SELECTORS_RECURRING).prop("checked")&&repeatVal===REPEAT_OPTIONS_REPEAT_OPTION_NONE&&(disabled=!0),$(SELECTORS_START_TIME).prop("disabled",disabled),$(SELECTORS_DURATION).prop("disabled",disabled)},toggleRepeatIntervalText=function(){$(SELECTORS_REPEAT_INTERVAL).hide();var repeatSelectVal=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_DAILY?$(SELECTORS_REPEAT_INTERVAL_DAILY).show():repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY?$(SELECTORS_REPEAT_INTERVAL_WEEKLY).show():repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY&&$(SELECTORS_REPEAT_INTERVAL_MONTHLY).show()},limitRepeatValues=function(){var selectedValue=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);$(SELECTORS_REPEAT_INTERVAL_OPTIONS).each((function(){selectedValue===REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY?this.value>REPEAT_MAX_OPTIONS_REPEAT_OPTION_WEEKLY&&$(this).hide():selectedValue===REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY?this.value>REPEAT_MAX_OPTIONS_REPEAT_OPTION_MONTHLY&&$(this).hide():$(this).show()}))},TabsComponent=function(tabsColumn,tabsContentColumn,initialTabsCount,emptyAlert){this.tabsColumn=tabsColumn,this.tabsContentColumn=tabsContentColumn,this.emptyAlert=emptyAlert,this.countTabs=initialTabsCount,this.buildTab=function(item){var tab=item.tab.element,tabLink=$(".nav-link",tab);return tab.attr("id","tab-"+this.countTabs),$(".tab-name",tabLink).text(item.tab.name),tabLink.attr("href","#link"+this.countTabs),$("li a",this.tabsColumn).removeClass("active"),tabLink.addClass("active"),tab},this.buildTabContent=function(item){var tabContent=item.tabContent.element;return tabContent.attr("id","link"+this.countTabs),$(".tab-pane",this.tabsContentColumn).removeClass("active"),tabContent.addClass("active"),tabContent},this.addTab=function(item){var tab=this.buildTab(item),tabContent=this.buildTabContent(item);return this.emptyAlert.addClass("hidden"),$("ul",this.tabsColumn).append(tab),$(".tab-content",this.tabsContentColumn).append(tabContent),{element:tab,content:tabContent}},this.deleteTab=function(item){var tab=item,tabContent=$($("a",tab).attr("href"));(tab.remove(),tabContent.remove(),$("li",this.tabsColumn).length)?$("li a.active",this.tabsColumn).length||$("li:first-child a",this.tabsColumn).trigger("click"):this.emptyAlert.removeClass("hidden")}},BreakoutroomsEditor=function(){this.roomsListColumn=$("#meeting-rooms-list"),this.roomsList=$("ul",this.roomsListColumn),this.addBtn=$("#add-room",this.roomsListColumn),this.emptyAlert=$(".empty-alert",this.roomsListColumn),this.deleteBtn=$(".delete-room",this.roomsListColumn),this.roomsDataColumn=$("#meeting-rooms-data"),this.roomItemToClone=$("#rooms-list-item").html(),this.roomItemDataToClone=$("#rooms-list-item-data").html(),this.initialRoomsCount=parseInt(this.roomsListColumn.attr("data-initial-rooms-count")),this.tabsComponent=new TabsComponent(this.roomsListColumn,this.roomsDataColumn,this.initialRoomsCount,this.emptyAlert),this.init=function(){str.get_strings([{key:"room",component:"zoom"}]).then().fail(notification.exception),this.addRoomEvent(),this.deleteRoomEvent(),$("li",this.roomsListColumn).length?(this.changeRoomNameEvent(),this.buildAutocompleteComponents()):this.emptyAlert.removeClass("hidden")},this.addRoomEvent=function(){var thisObject=this;thisObject.addBtn.click((function(){thisObject.tabsComponent.countTabs++;var newRoomName=M.util.get_string("room","zoom")+" "+thisObject.tabsComponent.countTabs,newRoomElement=$(thisObject.roomItemToClone),newRoomDataElement=$(thisObject.roomItemDataToClone),newRoomIndex=thisObject.tabsComponent.countTabs,roomNameInputId="room-name-"+newRoomIndex;$("input[type=text]",newRoomDataElement).prev().attr("for",roomNameInputId),$("input[type=text]",newRoomDataElement).attr("id",roomNameInputId),$("input[type=text]",newRoomDataElement).attr("name",roomNameInputId),$("input[type=text]",newRoomDataElement).val(newRoomName),$("input[type=text]",newRoomDataElement).next().attr("name","rooms["+newRoomIndex+"]"),$("input[type=text]",newRoomDataElement).next().val(newRoomName);var roomParticipantsSelectId="participants-"+newRoomIndex;$(".room-participants",newRoomDataElement).attr("id",roomParticipantsSelectId),$(".room-participants",newRoomDataElement).attr("name","roomsparticipants["+newRoomIndex+"][]");var roomGroupsSelectId="groups-"+newRoomIndex;$(".room-groups",newRoomDataElement).attr("id",roomGroupsSelectId),$(".room-groups",newRoomDataElement).attr("name","roomsgroups["+newRoomIndex+"][]");var newRoom={tab:{name:newRoomName,element:newRoomElement},tabContent:{element:newRoomDataElement}},addedTab=thisObject.tabsComponent.addTab(newRoom);$("li:last .delete-room",thisObject.roomsList).click((function(){var thisItem=$(this).closest("li");thisObject.tabsComponent.deleteTab(thisItem)})),$("input[type=text]",addedTab.content).on("change keyup paste",(function(){var newHiddenValue=this.value;$(this).next().val(newHiddenValue),$(".tab-name",addedTab.element).text(this.value)})),thisObject.buildAutocompleteComponent(roomParticipantsSelectId,"addparticipant"),thisObject.buildAutocompleteComponent(roomGroupsSelectId,"addparticipantgroup")}))},this.deleteRoomEvent=function(){var thisObject=this;thisObject.deleteBtn.click((function(){var thisItem=$(this).closest("li");thisObject.tabsComponent.deleteTab(thisItem)}))},this.changeRoomNameEvent=function(){var thisObject=this;$("li",this.roomsListColumn).each((function(){var tabIndex=$(this).attr("id").split("-")[1];$('input[name="room-name-'+tabIndex+'"]',thisObject.roomsDataColumn).on("change keyup paste",(function(){var newHiddenValue=this.value;$(this).next().val(newHiddenValue),$("#tab-"+tabIndex+" .tab-name").text(this.value)}))}))},this.buildAutocompleteComponents=function(){var thisObject=this;$(".room-participants",thisObject.roomsDataColumn).each((function(){var thisItemId=$(this).attr("id");thisObject.buildAutocompleteComponent(thisItemId,"addparticipant")})),$(".room-groups",thisObject.roomsDataColumn).each((function(){var thisItemId=$(this).attr("id");thisObject.buildAutocompleteComponent(thisItemId,"addparticipantgroup")}))},this.buildAutocompleteComponent=function(id,placeholder){var stringkeys=[{key:placeholder,component:"zoom"},{key:"selectionarea",component:"zoom"}];str.get_strings(stringkeys).then((function(langstrings){var placeholderString=langstrings[0],noSelectionString=langstrings[1];return autocomplete.enhance("#"+id,!1,"",placeholderString,!1,!0,noSelectionString,!0),null})).fail(notification.exception)}};return{init:function(){var optionJoinBeforeHost=$(SELECTORS_OPTION_JBH),optionWaitingRoom=$(SELECTORS_OPTION_WAITING_ROOM);optionJoinBeforeHost.change((function(){!0===optionJoinBeforeHost.is(":checked")&&optionWaitingRoom.prop("checked",!1)})),optionWaitingRoom.change((function(){!0===optionWaitingRoom.is(":checked")&&optionJoinBeforeHost.prop("checked",!1)})),toggleStartTimeDuration(),toggleRepeatIntervalText(),limitRepeatValues(),$(SELECTORS_REPEAT_SELECT).change((function(){toggleStartTimeDuration(),toggleRepeatIntervalText(),limitRepeatValues()})),$(SELECTORS_RECURRING).change((function(){toggleStartTimeDuration()})),(new BreakoutroomsEditor).init()}}}));
+define("mod_zoom/form",["jquery","core/form-autocomplete","core/str","core/notification"],(function($,autocomplete,str,notification){var SELECTORS_REPEAT_SELECT='select[name="recurrence_type"]',SELECTORS_REPEAT_INTERVAL=".repeat_interval",SELECTORS_REPEAT_INTERVAL_DAILY="#interval_daily",SELECTORS_REPEAT_INTERVAL_WEEKLY="#interval_weekly",SELECTORS_REPEAT_INTERVAL_MONTHLY="#interval_monthly",SELECTORS_REPEAT_INTERVAL_OPTIONS='select[name="repeat_interval"] option',SELECTORS_START_TIME='select[name*="start_time"]',SELECTORS_DURATION='*[name*="duration"]',SELECTORS_RECURRING='input[name="recurring"][type!="hidden"]',SELECTORS_OPTION_JBH='input[name="option_jbh"][type!="hidden"]',SELECTORS_OPTION_WAITING_ROOM='input[name="option_waiting_room"][type!="hidden"]',REPEAT_OPTIONS_REPEAT_OPTION_NONE=0,REPEAT_OPTIONS_REPEAT_OPTION_DAILY=1,REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY=2,REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY=3,REPEAT_MAX_OPTIONS_REPEAT_OPTION_WEEKLY=12,REPEAT_MAX_OPTIONS_REPEAT_OPTION_MONTHLY=3,toggleStartTimeDuration=function(){var disabled=!1,repeatVal=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);$(SELECTORS_RECURRING).prop("checked")&&repeatVal===REPEAT_OPTIONS_REPEAT_OPTION_NONE&&(disabled=!0),$(SELECTORS_START_TIME).prop("disabled",disabled),$(SELECTORS_DURATION).prop("disabled",disabled)},toggleRepeatIntervalText=function(){$(SELECTORS_REPEAT_INTERVAL).hide();var repeatSelectVal=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_DAILY?$(SELECTORS_REPEAT_INTERVAL_DAILY).show():repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY?$(SELECTORS_REPEAT_INTERVAL_WEEKLY).show():repeatSelectVal===REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY&&$(SELECTORS_REPEAT_INTERVAL_MONTHLY).show()},limitRepeatValues=function(){var selectedValue=parseInt($(SELECTORS_REPEAT_SELECT).val(),10);$(SELECTORS_REPEAT_INTERVAL_OPTIONS).each((function(){selectedValue===REPEAT_OPTIONS_REPEAT_OPTION_WEEKLY?this.value>REPEAT_MAX_OPTIONS_REPEAT_OPTION_WEEKLY&&$(this).hide():selectedValue===REPEAT_OPTIONS_REPEAT_OPTION_MONTHLY?this.value>REPEAT_MAX_OPTIONS_REPEAT_OPTION_MONTHLY&&$(this).hide():$(this).show()}))},TabsComponent=function(tabsColumn,tabsContentColumn,initialTabsCount,emptyAlert){this.tabsColumn=tabsColumn,this.tabsContentColumn=tabsContentColumn,this.emptyAlert=emptyAlert,this.countTabs=initialTabsCount,this.buildTab=function(item){var tab=item.tab.element,tabLink=$(".nav-link",tab);return tab.attr("id","tab-"+this.countTabs),$(".tab-name",tabLink).text(item.tab.name),tabLink.attr("href","#link"+this.countTabs),$("li a",this.tabsColumn).removeClass("active"),tabLink.addClass("active"),tab},this.buildTabContent=function(item){var tabContent=item.tabContent.element;return tabContent.attr("id","link"+this.countTabs),$(".tab-pane",this.tabsContentColumn).removeClass("active"),tabContent.addClass("active"),tabContent},this.addTab=function(item){var tab=this.buildTab(item),tabContent=this.buildTabContent(item);return this.emptyAlert.addClass("hidden"),$("ul",this.tabsColumn).append(tab),$(".tab-content",this.tabsContentColumn).append(tabContent),{element:tab,content:tabContent}},this.deleteTab=function(item){var tab=item,tabContent=$($("a",tab).attr("href"));(tab.remove(),tabContent.remove(),$("li",this.tabsColumn).length)?$("li a.active",this.tabsColumn).length||$("li:first-child a",this.tabsColumn).trigger("click"):this.emptyAlert.removeClass("hidden")}},BreakoutroomsEditor=function(){this.roomsListColumn=$("#meeting-rooms-list"),this.roomsList=$("ul",this.roomsListColumn),this.addBtn=$("#add-room",this.roomsListColumn),this.emptyAlert=$(".empty-alert",this.roomsListColumn),this.deleteBtn=$(".delete-room",this.roomsListColumn),this.roomsDataColumn=$("#meeting-rooms-data"),this.roomItemToClone=$("#rooms-list-item").html(),this.roomItemDataToClone=$("#rooms-list-item-data").html(),this.initialRoomsCount=parseInt(this.roomsListColumn.attr("data-initial-rooms-count")),this.tabsComponent=new TabsComponent(this.roomsListColumn,this.roomsDataColumn,this.initialRoomsCount,this.emptyAlert),this.init=function(){str.get_strings([{key:"room",component:"zoom"}]).then((function(){return null})).fail(notification.exception),this.addRoomEvent(),this.deleteRoomEvent(),$("li",this.roomsListColumn).length?(this.changeRoomNameEvent(),this.buildAutocompleteComponents()):this.emptyAlert.removeClass("hidden")},this.addRoomEvent=function(){var thisObject=this;thisObject.addBtn.click((function(){thisObject.tabsComponent.countTabs++;var newRoomName=M.util.get_string("room","zoom")+" "+thisObject.tabsComponent.countTabs,newRoomElement=$(thisObject.roomItemToClone),newRoomDataElement=$(thisObject.roomItemDataToClone),newRoomIndex=thisObject.tabsComponent.countTabs,roomNameInputId="room-name-"+newRoomIndex;$("input[type=text]",newRoomDataElement).prev().attr("for",roomNameInputId),$("input[type=text]",newRoomDataElement).attr("id",roomNameInputId),$("input[type=text]",newRoomDataElement).attr("name",roomNameInputId),$("input[type=text]",newRoomDataElement).val(newRoomName),$("input[type=text]",newRoomDataElement).next().attr("name","rooms["+newRoomIndex+"]"),$("input[type=text]",newRoomDataElement).next().val(newRoomName);var roomParticipantsSelectId="participants-"+newRoomIndex;$(".room-participants",newRoomDataElement).attr("id",roomParticipantsSelectId),$(".room-participants",newRoomDataElement).attr("name","roomsparticipants["+newRoomIndex+"][]");var roomGroupsSelectId="groups-"+newRoomIndex;$(".room-groups",newRoomDataElement).attr("id",roomGroupsSelectId),$(".room-groups",newRoomDataElement).attr("name","roomsgroups["+newRoomIndex+"][]");var newRoom={tab:{name:newRoomName,element:newRoomElement},tabContent:{element:newRoomDataElement}},addedTab=thisObject.tabsComponent.addTab(newRoom);$("li:last .delete-room",thisObject.roomsList).click((function(){var thisItem=$(this).closest("li");thisObject.tabsComponent.deleteTab(thisItem)})),$("input[type=text]",addedTab.content).on("change keyup paste",(function(){var newHiddenValue=this.value;$(this).next().val(newHiddenValue),$(".tab-name",addedTab.element).text(this.value)})),thisObject.buildAutocompleteComponent(roomParticipantsSelectId,"addparticipant"),thisObject.buildAutocompleteComponent(roomGroupsSelectId,"addparticipantgroup")}))},this.deleteRoomEvent=function(){var thisObject=this;thisObject.deleteBtn.click((function(){var thisItem=$(this).closest("li");thisObject.tabsComponent.deleteTab(thisItem)}))},this.changeRoomNameEvent=function(){var thisObject=this;$("li",this.roomsListColumn).each((function(){var tabIndex=$(this).attr("id").split("-")[1];$('input[name="room-name-'+tabIndex+'"]',thisObject.roomsDataColumn).on("change keyup paste",(function(){var newHiddenValue=this.value;$(this).next().val(newHiddenValue),$("#tab-"+tabIndex+" .tab-name").text(this.value)}))}))},this.buildAutocompleteComponents=function(){var thisObject=this;$(".room-participants",thisObject.roomsDataColumn).each((function(){var thisItemId=$(this).attr("id");thisObject.buildAutocompleteComponent(thisItemId,"addparticipant")})),$(".room-groups",thisObject.roomsDataColumn).each((function(){var thisItemId=$(this).attr("id");thisObject.buildAutocompleteComponent(thisItemId,"addparticipantgroup")}))},this.buildAutocompleteComponent=function(id,placeholder){var stringkeys=[{key:placeholder,component:"zoom"},{key:"selectionarea",component:"zoom"}];str.get_strings(stringkeys).then((function(langstrings){var placeholderString=langstrings[0],noSelectionString=langstrings[1];return autocomplete.enhance("#"+id,!1,"",placeholderString,!1,!0,noSelectionString,!0),null})).fail(notification.exception)}};return{init:function(){var optionJoinBeforeHost=$(SELECTORS_OPTION_JBH),optionWaitingRoom=$(SELECTORS_OPTION_WAITING_ROOM);optionJoinBeforeHost.change((function(){!0===optionJoinBeforeHost.is(":checked")&&optionWaitingRoom.prop("checked",!1)})),optionWaitingRoom.change((function(){!0===optionWaitingRoom.is(":checked")&&optionJoinBeforeHost.prop("checked",!1)})),toggleStartTimeDuration(),toggleRepeatIntervalText(),limitRepeatValues(),$(SELECTORS_REPEAT_SELECT).change((function(){toggleStartTimeDuration(),toggleRepeatIntervalText(),limitRepeatValues()})),$(SELECTORS_RECURRING).change((function(){toggleStartTimeDuration()})),(new BreakoutroomsEditor).init()}}}));
//# sourceMappingURL=form.min.js.map
\ No newline at end of file
diff --git a/amd/build/form.min.js.map b/amd/build/form.min.js.map
index a1cfa002..b25af1e5 100644
--- a/amd/build/form.min.js.map
+++ b/amd/build/form.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"form.min.js","sources":["../src/form.js"],"sourcesContent":["// This file is part of the Zoom plugin for Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Populates or de-populates password field based on whether the\n * password is required or not.\n *\n * @copyright 2018 UC Regents\n * @author Kubilay Agi\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, autocomplete, str, notification) {\n\n /**\n * CSS selectors used throughout the file.\n *\n * @type {object}\n */\n var SELECTORS = {\n REPEAT_SELECT: 'select[name=\"recurrence_type\"]',\n REPEAT_INTERVAL: '.repeat_interval',\n REPEAT_INTERVAL_DAILY: '#interval_daily',\n REPEAT_INTERVAL_WEEKLY: '#interval_weekly',\n REPEAT_INTERVAL_MONTHLY: '#interval_monthly',\n REPEAT_INTERVAL_OPTIONS: 'select[name=\"repeat_interval\"] option',\n START_TIME: 'select[name*=\"start_time\"]',\n DURATION: '*[name*=\"duration\"]',\n RECURRING: 'input[name=\"recurring\"][type!=\"hidden\"]',\n OPTION_JBH: 'input[name=\"option_jbh\"][type!=\"hidden\"]',\n OPTION_WAITING_ROOM: 'input[name=\"option_waiting_room\"][type!=\"hidden\"]'\n };\n\n /**\n * Repeat interval options.\n *\n * @type {object}\n */\n var REPEAT_OPTIONS = {\n REPEAT_OPTION_NONE: 0,\n REPEAT_OPTION_DAILY: 1,\n REPEAT_OPTION_WEEKLY: 2,\n REPEAT_OPTION_MONTHLY: 3\n };\n\n /**\n * The max values for each repeat option.\n *\n * @type {object}\n */\n var REPEAT_MAX_OPTIONS = {\n REPEAT_OPTION_DAILY: 90,\n REPEAT_OPTION_WEEKLY: 12,\n REPEAT_OPTION_MONTHLY: 3\n };\n\n /**\n * The init function.\n */\n var init = function() {\n var optionJoinBeforeHost = $(SELECTORS.OPTION_JBH);\n var optionWaitingRoom = $(SELECTORS.OPTION_WAITING_ROOM);\n optionJoinBeforeHost.change(function() {\n if (optionJoinBeforeHost.is(':checked') === true) {\n optionWaitingRoom.prop('checked', false);\n }\n });\n optionWaitingRoom.change(function() {\n if (optionWaitingRoom.is(':checked') === true) {\n optionJoinBeforeHost.prop('checked', false);\n }\n });\n\n // First toggle the values based on initial selections.\n toggleStartTimeDuration();\n toggleRepeatIntervalText();\n limitRepeatValues();\n // Add listerner to \"Repeat Every\" drop-down.\n $(SELECTORS.REPEAT_SELECT).change(function() {\n toggleStartTimeDuration();\n toggleRepeatIntervalText();\n limitRepeatValues();\n });\n // Add listener for the \"Recurring\" checkbox\n $(SELECTORS.RECURRING).change(function() {\n toggleStartTimeDuration();\n });\n\n var breakoutroomsEditor = new BreakoutroomsEditor();\n breakoutroomsEditor.init();\n };\n\n /**\n * Toggle start time and duration elements.\n */\n var toggleStartTimeDuration = function() {\n // Disable start time and duration if \"No Fixed Time\" recurring meeting/webinar selected.\n var disabled = false;\n var repeatVal = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n if ($(SELECTORS.RECURRING).prop('checked') && repeatVal === REPEAT_OPTIONS.REPEAT_OPTION_NONE) {\n disabled = true;\n }\n $(SELECTORS.START_TIME).prop('disabled', disabled);\n $(SELECTORS.DURATION).prop('disabled', disabled);\n };\n\n /**\n * Toggle the text based on repeat type.\n * To show either Days, Weeks or Months\n */\n var toggleRepeatIntervalText = function() {\n $(SELECTORS.REPEAT_INTERVAL).hide();\n var repeatSelectVal = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_DAILY) {\n $(SELECTORS.REPEAT_INTERVAL_DAILY).show();\n } else if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_WEEKLY) {\n $(SELECTORS.REPEAT_INTERVAL_WEEKLY).show();\n } else if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_MONTHLY) {\n $(SELECTORS.REPEAT_INTERVAL_MONTHLY).show();\n }\n };\n\n /**\n * Limit the options shown in the drop-down based on repeat type selected.\n * Max value for daily meeting is 90.\n * Max value for weekly meeting is 12.\n * Max value for monthly meeting is 3.\n */\n var limitRepeatValues = function() {\n var selectedValue = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n // Restrict options if weekly or monthly option selected.\n $(SELECTORS.REPEAT_INTERVAL_OPTIONS).each(function() {\n if (selectedValue === REPEAT_OPTIONS.REPEAT_OPTION_WEEKLY) {\n if (this.value > REPEAT_MAX_OPTIONS.REPEAT_OPTION_WEEKLY) {\n $(this).hide();\n }\n } else if (selectedValue === REPEAT_OPTIONS.REPEAT_OPTION_MONTHLY) {\n if (this.value > REPEAT_MAX_OPTIONS.REPEAT_OPTION_MONTHLY) {\n $(this).hide();\n }\n } else {\n $(this).show();\n }\n });\n };\n\n /**\n * Tabs component.\n * @param {object} tabsColumn\n * @param {object} tabsContentColumn\n * @param {int} initialTabsCount\n * @param {object} emptyAlert\n */\n var TabsComponent = function(tabsColumn, tabsContentColumn, initialTabsCount, emptyAlert) {\n this.tabsColumn = tabsColumn;\n this.tabsContentColumn = tabsContentColumn;\n this.emptyAlert = emptyAlert;\n this.countTabs = initialTabsCount;\n\n /**\n * Build tab\n * @param {object} item\n * @returns {object} tab element\n */\n this.buildTab = function(item) {\n var tab = item.tab.element;\n var tabLink = $(\".nav-link\", tab);\n\n // Setting tab id.\n tab.attr('id', 'tab-' + this.countTabs);\n\n // Setting tab name.\n $(\".tab-name\", tabLink).text(item.tab.name);\n\n // Setting tab href.\n tabLink.attr('href', '#link' + this.countTabs);\n\n // Activating tab\n $(\"li a\", this.tabsColumn).removeClass('active');\n tabLink.addClass('active');\n\n return tab;\n };\n\n /**\n * Build tab content.\n * @param {object} item\n * @returns {object} content of tab element\n */\n this.buildTabContent = function(item) {\n var tabContent = item.tabContent.element;\n\n // Setting tabContent id.\n tabContent.attr('id', 'link' + this.countTabs);\n\n // Activating tabContent.\n $(\".tab-pane\", this.tabsContentColumn).removeClass('active');\n tabContent.addClass('active');\n\n return tabContent;\n };\n\n\n /**\n * Add tab\n * @param {object} item\n * @returns {object} tab element\n */\n this.addTab = function(item) {\n var tab = this.buildTab(item);\n var tabContent = this.buildTabContent(item);\n\n this.emptyAlert.addClass('hidden');\n $(\"ul\", this.tabsColumn).append(tab);\n $(\".tab-content\", this.tabsContentColumn).append(tabContent);\n\n return {\"element\": tab, \"content\": tabContent};\n };\n\n /**\n * Delete tab\n * @param {object} item\n */\n this.deleteTab = function(item) {\n var tab = item;\n var tabContent = $($('a', tab).attr('href'));\n\n tab.remove();\n tabContent.remove();\n\n var countTabs = $(\"li\", this.tabsColumn).length;\n if (!countTabs) {\n this.emptyAlert.removeClass('hidden');\n } else {\n var countActiveTabs = $(\"li a.active\", this.tabsColumn).length;\n if (!countActiveTabs) {\n $(\"li:first-child a\", this.tabsColumn).trigger('click');\n }\n }\n };\n };\n\n /**\n * Breakout rooms editor.\n */\n var BreakoutroomsEditor = function() {\n this.roomsListColumn = $(\"#meeting-rooms-list\");\n this.roomsList = $(\"ul\", this.roomsListColumn);\n this.addBtn = $(\"#add-room\", this.roomsListColumn);\n this.emptyAlert = $(\".empty-alert\", this.roomsListColumn);\n this.deleteBtn = $(\".delete-room\", this.roomsListColumn);\n this.roomsDataColumn = $(\"#meeting-rooms-data\");\n this.roomItemToClone = $('#rooms-list-item').html();\n this.roomItemDataToClone = $('#rooms-list-item-data').html();\n this.initialRoomsCount = parseInt(this.roomsListColumn.attr('data-initial-rooms-count'));\n this.tabsComponent = new TabsComponent(this.roomsListColumn, this.roomsDataColumn, this.initialRoomsCount, this.emptyAlert);\n\n // Add room event.\n this.init = function() {\n var stringkeys = [{key: 'room', component: 'zoom'}];\n str.get_strings(stringkeys).then().fail(notification.exception);\n\n this.addRoomEvent();\n this.deleteRoomEvent();\n var countRooms = $(\"li\", this.roomsListColumn).length;\n if (countRooms) {\n this.changeRoomNameEvent();\n this.buildAutocompleteComponents();\n } else {\n this.emptyAlert.removeClass('hidden');\n }\n };\n // Add room event.\n this.addRoomEvent = function() {\n var thisObject = this;\n\n // Adding addroom button click event.\n thisObject.addBtn.click(function() {\n thisObject.tabsComponent.countTabs++;\n\n var newRoomName = M.util.get_string('room', 'zoom') + ' ' + thisObject.tabsComponent.countTabs;\n var newRoomElement = $(thisObject.roomItemToClone);\n var newRoomDataElement = $(thisObject.roomItemDataToClone);\n var newRoomIndex = thisObject.tabsComponent.countTabs;\n\n // Setting new room name.\n var roomNameInputId = 'room-name-' + newRoomIndex;\n $(\"input[type=text]\", newRoomDataElement).prev().attr('for', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).attr('id', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).attr('name', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).val(newRoomName);\n $(\"input[type=text]\", newRoomDataElement).next().attr('name', 'rooms[' + newRoomIndex + ']');\n $(\"input[type=text]\", newRoomDataElement).next().val(newRoomName);\n\n // Setting new room participants select id/name.\n var roomParticipantsSelectId = 'participants-' + newRoomIndex;\n $(\".room-participants\", newRoomDataElement).attr('id', roomParticipantsSelectId);\n $(\".room-participants\", newRoomDataElement).attr('name', 'roomsparticipants[' + newRoomIndex + '][]');\n\n // Setting new room participant groups select id/name.\n var roomGroupsSelectId = 'groups-' + newRoomIndex;\n $(\".room-groups\", newRoomDataElement).attr('id', roomGroupsSelectId);\n $(\".room-groups\", newRoomDataElement).attr('name', 'roomsgroups[' + newRoomIndex + '][]');\n\n // Add new room tab\n var newRoom = {\"tab\": {\"name\": newRoomName, \"element\": newRoomElement},\n \"tabContent\": {\"element\": newRoomDataElement}};\n\n var addedTab = thisObject.tabsComponent.addTab(newRoom);\n\n // Adding new room tab delete button click event.\n $(\"li:last .delete-room\", thisObject.roomsList).click(function() {\n var thisItem = $(this).closest('li');\n thisObject.tabsComponent.deleteTab(thisItem);\n });\n\n // Adding new room change name event.\n $(\"input[type=text]\", addedTab.content).on(\"change keyup paste\", function() {\n var newHiddenValue = this.value;\n $(this).next().val(newHiddenValue);\n\n $(\".tab-name\", addedTab.element).text(this.value);\n });\n\n // Convert select dropdowns to autocomplete component.\n thisObject.buildAutocompleteComponent(roomParticipantsSelectId, 'addparticipant');\n thisObject.buildAutocompleteComponent(roomGroupsSelectId, 'addparticipantgroup');\n });\n };\n\n // Delete room event.\n this.deleteRoomEvent = function() {\n var thisObject = this;\n\n // Adding deleteroom button click event.\n thisObject.deleteBtn.click(function() {\n var thisItem = $(this).closest('li');\n thisObject.tabsComponent.deleteTab(thisItem);\n });\n };\n\n // Change room name event.\n this.changeRoomNameEvent = function() {\n var thisObject = this;\n\n $(\"li\", this.roomsListColumn).each(function() {\n var tabIdArr = $(this).attr('id').split('-');\n var tabIndex = tabIdArr[1];\n $('input[name=\"room-name-' + tabIndex + '\"]', thisObject.roomsDataColumn).on(\"change keyup paste\", function() {\n var newHiddenValue = this.value;\n $(this).next().val(newHiddenValue);\n\n $(\"#tab-\" + tabIndex + \" .tab-name\").text(this.value);\n });\n });\n };\n\n /**\n * Build autocomplete components.\n */\n this.buildAutocompleteComponents = function() {\n var thisObject = this;\n $(\".room-participants\", thisObject.roomsDataColumn).each(function() {\n var thisItemId = $(this).attr('id');\n thisObject.buildAutocompleteComponent(thisItemId, 'addparticipant');\n });\n\n $(\".room-groups\", thisObject.roomsDataColumn).each(function() {\n var thisItemId = $(this).attr('id');\n thisObject.buildAutocompleteComponent(thisItemId, 'addparticipantgroup');\n });\n };\n\n /**\n * Build autocomplete component.\n * @param {string} id\n * @param {string} placeholder\n */\n this.buildAutocompleteComponent = function(id, placeholder) {\n var stringkeys = [{key: placeholder, component: 'zoom'}, {key: 'selectionarea', component: 'zoom'}];\n str.get_strings(stringkeys).then(function(langstrings) {\n var placeholderString = langstrings[0];\n var noSelectionString = langstrings[1];\n\n autocomplete.enhance('#' + id, false, '', placeholderString, false, true, noSelectionString, true);\n return null;\n }).fail(notification.exception);\n };\n };\n\n return {\n init: init\n };\n});\n"],"names":["define","$","autocomplete","str","notification","SELECTORS","REPEAT_OPTIONS","REPEAT_MAX_OPTIONS","toggleStartTimeDuration","disabled","repeatVal","parseInt","val","prop","toggleRepeatIntervalText","hide","repeatSelectVal","show","limitRepeatValues","selectedValue","each","this","value","TabsComponent","tabsColumn","tabsContentColumn","initialTabsCount","emptyAlert","countTabs","buildTab","item","tab","element","tabLink","attr","text","name","removeClass","addClass","buildTabContent","tabContent","addTab","append","deleteTab","remove","length","trigger","BreakoutroomsEditor","roomsListColumn","roomsList","addBtn","deleteBtn","roomsDataColumn","roomItemToClone","html","roomItemDataToClone","initialRoomsCount","tabsComponent","init","get_strings","key","component","then","fail","exception","addRoomEvent","deleteRoomEvent","changeRoomNameEvent","buildAutocompleteComponents","thisObject","click","newRoomName","M","util","get_string","newRoomElement","newRoomDataElement","newRoomIndex","roomNameInputId","prev","next","roomParticipantsSelectId","roomGroupsSelectId","newRoom","addedTab","thisItem","closest","content","on","newHiddenValue","buildAutocompleteComponent","tabIndex","split","thisItemId","id","placeholder","stringkeys","langstrings","placeholderString","noSelectionString","enhance","optionJoinBeforeHost","optionWaitingRoom","change","is"],"mappings":";;;;;;;;AAwBAA,uBAAO,CAAC,SAAU,yBAA0B,WAAY,sBAAsB,SAASC,EAAGC,aAAcC,IAAKC,kBAOrGC,wBACe,iCADfA,0BAEiB,mBAFjBA,gCAGuB,kBAHvBA,iCAIwB,mBAJxBA,kCAKyB,oBALzBA,kCAMyB,wCANzBA,qBAOY,6BAPZA,mBAQU,sBARVA,oBASW,0CATXA,qBAUY,2CAVZA,8BAWqB,oDAQrBC,kCACoB,EADpBA,mCAEqB,EAFrBA,oCAGsB,EAHtBA,qCAIuB,EAQvBC,wCAEsB,GAFtBA,yCAGuB,EA0CvBC,wBAA0B,eAEtBC,UAAW,EACXC,UAAYC,SAASV,EAAEI,yBAAyBO,MAAO,IACvDX,EAAEI,qBAAqBQ,KAAK,YAAcH,YAAcJ,oCACxDG,UAAW,GAEfR,EAAEI,sBAAsBQ,KAAK,WAAYJ,UACzCR,EAAEI,oBAAoBQ,KAAK,WAAYJ,WAOvCK,yBAA2B,WAC3Bb,EAAEI,2BAA2BU,WACzBC,gBAAkBL,SAASV,EAAEI,yBAAyBO,MAAO,IAC7DI,kBAAoBV,mCACpBL,EAAEI,iCAAiCY,OAC5BD,kBAAoBV,oCAC3BL,EAAEI,kCAAkCY,OAC7BD,kBAAoBV,sCAC3BL,EAAEI,mCAAmCY,QAUzCC,kBAAoB,eAChBC,cAAgBR,SAASV,EAAEI,yBAAyBO,MAAO,IAE/DX,EAAEI,mCAAmCe,MAAK,WAClCD,gBAAkBb,oCACde,KAAKC,MAAQf,yCACbN,EAAEoB,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WAAWjB,iBAAiBhC,MAAK,eACjDyE,WAAa5F,EAAEoB,MAAMa,KAAK,MAC9BmC,WAAWqB,2BAA2BG,WAAY,qBAGtD5F,EAAE,eAAgBoE,WAAWjB,iBAAiBhC,MAAK,eAC3CyE,WAAa5F,EAAEoB,MAAMa,KAAK,MAC9BmC,WAAWqB,2BAA2BG,WAAY,gCASrDH,2BAA6B,SAASI,GAAIC,iBACvCC,WAAa,CAAC,CAACpC,IAAKmC,YAAalC,UAAW,QAAS,CAACD,IAAK,gBAAiBC,UAAW,SAC3F1D,IAAIwD,YAAYqC,YAAYlC,MAAK,SAASmC,iBAClCC,kBAAoBD,YAAY,GAChCE,kBAAoBF,YAAY,UAEpC/F,aAAakG,QAAQ,IAAMN,IAAI,EAAO,GAAII,mBAAmB,GAAO,EAAMC,mBAAmB,GACtF,QACRpC,KAAK3D,aAAa4D,mBAItB,CACHN,KA5UO,eACH2C,qBAAuBpG,EAAEI,sBACzBiG,kBAAoBrG,EAAEI,+BAC1BgG,qBAAqBE,QAAO,YACoB,IAAxCF,qBAAqBG,GAAG,aACxBF,kBAAkBzF,KAAK,WAAW,MAG1CyF,kBAAkBC,QAAO,YACoB,IAArCD,kBAAkBE,GAAG,aACrBH,qBAAqBxF,KAAK,WAAW,MAK7CL,0BACAM,2BACAI,oBAEAjB,EAAEI,yBAAyBkG,QAAO,WAC9B/F,0BACAM,2BACAI,uBAGJjB,EAAEI,qBAAqBkG,QAAO,WAC1B/F,8BAGsB,IAAIuC,qBACVW"}
\ No newline at end of file
+{"version":3,"file":"form.min.js","sources":["../src/form.js"],"sourcesContent":["// This file is part of the Zoom plugin for Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * Populates or de-populates password field based on whether the\n * password is required or not.\n *\n * @copyright 2018 UC Regents\n * @author Kubilay Agi\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, autocomplete, str, notification) {\n\n /**\n * CSS selectors used throughout the file.\n *\n * @type {object}\n */\n var SELECTORS = {\n REPEAT_SELECT: 'select[name=\"recurrence_type\"]',\n REPEAT_INTERVAL: '.repeat_interval',\n REPEAT_INTERVAL_DAILY: '#interval_daily',\n REPEAT_INTERVAL_WEEKLY: '#interval_weekly',\n REPEAT_INTERVAL_MONTHLY: '#interval_monthly',\n REPEAT_INTERVAL_OPTIONS: 'select[name=\"repeat_interval\"] option',\n START_TIME: 'select[name*=\"start_time\"]',\n DURATION: '*[name*=\"duration\"]',\n RECURRING: 'input[name=\"recurring\"][type!=\"hidden\"]',\n OPTION_JBH: 'input[name=\"option_jbh\"][type!=\"hidden\"]',\n OPTION_WAITING_ROOM: 'input[name=\"option_waiting_room\"][type!=\"hidden\"]'\n };\n\n /**\n * Repeat interval options.\n *\n * @type {object}\n */\n var REPEAT_OPTIONS = {\n REPEAT_OPTION_NONE: 0,\n REPEAT_OPTION_DAILY: 1,\n REPEAT_OPTION_WEEKLY: 2,\n REPEAT_OPTION_MONTHLY: 3\n };\n\n /**\n * The max values for each repeat option.\n *\n * @type {object}\n */\n var REPEAT_MAX_OPTIONS = {\n REPEAT_OPTION_DAILY: 90,\n REPEAT_OPTION_WEEKLY: 12,\n REPEAT_OPTION_MONTHLY: 3\n };\n\n /**\n * The init function.\n */\n var init = function() {\n var optionJoinBeforeHost = $(SELECTORS.OPTION_JBH);\n var optionWaitingRoom = $(SELECTORS.OPTION_WAITING_ROOM);\n optionJoinBeforeHost.change(function() {\n if (optionJoinBeforeHost.is(':checked') === true) {\n optionWaitingRoom.prop('checked', false);\n }\n });\n optionWaitingRoom.change(function() {\n if (optionWaitingRoom.is(':checked') === true) {\n optionJoinBeforeHost.prop('checked', false);\n }\n });\n\n // First toggle the values based on initial selections.\n toggleStartTimeDuration();\n toggleRepeatIntervalText();\n limitRepeatValues();\n // Add listerner to \"Repeat Every\" drop-down.\n $(SELECTORS.REPEAT_SELECT).change(function() {\n toggleStartTimeDuration();\n toggleRepeatIntervalText();\n limitRepeatValues();\n });\n // Add listener for the \"Recurring\" checkbox\n $(SELECTORS.RECURRING).change(function() {\n toggleStartTimeDuration();\n });\n\n var breakoutroomsEditor = new BreakoutroomsEditor();\n breakoutroomsEditor.init();\n };\n\n /**\n * Toggle start time and duration elements.\n */\n var toggleStartTimeDuration = function() {\n // Disable start time and duration if \"No Fixed Time\" recurring meeting/webinar selected.\n var disabled = false;\n var repeatVal = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n if ($(SELECTORS.RECURRING).prop('checked') && repeatVal === REPEAT_OPTIONS.REPEAT_OPTION_NONE) {\n disabled = true;\n }\n $(SELECTORS.START_TIME).prop('disabled', disabled);\n $(SELECTORS.DURATION).prop('disabled', disabled);\n };\n\n /**\n * Toggle the text based on repeat type.\n * To show either Days, Weeks or Months\n */\n var toggleRepeatIntervalText = function() {\n $(SELECTORS.REPEAT_INTERVAL).hide();\n var repeatSelectVal = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_DAILY) {\n $(SELECTORS.REPEAT_INTERVAL_DAILY).show();\n } else if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_WEEKLY) {\n $(SELECTORS.REPEAT_INTERVAL_WEEKLY).show();\n } else if (repeatSelectVal === REPEAT_OPTIONS.REPEAT_OPTION_MONTHLY) {\n $(SELECTORS.REPEAT_INTERVAL_MONTHLY).show();\n }\n };\n\n /**\n * Limit the options shown in the drop-down based on repeat type selected.\n * Max value for daily meeting is 90.\n * Max value for weekly meeting is 12.\n * Max value for monthly meeting is 3.\n */\n var limitRepeatValues = function() {\n var selectedValue = parseInt($(SELECTORS.REPEAT_SELECT).val(), 10);\n // Restrict options if weekly or monthly option selected.\n $(SELECTORS.REPEAT_INTERVAL_OPTIONS).each(function() {\n if (selectedValue === REPEAT_OPTIONS.REPEAT_OPTION_WEEKLY) {\n if (this.value > REPEAT_MAX_OPTIONS.REPEAT_OPTION_WEEKLY) {\n $(this).hide();\n }\n } else if (selectedValue === REPEAT_OPTIONS.REPEAT_OPTION_MONTHLY) {\n if (this.value > REPEAT_MAX_OPTIONS.REPEAT_OPTION_MONTHLY) {\n $(this).hide();\n }\n } else {\n $(this).show();\n }\n });\n };\n\n /**\n * Tabs component.\n * @param {object} tabsColumn\n * @param {object} tabsContentColumn\n * @param {int} initialTabsCount\n * @param {object} emptyAlert\n */\n var TabsComponent = function(tabsColumn, tabsContentColumn, initialTabsCount, emptyAlert) {\n this.tabsColumn = tabsColumn;\n this.tabsContentColumn = tabsContentColumn;\n this.emptyAlert = emptyAlert;\n this.countTabs = initialTabsCount;\n\n /**\n * Build tab\n * @param {object} item\n * @returns {object} tab element\n */\n this.buildTab = function(item) {\n var tab = item.tab.element;\n var tabLink = $(\".nav-link\", tab);\n\n // Setting tab id.\n tab.attr('id', 'tab-' + this.countTabs);\n\n // Setting tab name.\n $(\".tab-name\", tabLink).text(item.tab.name);\n\n // Setting tab href.\n tabLink.attr('href', '#link' + this.countTabs);\n\n // Activating tab\n $(\"li a\", this.tabsColumn).removeClass('active');\n tabLink.addClass('active');\n\n return tab;\n };\n\n /**\n * Build tab content.\n * @param {object} item\n * @returns {object} content of tab element\n */\n this.buildTabContent = function(item) {\n var tabContent = item.tabContent.element;\n\n // Setting tabContent id.\n tabContent.attr('id', 'link' + this.countTabs);\n\n // Activating tabContent.\n $(\".tab-pane\", this.tabsContentColumn).removeClass('active');\n tabContent.addClass('active');\n\n return tabContent;\n };\n\n\n /**\n * Add tab\n * @param {object} item\n * @returns {object} tab element\n */\n this.addTab = function(item) {\n var tab = this.buildTab(item);\n var tabContent = this.buildTabContent(item);\n\n this.emptyAlert.addClass('hidden');\n $(\"ul\", this.tabsColumn).append(tab);\n $(\".tab-content\", this.tabsContentColumn).append(tabContent);\n\n return {\"element\": tab, \"content\": tabContent};\n };\n\n /**\n * Delete tab\n * @param {object} item\n */\n this.deleteTab = function(item) {\n var tab = item;\n var tabContent = $($('a', tab).attr('href'));\n\n tab.remove();\n tabContent.remove();\n\n var countTabs = $(\"li\", this.tabsColumn).length;\n if (!countTabs) {\n this.emptyAlert.removeClass('hidden');\n } else {\n var countActiveTabs = $(\"li a.active\", this.tabsColumn).length;\n if (!countActiveTabs) {\n $(\"li:first-child a\", this.tabsColumn).trigger('click');\n }\n }\n };\n };\n\n /**\n * Breakout rooms editor.\n */\n var BreakoutroomsEditor = function() {\n this.roomsListColumn = $(\"#meeting-rooms-list\");\n this.roomsList = $(\"ul\", this.roomsListColumn);\n this.addBtn = $(\"#add-room\", this.roomsListColumn);\n this.emptyAlert = $(\".empty-alert\", this.roomsListColumn);\n this.deleteBtn = $(\".delete-room\", this.roomsListColumn);\n this.roomsDataColumn = $(\"#meeting-rooms-data\");\n this.roomItemToClone = $('#rooms-list-item').html();\n this.roomItemDataToClone = $('#rooms-list-item-data').html();\n this.initialRoomsCount = parseInt(this.roomsListColumn.attr('data-initial-rooms-count'));\n this.tabsComponent = new TabsComponent(this.roomsListColumn, this.roomsDataColumn, this.initialRoomsCount, this.emptyAlert);\n\n // Add room event.\n this.init = function() {\n var stringkeys = [{key: 'room', component: 'zoom'}];\n str.get_strings(stringkeys).then(function() {\n return null;\n }).fail(notification.exception);\n\n this.addRoomEvent();\n this.deleteRoomEvent();\n var countRooms = $(\"li\", this.roomsListColumn).length;\n if (countRooms) {\n this.changeRoomNameEvent();\n this.buildAutocompleteComponents();\n } else {\n this.emptyAlert.removeClass('hidden');\n }\n };\n // Add room event.\n this.addRoomEvent = function() {\n var thisObject = this;\n\n // Adding addroom button click event.\n thisObject.addBtn.click(function() {\n thisObject.tabsComponent.countTabs++;\n\n var newRoomName = M.util.get_string('room', 'zoom') + ' ' + thisObject.tabsComponent.countTabs;\n var newRoomElement = $(thisObject.roomItemToClone);\n var newRoomDataElement = $(thisObject.roomItemDataToClone);\n var newRoomIndex = thisObject.tabsComponent.countTabs;\n\n // Setting new room name.\n var roomNameInputId = 'room-name-' + newRoomIndex;\n $(\"input[type=text]\", newRoomDataElement).prev().attr('for', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).attr('id', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).attr('name', roomNameInputId);\n $(\"input[type=text]\", newRoomDataElement).val(newRoomName);\n $(\"input[type=text]\", newRoomDataElement).next().attr('name', 'rooms[' + newRoomIndex + ']');\n $(\"input[type=text]\", newRoomDataElement).next().val(newRoomName);\n\n // Setting new room participants select id/name.\n var roomParticipantsSelectId = 'participants-' + newRoomIndex;\n $(\".room-participants\", newRoomDataElement).attr('id', roomParticipantsSelectId);\n $(\".room-participants\", newRoomDataElement).attr('name', 'roomsparticipants[' + newRoomIndex + '][]');\n\n // Setting new room participant groups select id/name.\n var roomGroupsSelectId = 'groups-' + newRoomIndex;\n $(\".room-groups\", newRoomDataElement).attr('id', roomGroupsSelectId);\n $(\".room-groups\", newRoomDataElement).attr('name', 'roomsgroups[' + newRoomIndex + '][]');\n\n // Add new room tab\n var newRoom = {\"tab\": {\"name\": newRoomName, \"element\": newRoomElement},\n \"tabContent\": {\"element\": newRoomDataElement}};\n\n var addedTab = thisObject.tabsComponent.addTab(newRoom);\n\n // Adding new room tab delete button click event.\n $(\"li:last .delete-room\", thisObject.roomsList).click(function() {\n var thisItem = $(this).closest('li');\n thisObject.tabsComponent.deleteTab(thisItem);\n });\n\n // Adding new room change name event.\n $(\"input[type=text]\", addedTab.content).on(\"change keyup paste\", function() {\n var newHiddenValue = this.value;\n $(this).next().val(newHiddenValue);\n\n $(\".tab-name\", addedTab.element).text(this.value);\n });\n\n // Convert select dropdowns to autocomplete component.\n thisObject.buildAutocompleteComponent(roomParticipantsSelectId, 'addparticipant');\n thisObject.buildAutocompleteComponent(roomGroupsSelectId, 'addparticipantgroup');\n });\n };\n\n // Delete room event.\n this.deleteRoomEvent = function() {\n var thisObject = this;\n\n // Adding deleteroom button click event.\n thisObject.deleteBtn.click(function() {\n var thisItem = $(this).closest('li');\n thisObject.tabsComponent.deleteTab(thisItem);\n });\n };\n\n // Change room name event.\n this.changeRoomNameEvent = function() {\n var thisObject = this;\n\n $(\"li\", this.roomsListColumn).each(function() {\n var tabIdArr = $(this).attr('id').split('-');\n var tabIndex = tabIdArr[1];\n $('input[name=\"room-name-' + tabIndex + '\"]', thisObject.roomsDataColumn).on(\"change keyup paste\", function() {\n var newHiddenValue = this.value;\n $(this).next().val(newHiddenValue);\n\n $(\"#tab-\" + tabIndex + \" .tab-name\").text(this.value);\n });\n });\n };\n\n /**\n * Build autocomplete components.\n */\n this.buildAutocompleteComponents = function() {\n var thisObject = this;\n $(\".room-participants\", thisObject.roomsDataColumn).each(function() {\n var thisItemId = $(this).attr('id');\n thisObject.buildAutocompleteComponent(thisItemId, 'addparticipant');\n });\n\n $(\".room-groups\", thisObject.roomsDataColumn).each(function() {\n var thisItemId = $(this).attr('id');\n thisObject.buildAutocompleteComponent(thisItemId, 'addparticipantgroup');\n });\n };\n\n /**\n * Build autocomplete component.\n * @param {string} id\n * @param {string} placeholder\n */\n this.buildAutocompleteComponent = function(id, placeholder) {\n var stringkeys = [{key: placeholder, component: 'zoom'}, {key: 'selectionarea', component: 'zoom'}];\n str.get_strings(stringkeys).then(function(langstrings) {\n var placeholderString = langstrings[0];\n var noSelectionString = langstrings[1];\n\n autocomplete.enhance('#' + id, false, '', placeholderString, false, true, noSelectionString, true);\n return null;\n }).fail(notification.exception);\n };\n };\n\n return {\n init: init\n };\n});\n"],"names":["define","$","autocomplete","str","notification","SELECTORS","REPEAT_OPTIONS","REPEAT_MAX_OPTIONS","toggleStartTimeDuration","disabled","repeatVal","parseInt","val","prop","toggleRepeatIntervalText","hide","repeatSelectVal","show","limitRepeatValues","selectedValue","each","this","value","TabsComponent","tabsColumn","tabsContentColumn","initialTabsCount","emptyAlert","countTabs","buildTab","item","tab","element","tabLink","attr","text","name","removeClass","addClass","buildTabContent","tabContent","addTab","append","deleteTab","remove","length","trigger","BreakoutroomsEditor","roomsListColumn","roomsList","addBtn","deleteBtn","roomsDataColumn","roomItemToClone","html","roomItemDataToClone","initialRoomsCount","tabsComponent","init","get_strings","key","component","then","fail","exception","addRoomEvent","deleteRoomEvent","changeRoomNameEvent","buildAutocompleteComponents","thisObject","click","newRoomName","M","util","get_string","newRoomElement","newRoomDataElement","newRoomIndex","roomNameInputId","prev","next","roomParticipantsSelectId","roomGroupsSelectId","newRoom","addedTab","thisItem","closest","content","on","newHiddenValue","buildAutocompleteComponent","tabIndex","split","thisItemId","id","placeholder","stringkeys","langstrings","placeholderString","noSelectionString","enhance","optionJoinBeforeHost","optionWaitingRoom","change","is"],"mappings":";;;;;;;;AAwBAA,uBAAO,CAAC,SAAU,yBAA0B,WAAY,sBAAsB,SAASC,EAAGC,aAAcC,IAAKC,kBAOrGC,wBACe,iCADfA,0BAEiB,mBAFjBA,gCAGuB,kBAHvBA,iCAIwB,mBAJxBA,kCAKyB,oBALzBA,kCAMyB,wCANzBA,qBAOY,6BAPZA,mBAQU,sBARVA,oBASW,0CATXA,qBAUY,2CAVZA,8BAWqB,oDAQrBC,kCACoB,EADpBA,mCAEqB,EAFrBA,oCAGsB,EAHtBA,qCAIuB,EAQvBC,wCAEsB,GAFtBA,yCAGuB,EA0CvBC,wBAA0B,eAEtBC,UAAW,EACXC,UAAYC,SAASV,EAAEI,yBAAyBO,MAAO,IACvDX,EAAEI,qBAAqBQ,KAAK,YAAcH,YAAcJ,oCACxDG,UAAW,GAEfR,EAAEI,sBAAsBQ,KAAK,WAAYJ,UACzCR,EAAEI,oBAAoBQ,KAAK,WAAYJ,WAOvCK,yBAA2B,WAC3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AAEI,qBAAqBkG,QAAO,WAC1B/F,8BAGsB,IAAIuC,qBACVW"}
\ No newline at end of file
diff --git a/amd/src/form.js b/amd/src/form.js
index 5dc92e03..716844d4 100644
--- a/amd/src/form.js
+++ b/amd/src/form.js
@@ -270,7 +270,9 @@ define(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], fu
// Add room event.
this.init = function() {
var stringkeys = [{key: 'room', component: 'zoom'}];
- str.get_strings(stringkeys).then().fail(notification.exception);
+ str.get_strings(stringkeys).then(function() {
+ return null;
+ }).fail(notification.exception);
this.addRoomEvent();
this.deleteRoomEvent();