luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/uhttpd.js
Jo-Philipp Wich 58f7b27adf luci-mod-system: uhttpd.js: remove flag option overrides
Use standard 0/1 values for the `redirect_https` option.

Supersedes: #6332
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-04-28 23:52:45 +02:00

19 lines
697 B
JavaScript

'use strict';
'require view';
'require form';
return view.extend({
render: function() {
var m, s, o;
m = new form.Map('uhttpd', _('HTTP(S) Access'), _('uHTTPd offers <abbr title="Hypertext Transfer Protocol">HTTP</abbr> or <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr> network access.'));
s = m.section(form.NamedSection, 'main', 'uhttpd', _('Settings'));
s.addremove = false;
o = s.option(form.Flag, 'redirect_https', _('Redirect to HTTPS'), _('Enable automatic redirection of <abbr title="Hypertext Transfer Protocol">HTTP</abbr> requests to <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr> port.'));
o.rmempty = false;
return m.render();
}
});