# HG changeset patch # User bsw # Date 1533740967 -7200 # Node ID 5656b86cd2cf5f5414cd731dc79fe059979bd1af # Parent 378c20a2e6f0f63b9295daa22e8c625dcad33f25 Optional optout for image upload diff -r 378c20a2e6f0 -r 5656b86cd2cf app/main/registration/_register_form.lua --- a/app/main/registration/_register_form.lua Mon Aug 06 14:18:15 2018 +0200 +++ b/app/main/registration/_register_form.lua Wed Aug 08 17:09:27 2018 +0200 @@ -90,6 +90,13 @@ elseif field.type == "image" then ui.tag{ tag = "label", content = field.label } ui.tag{ tag = "input", attr = { type = "file", name = "verification_data_" .. field.name } } + if field.optional_checkbox then + ui.field.boolean{ + name = "verification_data_" .. field.name .. "_optout", + value = request.get_param{ name = "verification_data_" .. field.name .. "_optout" } and true or false, + label = field.optional_checkbox + } + end elseif field.name == "unit" then local units_selector = Unit:new_selector()