Comparison

plugins/mod_admin_adhoc.lua @ 6461:6b38bfaafe0c

mod_admin_adhoc: Mark 'accountjids' field as required in 'end user sessions' command (thanks Lloyd)
author Kim Alvefur <zash@zash.se>
date Mon, 29 Sep 2014 11:02:06 +0200
parent 5721:579c51cbc12c
child 6462:fcff8fa495d4
comparison
equal deleted inserted replaced
6401:e3de64f7c44d 6461:6b38bfaafe0c
160 local end_user_session_layout = dataforms_new{ 160 local end_user_session_layout = dataforms_new{
161 title = "Ending a User Session"; 161 title = "Ending a User Session";
162 instructions = "Fill out this form to end a user's session."; 162 instructions = "Fill out this form to end a user's session.";
163 163
164 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" }; 164 { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" };
165 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions" }; 165 { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions", required = true };
166 }; 166 };
167 167
168 local end_user_session_handler = adhoc_simple(end_user_session_layout, function(fields, err) 168 local end_user_session_handler = adhoc_simple(end_user_session_layout, function(fields, err)
169 if err then 169 if err then
170 return generate_error_message(err); 170 return generate_error_message(err);