Major improvements on policy configuration
- Bugfixes on change_policy - Replaced _consent modules with configurable modules
This commit is contained in:
@ -27,7 +27,11 @@ function modpol.interactions.get_policy_string(
|
||||
this_policy =
|
||||
tostring(this_org.policies[module_slug][k])
|
||||
else
|
||||
this_policy = tostring(v)
|
||||
if not v then
|
||||
this_policy = "none"
|
||||
else
|
||||
this_policy = tostring(v)
|
||||
end
|
||||
end
|
||||
table.insert(output, k.." - "..this_policy)
|
||||
end
|
||||
@ -207,6 +211,7 @@ function modpol.interactions.org_dashboard(user, org_string)
|
||||
org.name, module.slug, "\n")..
|
||||
"\n".."Proceed?",
|
||||
function(input)
|
||||
print("\n")
|
||||
if input == "Yes" then
|
||||
org:call_module(module_sel, user)
|
||||
elseif input == "No" then
|
||||
@ -468,10 +473,8 @@ function modpol.interactions.binary_poll_user(user, question, func)
|
||||
answer = io.read()
|
||||
until answer == "y" or answer == "n"
|
||||
if answer == "y" then
|
||||
modpol.interactions.message(user, "Response recorded")
|
||||
func("Yes")
|
||||
elseif answer == "n" then
|
||||
modpol.interactions.message(user, "Response recorded")
|
||||
func("No")
|
||||
else
|
||||
modpol.interactions.message(user, "Error: invalid response")
|
||||
|
Reference in New Issue
Block a user