mod_admin_adhoc: Keep options for list-single in 'options' field where they belong
authorKim Alvefur <zash@zash.se>
Fri, 03 Aug 2018 20:48:23 +0200
changeset 9088 9bd38bbf8623
parent 9087 572b6858db03
child 9089 74b4be5afb74
mod_admin_adhoc: Keep options for list-single in 'options' field where they belong Would previously not work due to #1177
plugins/mod_admin_adhoc.lua
--- a/plugins/mod_admin_adhoc.lua	Fri Aug 03 18:35:00 2018 +0200
+++ b/plugins/mod_admin_adhoc.lua	Fri Aug 03 20:48:23 2018 +0200
@@ -325,7 +325,7 @@
 
 	{ name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
 	{ name = "max_items", type = "list-single", label = "Maximum number of users",
-		value = { "25", "50", "75", "100", "150", "200", "all" } };
+		options = { "25", "50", "75", "100", "150", "200", "all" } };
 	{ name = "details", type = "boolean", label = "Show details" };
 };
 
@@ -647,7 +647,10 @@
 
 	{ name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
 	{ name = "delay", type = "list-single", label = "Time delay before shutting down",
-		value = { {label = "30 seconds", value = "30"},
+		value = "5",
+		options = {
+				{label = "5 seconds", value = "5"},
+				{label = "30 seconds", value = "30"},
 			  {label = "60 seconds", value = "60"},
 			  {label = "90 seconds", value = "90"},
 			  {label = "2 minutes", value = "120"},