liquid_feedback_frontend
diff app/main/draft/new.lua @ 1825:7b04f14c6d0a
Check area configuration only for new issues
author | bsw |
---|---|
date | Thu Feb 03 11:47:41 2022 +0100 (2022-02-03) |
parents | de3770da915e |
children | 71916d0badca |
line diff
1.1 --- a/app/main/draft/new.lua Thu Feb 03 11:37:06 2022 +0100 1.2 +++ b/app/main/draft/new.lua Thu Feb 03 11:47:41 2022 +0100 1.3 @@ -22,11 +22,6 @@ 1.4 end 1.5 end 1.6 1.7 -if #(area.allowed_policies) < 1 then 1.8 - slot.put_into("error", _"Subject area configuration invalid. Please contact the administrator.") 1.9 - return false 1.10 -end 1.11 - 1.12 local polling = param.get("polling", atom.boolean) 1.13 1.14 local policy_id = param.get("policy_id", atom.integer) 1.15 @@ -77,6 +72,12 @@ 1.16 return false 1.17 end 1.18 1.19 +if not initiative and not issue and #(area.allowed_policies) < 1 then 1.20 + slot.put_into("error", _"Subject area configuration invalid. Please contact the administrator.") 1.21 + return false 1.22 +end 1.23 + 1.24 + 1.25 ui.form{ 1.26 record = draft, 1.27 attr = { class = "vertical section", enctype = 'multipart/form-data' },