webmcp
diff framework/env/ui/multiselect.lua @ 35:81dfcfd960ed
fix cases where container html attrs could not be set
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Thu Oct 07 00:28:47 2010 +0200 (2010-10-07) |
parents | 9fdfb27f8e67 |
children |
line diff
1.1 --- a/framework/env/ui/multiselect.lua Wed Oct 06 16:14:33 2010 +0200 1.2 +++ b/framework/env/ui/multiselect.lua Thu Oct 07 00:28:47 2010 +0200 1.3 @@ -2,6 +2,7 @@ 1.4 ui.multiselect{ 1.5 name = name, -- HTML name ('html_name' is NOT a valid argument for this function) 1.6 container_attr = container_attr, -- extra HTML attributes for the container (div) enclosing field and label 1.7 + container2_attr = container2_attr, -- extra HTML attributes for the container (div) of the real element (in checkbox case only) 1.8 attr = attr, -- extra HTML attributes for the field 1.9 label = label, -- text to be used as label for the input field 1.10 label_attr = label_attr, -- extra HTML attributes for the label 1.11 @@ -122,9 +123,9 @@ 1.12 record[args.foreign_name], 1.13 args.format_options 1.14 ), 1.15 - attr = { class = "ui_checkbox_div" }, 1.16 + attr = args.container2_attr or { class = "ui_checkbox_div" }, 1.17 label_for = attr.id, 1.18 - label_attr = { class = "ui_checkbox_label" }, 1.19 + label_attr = args.label_attr or { class = "ui_checkbox_label" }, 1.20 content_first = true, 1.21 content = function() 1.22 ui.tag{ tag = "input", attr = attr }