Skip to content
Snippets Groups Projects
Unverified Commit 603912dd authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-config-mode-contact-info: restore datatype definition

optional = true does not make sense without a datatype. When no datatype is
set, the empty string will be a valid value, so data is never unset in the
write function. Restore the minlength(1) datatype so the contact setting is
deleted as intended when no value is provided.
parent b8fa1b2a
Branches
Tags
No related merge requests found
......@@ -16,6 +16,7 @@ return function(form, uci)
local o = s:option(Value, "contact", pkg_i18n.translate("Contact info"), pkg_i18n.translate("e.g. E-mail or phone number"))
o.default = uci:get("gluon-node-info", owner, "contact")
o.datatype = 'minlength(1)'
o.optional = true
function o:write(data)
uci:set("gluon-node-info", owner, "contact", data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment