luci-base: form.js: don't destroy modal form on invalid values when saving
authorJo-Philipp Wich <jo@mein.io>
Mon, 27 Jul 2020 15:04:20 +0000 (17:04 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 28 Jul 2020 18:57:04 +0000 (20:57 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js

index a50d457e213f0a559d0d106ccbf9e4cf289299ff..0a8f87f4b80377a46c8e5efb88e54be769fc2134 100644 (file)
@@ -2614,7 +2614,7 @@ var CBITableSection = CBITypedSection.extend(/** @lends LuCI.form.TableSection.p
 
        /** @private */
        handleModalSave: function(modalMap, ev) {
-               return modalMap.save()
+               return modalMap.save(null, true)
                        .then(L.bind(this.map.load, this.map))
                        .then(L.bind(this.map.reset, this.map))
                        .then(ui.hideModal)