summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-03-03 15:17:44 +0000
committerTed Trask <ttrask01@yahoo.com>2014-03-03 15:17:44 +0000
commit252846069d9ecc3579f64ed0e0548c79b2faefdc (patch)
tree6cce59fed2119c60a45324d09dcb76fa898b907d /app
parent63544eda8d5d0c398f21e46c5a6d2b9316126631 (diff)
downloadacf-core-252846069d9ecc3579f64ed0e0548c79b2faefdc.tar.bz2
acf-core-252846069d9ecc3579f64ed0e0548c79b2faefdc.tar.xz
Fix HTML multi select to use select instead of series of checkboxes
Diffstat (limited to 'app')
-rw-r--r--app/acf_www-controller.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index bc0c139..53e837b 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -607,7 +607,7 @@ mymodule.handle_clientdata = function(form, clientdata)
elseif value.type == "boolean" then
--- HTML forms simply don't include checkboxes unless they're checked
value.value = (clientdata[name] ~= nil) and (clientdata[name] ~= "false")
- elseif value.type == "multi" then
+--[[ elseif value.type == "multi" then
-- FIXME this is because multi selects don't work in haserl
-- Multi-selects are implemented as checkboxes, so if none exists, it means nothing is selected
local oldtable = clientdata[name] or {}
@@ -619,9 +619,10 @@ mymodule.handle_clientdata = function(form, clientdata)
end
end
value.value = newtable
+--]]
elseif clientdata[name] then
-- The other types will be returned in clientdata even if set to blank, so if no result, leave the default
- if value.type == "list" then
+ if value.type == "list" or value.type == "multi" then
value.value = {}
if clientdata[name] ~= "" then
-- for www we use \r separated list