summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorSergey Ponomarev <stokito@gmail.com>2024-05-26 13:56:27 +0300
committerPaul Donald <newtwen+github@gmail.com>2024-06-06 00:09:03 +0200
commit43f60c3fad0672ed4cce54939d3c231a1f872a5e (patch)
treeb03f3bee2db1b643af4d3cfe8faa15fc028d3e78 /modules/luci-mod-system/htdocs/luci-static/resources
parent9068e947b0cc8dfa6e5092c7e9346df0e6ff9850 (diff)
luci-mod-system: Dropbear: remove custom flag values
Instead of saving 'on' or 'off' for flag values, use the default 1 and 0. This makes code simpler. Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Diffstat (limited to 'modules/luci-mod-system/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
index 45b9994cc6..24ed804413 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/dropbear.js
@@ -15,7 +15,7 @@ return view.extend({
s.addbtntitle = _('Add instance');
o = s.option(form.Flag, 'enable', _('Enable Instance'), _('Enable <abbr title="Secure Shell">SSH</abbr> service instance'));
- o.default = o.enabled;
+ o.default = true;
o = s.option(widgets.NetworkSelect, 'Interface', _('Interface'), _('Listen only on the given interface or, if unspecified, on all'));
o.nocreate = true;
@@ -25,20 +25,13 @@ return view.extend({
o.placeholder = 22;
o = s.option(form.Flag, 'PasswordAuth', _('Password authentication'), _('Allow <abbr title="Secure Shell">SSH</abbr> password authentication'));
- o.enabled = 'on';
- o.disabled = 'off';
- o.default = o.enabled;
+ o.default = true;
o.rmempty = false;
o = s.option(form.Flag, 'RootPasswordAuth', _('Allow root logins with password'), _('Allow the <em>root</em> user to log in with password'));
- o.enabled = 'on';
- o.disabled = 'off';
- o.default = o.enabled;
+ o.default = true;
o = s.option(form.Flag, 'GatewayPorts', _('Gateway Ports'), _('Allow remote hosts to connect to local SSH forwarded ports'));
- o.enabled = 'on';
- o.disabled = 'off';
- o.default = o.disabled;
return m.render();
}