From 8496b9ba7f240f505b23ffcb220efdafa8fad8c7 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 22 Feb 2019 19:56:01 +0200 Subject: use checkboxes widget for choice sets --- aconf/model/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aconf/model/init.lua b/aconf/model/init.lua index bc401be..b5a496f 100644 --- a/aconf/model/init.lua +++ b/aconf/model/init.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2012-2016 Kaarle Ritvanen +Copyright (c) 2012-2019 Kaarle Ritvanen See LICENSE file for license details --]] @@ -308,7 +308,9 @@ function M.List:init(params) super(self, M.List):init(params, node.List) end -- @fclass Set M.Set = class(M.Collection) function M.Set:init(params) - if not params.widget and isinstance(params.type, M.Reference) then + if not params.widget and ( + params.type.choice or isinstance(params.type, M.Reference) + ) then params.widget = 'checkboxes' end super(self, M.Set):init(params, M.node.Set) -- cgit v1.2.3