luci-app-firewall: store week- and monthday restrictions as strings
authorJo-Philipp Wich <jo@mein.io>
Sun, 29 Dec 2019 23:08:17 +0000 (00:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 29 Dec 2019 23:08:17 +0000 (00:08 +0100)
Fixes: FS#2661
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2661
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js

index f40e0c73e1b3f759ecb28fef12e937a5b5a6cf61..c98ffe98139cfac2238d3718154dd4def6dbf076 100644 (file)
@@ -349,12 +349,18 @@ return L.view.extend({
                o.value('Thu', _('Thursday'));
                o.value('Fri', _('Friday'));
                o.value('Sat', _('Saturday'));
+               o.write = function(section_id, value) {
+                       return this.super('write', [ section_id, L.toArray(value).join(' ') ]);
+               };
 
                o = s.taboption('timed', form.MultiValue, 'monthdays', _('Month Days'));
                o.modalonly = true;
                o.multiple = true;
                o.display_size = 15;
                o.placeholder = _('Any day');
+               o.write = function(section_id, value) {
+                       return this.super('write', [ section_id, L.toArray(value).join(' ') ]);
+               };
                for (var i = 1; i <= 31; i++)
                        o.value(i);