gluon-web-model: fix conflicting table fields "reset"

With 11a3b56617 ("gluon-web-model: add dependency support for
sections"), a "reset" function was added to all model nodes. This
conflicts with the "reset" field of the Form object, making reset
buttons show labels like "function: 0xbb8d50" and possibly breaking form
processing when packages override the reset field.
This commit is contained in:
Matthias Schiffer 2020-06-06 17:23:09 +02:00
parent 45b518df11
commit e8c65ef75f
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -72,9 +72,9 @@ function Node:id()
return prefix.."."..self:id_suffix() return prefix.."."..self:id_suffix()
end end
function Node:reset() function Node:reset_node()
for _, child in ipairs(self.children) do for _, child in ipairs(self.children) do
child:reset() child:reset_node()
end end
end end
@ -154,7 +154,7 @@ function Node:resolve_node_depends()
if valid then return false end if valid then return false end
end end
self:reset() self:reset_node()
return true return true
end end
@ -206,7 +206,7 @@ function AbstractValue:cfgvalue()
end end
end end
function AbstractValue:reset() function AbstractValue:reset_node()
self.data = nil self.data = nil
self.error = false self.error = false
self.state = M.FORM_NODATA self.state = M.FORM_NODATA