Completed checkbox_query and rewrite of change_modules module with checkboxes
This commit is contained in:
@ -49,16 +49,14 @@ function change_modules:initiate(result)
|
||||
if v[2] ~= modules_before[i][2] then
|
||||
if v[2] then
|
||||
table.insert(self.data.add_modules, v[1])
|
||||
modpol.msg("add-insert: "..v[1])
|
||||
else
|
||||
table.insert(self.data.remove_modules, v[1])
|
||||
modpol.msg("remove-insert: "..v[1])
|
||||
end
|
||||
end
|
||||
end
|
||||
-- abort if no changes
|
||||
if self.data.add_modules == {}
|
||||
and self.data.remove_modules == {} then
|
||||
if #self.data.add_modules == 0
|
||||
and #self.data.remove_modules == 0 then
|
||||
modpol.interactions.message(
|
||||
self.initiator, "No module changes proposed")
|
||||
modpol.interactions.org_dashboard(
|
||||
@ -74,7 +72,7 @@ function change_modules:initiate(result)
|
||||
self.data.summary = self.data.summary.."\nAdd: "..
|
||||
table.concat(self.data.add_modules,", ")
|
||||
elseif #self.data.remove_modules > 0 then
|
||||
summary = "\nRemove: "..
|
||||
self.data.summary = "\nRemove: "..
|
||||
table.concat(self.data.remove_modules,", ")
|
||||
end
|
||||
self.org:call_module(
|
||||
|
Reference in New Issue
Block a user