liquid_feedback_frontend

changeset 1679:ac45e0fe1221

Automatically assume dropdown item id from name when id is empty
author bsw
date Mon Sep 20 09:02:57 2021 +0200 (2021-09-20)
parents 50b9d23dcbde
children 6f28933dbc36
files app/main/registration/_register_form.lua
line diff
     1.1 --- a/app/main/registration/_register_form.lua	Tue Jun 15 10:34:39 2021 +0200
     1.2 +++ b/app/main/registration/_register_form.lua	Mon Sep 20 09:02:57 2021 +0200
     1.3 @@ -109,6 +109,9 @@
     1.4      elseif field.type == "dropdown" then
     1.5        local options = { { id = "", name = "" } }
     1.6        for i_options, option in ipairs(field.options) do
     1.7 +        if not option.id then
     1.8 +          option.id = option.name
     1.9 +        end
    1.10          table.insert(options, option)
    1.11        end
    1.12        ui.tag{ tag = "label", attr = { style = "vertical-align: bottom; border-bottom: 1px solid rgba(0,0,0, 0.12); color: #777; font-size: 16px;" }, content = field.label .. ":" }

Impressum / About Us