Skip to content

Commit

Permalink
luci-app-banip: fix "Apply & Restart" button call chain
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Brenken <[email protected]>
  • Loading branch information
dibdot committed Apr 27, 2024
1 parent c75232d commit d4b8290
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 233 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
function handleAction(ev) {
if (ev === 'restart') {
let map = document.querySelector('.cbi-map');
dom.callClassMethod(map, 'save').then(function() {
classes.ui.changes.apply(false);
return dom.callClassMethod(map, 'save')
.then(L.bind(ui.changes.apply, ui.changes))
.then(function() {
return fs.exec_direct('/etc/init.d/banip', [ev]);
});
} else {
return fs.exec_direct('/etc/init.d/banip', [ev]);
}
return fs.exec_direct('/etc/init.d/banip', [ev])
}

return view.extend({
Expand Down
Loading

0 comments on commit d4b8290

Please sign in to comment.