Comparison

plugins/mod_admin_adhoc.lua @ 6464:737c81bd898e

Merge 0.9->0.10
author Kim Alvefur <zash@zash.se>
date Sun, 05 Oct 2014 15:37:21 +0200
parent 6458:f906b803dc42
parent 6462:fcff8fa495d4
child 6627:c6e025411baa
comparison
equal deleted inserted replaced
6460:6d3187f24608 6464:737c81bd898e
117 local delete_user_layout = dataforms_new{ 117 local delete_user_layout = dataforms_new{
118 title = "Deleting a User"; 118 title = "Deleting a User";
119 instructions = "Fill out this form to delete a user."; 119 instructions = "Fill out this form to delete a user.";
120 120
121 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" }; 121 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
122 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) to delete" }; 122 { name = "accountjids", type = "jid-multi", required = true, label = "The Jabber ID(s) to delete" };
123 }; 123 };
124 124
125 local delete_user_command_handler = adhoc_simple(delete_user_layout, function(fields, err) 125 local delete_user_command_handler = adhoc_simple(delete_user_layout, function(fields, err)
126 if err then 126 if err then
127 return generate_error_message(err); 127 return generate_error_message(err);
161 local end_user_session_layout = dataforms_new{ 161 local end_user_session_layout = dataforms_new{
162 title = "Ending a User Session"; 162 title = "Ending a User Session";
163 instructions = "Fill out this form to end a user's session."; 163 instructions = "Fill out this form to end a user's session.";
164 164
165 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" }; 165 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
166 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions" }; 166 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions", required = true };
167 }; 167 };
168 168
169 local end_user_session_handler = adhoc_simple(end_user_session_layout, function(fields, err) 169 local end_user_session_handler = adhoc_simple(end_user_session_layout, function(fields, err)
170 if err then 170 if err then
171 return generate_error_message(err); 171 return generate_error_message(err);