From 4e013520c5eb82c5d0cc70a82c331204984903ff Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 23 Aug 2021 18:14:26 +0200 Subject: [PATCH] Fix forms issues --- www/form/inner.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/www/form/inner.js b/www/form/inner.js index 150e80207..d16a2b474 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -1271,6 +1271,7 @@ define([ $el.find('input').each(function (i, input) { var $i = $(input); if (res[uid]) { return; } + res[uid] = undefined; if (Util.isChecked($i)) { res[uid] = $i.data('val'); } }); }); @@ -1420,7 +1421,10 @@ define([ }); return res; }, - reset: function () { $(tag).find('input').removeAttr('checked'); }, + reset: function () { + $(tag).find('input').removeAttr('checked'); + checkDisabled(); + }, setEditable: function (state) { if (state) { checkDisabled(); } else { $tag.find('input').attr('disabled', 'disabled'); } @@ -1543,7 +1547,10 @@ define([ }); return res; }, - reset: function () { $(tag).find('input').removeAttr('checked'); }, + reset: function () { + $(tag).find('input').removeAttr('checked'); + lines.forEach(checkDisabled); + }, setEditable: function (state) { if (state) { lines.forEach(checkDisabled); } else { $(tag).find('input').attr('disabled', 'disabled'); }