30 lines
731 B
Lua
30 lines
731 B
Lua
--- @module add_child_org
|
|
-- Adds a child org
|
|
|
|
local add_child_org = {
|
|
name = "Add child org",
|
|
slug = "add_child_org",
|
|
desc = "Create a child org within the current one"
|
|
}
|
|
add_child_org.data = {
|
|
}
|
|
add_child_org.config = {
|
|
}
|
|
|
|
-- @function initiate
|
|
function add_child_org:initiate(result)
|
|
modpol.interactions.text_query(
|
|
self.initiator,"Child org name: ",
|
|
function(input)
|
|
self.org:add_org(input, self.initiator)
|
|
modpol.interactions.message_org(
|
|
self.initiator,
|
|
self.org.id,
|
|
"Child org created: "..input)
|
|
modpol.interactions.dashboard(self.initiator)
|
|
end)
|
|
end
|
|
|
|
--- (Required) Add to module table
|
|
modpol.modules.add_child_org = add_child_org
|