luci-base: form.js: allow overriding remove action in Table/GridSections

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-24 07:59:04 +02:00
parent 4d3d23b5e9
commit 0068c3bd49

View file

@ -1211,10 +1211,7 @@ var CBITableSection = CBITypedSection.extend({
E('button', {
'title': btn_title || _('Delete'),
'class': 'cbi-button cbi-button-remove',
'click': L.ui.createHandlerFn(this, function(sid, ev) {
this.map.data.remove(config_name, sid);
return this.map.save(null, true);
}, section_id)
'click': L.ui.createHandlerFn(this, 'handleRemove', section_id)
}, [ btn_title || _('Delete') ])
);
}