0
0
mirror of https://github.com/openwrt/luci.git synced 2025-07-06 14:13:07 +00:00
Files
Khachatryan Karen 0a09ae1805 luci-app-antiblock: Disable routes without deleting
1) Added the ability to disable routes without deleting them.

Signed-off-by: Khachatryan Karen <karen0734@gmail.com>
2025-05-28 22:21:31 +03:00

31 lines
969 B
JavaScript

'use strict';
'require view';
'require form';
'require tools.widgets as widgets';
return view.extend({
render: function () {
const m = new form.Map('antiblock', _('Routes'));
const s = m.section(form.GridSection, 'route', _('Routes'), _('It is necessary to enter from 1 to 32 values:'));
s.optional = false;
s.anonymous = true;
s.addremove = true;
s.nodescriptions = true;
let o = s.option(widgets.DeviceSelect, 'gateway', _('Gateway'), _('Gateway'));
o.loopback = true;
o.nocreate = true;
o.noaliases = true;
o = s.option(form.Value, 'domains_path', _('Domains path'), _('Domains path/URL. If you want to add domains via LuCI, specify the files in the /etc/antiblock folder.'));
o.default = '/etc/antiblock/';
o = s.option(form.Flag, 'enabled', _('Enable'));
o.default = o.enabled;
o.editable = true;
return m.render();
}
});