diff --git a/install/package.json b/install/package.json index f5d1084ce9..50d04cb250 100644 --- a/install/package.json +++ b/install/package.json @@ -81,7 +81,7 @@ "material-design-lite": "1.3.0", "mime": "3.0.0", "mkdirp": "1.0.4", - "mongodb": "4.3.1", + "mongodb": "4.4.0", "morgan": "1.10.0", "mousetrap": "1.6.5", "multiparty": "4.2.3", @@ -89,11 +89,11 @@ "nconf": "0.11.3", "nodebb-plugin-2factor": "3.0.4", "nodebb-plugin-composer-default": "7.0.20", - "nodebb-plugin-dbsearch": "5.1.2", - "nodebb-plugin-emoji": "3.5.16", + "nodebb-plugin-dbsearch": "5.1.3", + "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", - "nodebb-plugin-markdown": "9.0.7", - "nodebb-plugin-mentions": "3.0.5", + "nodebb-plugin-markdown": "9.0.8", + "nodebb-plugin-mentions": "3.0.6", "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", @@ -110,7 +110,7 @@ "pg-cursor": "2.7.3", "postcss": "8.4.6", "postcss-clean": "1.2.0", - "prompt": "1.2.1", + "prompt": "1.2.2", "ioredis": "4.28.5", "request": "2.88.2", "request-promise-native": "1.0.9", diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index dba5da9bc0..c03e2ea6ed 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -92,9 +92,15 @@ define('settings/sorted-list', [ const editBtn = $('[data-sorted-list-uuid="' + itemUUID + '"] [data-type="edit"]'); editBtn.on('click', function () { - const form = $('[data-sorted-list-uuid="' + itemUUID + '"][data-sorted-list-object="' + key + '"]').clone(true).show(); + const form = $('[data-sorted-list-uuid="' + itemUUID + '"][data-sorted-list-object="' + key + '"]'); + const clone = form.clone(true).show(); - const modal = bootbox.confirm(form, function (save) { + // .clone() doesn't preserve the state of `select` elements, fixing after the fact + clone.find('select').each((idx, el) => { + el.value = form.find(`select#${el.id}`).val(); + }); + + const modal = bootbox.confirm(clone, function (save) { if (save) { const form = $('
'); form.append(modal.find('form').children()); diff --git a/public/vendor/bootbox/wrapper.js b/public/vendor/bootbox/wrapper.js index b37f675395..54e703fa31 100644 --- a/public/vendor/bootbox/wrapper.js +++ b/public/vendor/bootbox/wrapper.js @@ -23,7 +23,7 @@ require(['translator', 'bootbox'], function (shim, bootbox) { var translator = shim.Translator.create(); var dialog = bootbox.dialog; - var attrsToTranslate = ['placeholder', 'title', 'value']; + var attrsToTranslate = ['placeholder', 'title', 'value', 'label']; bootbox.dialog = function (options) { var show = options.show !== false; options.show = false;