|
@@ -103,7 +103,7 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
|
|
if org_name ~= "View..." then
|
|
if org_name ~= "View..." then
|
|
modpol.interactions.org_dashboard(
|
|
modpol.interactions.org_dashboard(
|
|
pname, org_name)
|
|
pname, org_name)
|
|
- end
|
|
|
|
|
|
+ end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
@@ -126,7 +126,7 @@ function modpol.interactions.org_dashboard(user, org_string)
|
|
end
|
|
end
|
|
return ""
|
|
return ""
|
|
end
|
|
end
|
|
-
|
|
|
|
|
|
+
|
|
-- identify parent
|
|
-- identify parent
|
|
local parent = modpol.orgs.get_org(org.parent)
|
|
local parent = modpol.orgs.get_org(org.parent)
|
|
if parent then parent = parent.name
|
|
if parent then parent = parent.name
|
|
@@ -134,7 +134,7 @@ function modpol.interactions.org_dashboard(user, org_string)
|
|
|
|
|
|
-- prepare members menu
|
|
-- prepare members menu
|
|
local members = org.members
|
|
local members = org.members
|
|
-
|
|
|
|
|
|
+
|
|
-- prepare children menu
|
|
-- prepare children menu
|
|
local children = {}
|
|
local children = {}
|
|
for k,v in ipairs(org.children) do
|
|
for k,v in ipairs(org.children) do
|
|
@@ -210,7 +210,7 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
|
|
modpol.interactions.dashboard(pname)
|
|
modpol.interactions.dashboard(pname)
|
|
elseif fields.refresh then
|
|
elseif fields.refresh then
|
|
modpol.interactions.org_dashboard(pname, org.name)
|
|
modpol.interactions.org_dashboard(pname, org.name)
|
|
-
|
|
|
|
|
|
+
|
|
-- Put all dropdowns at the end
|
|
-- Put all dropdowns at the end
|
|
-- Receiving modules
|
|
-- Receiving modules
|
|
elseif fields.members
|
|
elseif fields.members
|
|
@@ -245,7 +245,7 @@ minetest.register_on_player_receive_fields(function (player, formname, fields)
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
end
|
|
end
|
|
-
|
|
|
|
|
|
+
|
|
-- Receiving pending
|
|
-- Receiving pending
|
|
elseif fields.pending
|
|
elseif fields.pending
|
|
and fields.pending ~= "View..." then
|
|
and fields.pending ~= "View..." then
|
|
@@ -376,7 +376,7 @@ function modpol.interactions.display(
|
|
end
|
|
end
|
|
return
|
|
return
|
|
end
|
|
end
|
|
- -- set up formspec
|
|
|
|
|
|
+ -- set up formspec
|
|
local formspec = {
|
|
local formspec = {
|
|
"formspec_version[4]",
|
|
"formspec_version[4]",
|
|
"size[10,8]",
|
|
"size[10,8]",
|
|
@@ -409,7 +409,7 @@ function modpol.interactions.text_query(user, query, func)
|
|
"formspec_version[4]",
|
|
"formspec_version[4]",
|
|
"size[10,4]",
|
|
"size[10,4]",
|
|
"label[0.5,1;", minetest.formspec_escape(query), "]",
|
|
"label[0.5,1;", minetest.formspec_escape(query), "]",
|
|
- "field[0.5,1.25;9,0.8;input;;]",
|
|
|
|
|
|
+ "field[0.5,1.25;9,0.8;input;;]",
|
|
"button[0.5,2.5;1,0.8;yes;OK]",
|
|
"button[0.5,2.5;1,0.8;yes;OK]",
|
|
}
|
|
}
|
|
local formspec_string = table.concat(formspec, "")
|
|
local formspec_string = table.concat(formspec, "")
|
|
@@ -461,7 +461,7 @@ end
|
|
-- receive fields
|
|
-- receive fields
|
|
minetest.register_on_player_receive_fields(function (player, formname, fields)
|
|
minetest.register_on_player_receive_fields(function (player, formname, fields)
|
|
if formname == "modpol:dropdown_query" then
|
|
if formname == "modpol:dropdown_query" then
|
|
- local pname = player:get_player_name()
|
|
|
|
|
|
+ local pname = player:get_player_name()
|
|
if fields.cancel then
|
|
if fields.cancel then
|
|
minetest.close_formspec(pname, formname)
|
|
minetest.close_formspec(pname, formname)
|
|
elseif fields.input == "View..." then
|
|
elseif fields.input == "View..." then
|