liquid_feedback_frontend

changeset 1329:1a55c68445d4

Allow empty selection for unit registration field
author bsw
date Fri Aug 03 17:07:06 2018 +0200 (2018-08-03)
parents 136d08af1529
children 8af26e885745
files app/main/registration/_register_form.lua
line diff
     1.1 --- a/app/main/registration/_register_form.lua	Fri Aug 03 17:05:27 2018 +0200
     1.2 +++ b/app/main/registration/_register_form.lua	Fri Aug 03 17:07:06 2018 +0200
     1.3 @@ -93,6 +93,12 @@
     1.4        units_selector:add_where(field.where)
     1.5      end
     1.6      local units = units_selector:exec()
     1.7 +    if field.optional then
     1.8 +      table.insert(units, {
     1.9 +        id = "",
    1.10 +        name = _"None"
    1.11 +      })
    1.12 +    end
    1.13      ui.field.select{
    1.14        label = field.label,
    1.15        foreign_records = units,

Impressum / About Us