luci/modules/luci-base/htdocs/luci-static/resources
Jo-Philipp Wich 2771360108 luci-base: form.js: fix removing just created named GridSection
Since the `handleModalSave()` handler of the GridSection class invokes
`handleModalCancel()` after saving the data but before removing the
`addedSection` property, the `handleModalCancel` handler incorrectly
removed the uci section that has just been created.

This bug didn't affect anonymous GridSections because after saving the
id of the created section changes, causing the remove command to fail,
but for named ones with stable section IDs, the bug manifested.

Solve the issue by passing a flag to `handleModalCancel()` indicating
whether the method was called from a safe operation and use it do
decide whether to delete the new staged uci section or not.

Fixes: #5760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-22 23:41:05 +02:00
..
cbi luci-base: move old cbi icons to luci-compat 2020-05-07 19:40:29 +02:00
icons luci-base: optimized icons filesizes 2022-06-25 01:45:55 +02:00
protocol treewide: drop MAC and MTU from interfaces (protocols) 2021-05-28 15:34:41 +02:00
tools luci-app-firewall: fix setting unspecified zone on forwardings 2022-02-16 00:27:37 +01:00
cbi.js luci-base: introduce new LuCI.ui.Table class 2022-02-24 23:45:17 +01:00
firewall.js luci-base: firewall.js: add getZoneColorStyle() helper 2021-11-11 13:00:50 +01:00
form.js luci-base: form.js: fix removing just created named GridSection 2022-07-22 23:41:05 +02:00
fs.js luci-base: harmonize JS class naming and requesting 2020-04-02 21:51:20 +02:00
luci.js luci-base: luci.js: remove wrong CSS class from page footer 2022-05-16 16:04:56 +02:00
network.js luci-base: network.js: consider uci config for Device.getType()/getParent() 2022-06-16 09:52:36 +02:00
promis.min.js luci-base: add ES6 Promise polyfill for IE < Edge 2019-07-07 15:25:49 +02:00
rpc.js luci-base: don't append object.method to the RPC url 2020-09-23 16:54:18 +02:00
uci.js luci-base: uci.js: merge changes when retrieving entire sections 2021-03-29 22:35:50 +02:00
ui.js luci-base: ui.js: add required CSS class to dynlist widget 2022-05-17 21:48:01 +02:00
validation.js Merge pull request #5442 from lvoegl/validation-error-popup-message 2021-11-18 11:39:45 +01:00
xhr.js luci-base: luci.js: add HTTP request functions 2019-07-07 15:25:49 +02:00