Commits

Daniel Poelzleithner committed 81dfcfd

fix cases where container html attrs could not be set

Comments (0)

Files changed (2)

framework/env/ui/multiselect.lua

 ui.multiselect{
   name               = name,                -- HTML name ('html_name' is NOT a valid argument for this function)
   container_attr     = container_attr,      -- extra HTML attributes for the container (div) enclosing field and label
+  container2_attr    = container2_attr,     -- extra HTML attributes for the container (div) of the real element (in checkbox case only)
   attr               = attr,                -- extra HTML attributes for the field
   label              = label,               -- text to be used as label for the input field
   label_attr         = label_attr,          -- extra HTML attributes for the label
             record[args.foreign_name],
             args.format_options
           ),
-          attr          = { class = "ui_checkbox_div" },
+          attr          = args.container2_attr or { class = "ui_checkbox_div" },
           label_for     = attr.id,
-          label_attr    = { class = "ui_checkbox_label" },
+          label_attr    = args.label_attr or { class = "ui_checkbox_label" },
           content_first = true,
           content       = function()
             ui.tag{ tag  = "input", attr = attr }

framework/env/ui/paginate.lua

 --[[--
 ui.paginate{
-  selector = selector,  -- a selector for items from the database
-  per_page = per_page,  -- items per page, defaults to 10
-  name     = name,      -- name of the CGI get variable, defaults to "page"
-  page     = page,      -- directly specify a page, and ignore 'name' parameter
-  content = function()
+  selector            = selector,        -- a selector for items from the database
+  per_page            = per_page,        -- items per page, defaults to 10
+  container_attr      = container_attr   -- html attr for the container element
+  name                = name,            -- name of the CGI get variable, defaults to "page"
+  page                = page,            -- directly specify a page, and ignore 'name' parameter
+  content             = function()
     ...                 -- code block which should be encapsulated with page selection links
   end
 }
     end
   end
   ui.container{
-    attr = { class = 'ui_paginate' },
+    attr = args.container_attr or { class = 'ui_paginate' },
     content = function()
       ui.container{
         attr = { class = 'ui_paginate_head ui_paginate_select' },