# HG changeset patch # User bsw # Date 1533217038 -7200 # Node ID 58d2df732fc0aea99c9d9c8e16728842faebf855 # Parent 9cf8b4161fa025c827fb7ba39cc42e58744021f1 Do not show categories not used in registration overview diff -r 9cf8b4161fa0 -r 58d2df732fc0 app/main/registration_admin/index.lua --- a/app/main/registration_admin/index.lua Thu Aug 02 15:34:08 2018 +0200 +++ b/app/main/registration_admin/index.lua Thu Aug 02 15:37:18 2018 +0200 @@ -45,24 +45,37 @@ ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "manual_requested", step = 2 }, content = _("Manual verification requested during step 2 (#{count})", { count = count }) } end } - local count = Verification:new_selector() - :add_where("verified_member_id ISNULL") - :add_where("denied ISNULL") - :add_where("comment ilike '% sent'") - :count() - ui.tag{ tag = "li", content = function() - ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "pin_sent" }, content = _("PIN code not entered (yet) (#{count})", { count = count }) } - end } + if config.self_registration.sms_id then + local count = Verification:new_selector() + :add_where("verified_member_id ISNULL") + :add_where("denied ISNULL") + :add_where("comment ilike '% sent'") + :count() + ui.tag{ tag = "li", content = function() + ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "pin_sent" }, content = _("PIN code not entered (yet) (#{count})", { count = count }) } + end } + + local count = Verification:new_selector() + :add_where("verified_member_id ISNULL") + :add_where("denied ISNULL") + :add_where("comment ilike '%user entered invalid PIN three times'") + :count() + ui.tag{ tag = "li", content = function() + ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "invalid_pin" }, content = _("Invalid PIN entered (#{count})", { count = count }) } + end } + end - local count = Verification:new_selector() - :add_where("verified_member_id ISNULL") - :add_where("denied ISNULL") - :add_where("comment similar to '%fiscal code does not match[^/]*'") - :count() - ui.tag{ tag = "li", content = function() - ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "fiscal_code" }, content = _("Fiscal code does not match (#{count})", { count = count }) } - end } - + if config.self_registration.check_for_italian_fiscal_code then + local count = Verification:new_selector() + :add_where("verified_member_id ISNULL") + :add_where("denied ISNULL") + :add_where("comment similar to '%fiscal code does not match[^/]*'") + :count() + ui.tag{ tag = "li", content = function() + ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "fiscal_code" }, content = _("Fiscal code does not match (#{count})", { count = count }) } + end } + end + local count = Verification:new_selector() :add_where("verified_member_id ISNULL") :add_where("denied ISNULL") @@ -81,14 +94,6 @@ ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "identification" }, content = _("Identification used before (#{count})", { count = count }) } end } - local count = Verification:new_selector() - :add_where("verified_member_id ISNULL") - :add_where("denied ISNULL") - :add_where("comment ilike '%user entered invalid PIN three times'") - :count() - ui.tag{ tag = "li", content = function() - ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "invalid_pin" }, content = _("Invalid PIN entered (#{count})", { count = count }) } - end } local count = Verification:new_selector() :add_where("verified_member_id ISNULL")