liquid_feedback_frontend
changeset 1375:f6b61b418d8a
Made checkbox material design
author | bsw |
---|---|
date | Wed Aug 08 17:20:03 2018 +0200 (2018-08-08) |
parents | 866021907392 |
children | 2ff3ae341a6e |
files | app/main/registration/_register_form.lua |
line diff
1.1 --- a/app/main/registration/_register_form.lua Wed Aug 08 17:17:05 2018 +0200 1.2 +++ b/app/main/registration/_register_form.lua Wed Aug 08 17:20:03 2018 +0200 1.3 @@ -92,15 +92,29 @@ 1.4 slot.put(" ") 1.5 ui.tag{ tag = "input", attr = { type = "file", name = "verification_data_" .. field.name } } 1.6 if field.optional_checkbox then 1.7 - ui.container{ content = function() 1.8 - ui.tag{ tag = "input", attr = { 1.9 - type = "checkbox", 1.10 - name = "verification_data_" .. field.name .. "_optout", 1.11 - checked = request.get_param{ name = "verification_data_" .. field.name .. "_optout" } and "checked" or nil, 1.12 - } } 1.13 - slot.put(" ") 1.14 - ui.tag{ content = field.optional_checkbox } 1.15 - end } 1.16 + ui.tag{ tag = "label", attr = { 1.17 + class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect", 1.18 + ["for"] = "verification_data_" .. field.name .. "_optout" 1.19 + }, 1.20 + content = function() 1.21 + ui.tag{ 1.22 + tag = "input", 1.23 + attr = { 1.24 + type = "checkbox", 1.25 + class = "mdl-checkbox__input", 1.26 + id = "verification_data_" .. field.name .. "_optout", 1.27 + name = "verification_data_" .. field.name .. "_optout", 1.28 + value = "1", 1.29 + style = "float: left;", 1.30 + checked = request.get_param{ name = "verification_data_" .. field.name .. "_optout" } and "checked" or nil, 1.31 + } 1.32 + } 1.33 + ui.tag{ 1.34 + attr = { class = "mdl-checkbox__label" }, 1.35 + content = field.optional_checkbox 1.36 + } 1.37 + end 1.38 + } 1.39 end 1.40 1.41 elseif field.name == "unit" then