liquid_feedback_frontend
changeset 1423:4232b30dfb11
Allow additional comments in registration form
author | bsw |
---|---|
date | Thu Sep 20 13:49:19 2018 +0200 (2018-09-20) |
parents | 6c9729cbff73 |
children | 5530cce896d6 |
files | app/main/registration/_action/register.lua app/main/registration/_register_form.lua |
line diff
1.1 --- a/app/main/registration/_action/register.lua Tue Sep 04 10:11:01 2018 +0200 1.2 +++ b/app/main/registration/_action/register.lua Thu Sep 20 13:49:19 2018 +0200 1.3 @@ -113,7 +113,7 @@ 1.4 verification.request_data = json.object() 1.5 1.6 for i, field in ipairs(config.self_registration.fields) do 1.7 - if not field.internal then 1.8 + if not field.internal and field.type ~= "comment" then 1.9 if field.name == "date_of_birth" then 1.10 local day = tonumber(param.get("verification_data_" .. field.name .. "_day")) 1.11 local month = tonumber(param.get("verification_data_" .. field.name .. "_month"))
2.1 --- a/app/main/registration/_register_form.lua Tue Sep 04 10:11:01 2018 +0200 2.2 +++ b/app/main/registration/_register_form.lua Thu Sep 20 13:49:19 2018 +0200 2.3 @@ -8,7 +8,9 @@ 2.4 class = " is-invalid" 2.5 end 2.6 if not field.internal then 2.7 - if field.name == "date_of_birth" then 2.8 + if field.type == "comment" then 2.9 + ui.tag { content = field.label } 2.10 + elseif field.name == "date_of_birth" then 2.11 local label = field.label 2.12 if field.optional then 2.13 label = label .. config.self_registration.optional_field_indicator