From 23db206ea1a9756ace8247b4cb8d157a350531ed Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Tue, 26 Oct 2010 03:47:14 +1000 Subject: [PATCH] * Add top-level instructions for x:data incompatible clients * Remove trailing dot --- src/mod_register.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mod_register.erl b/src/mod_register.erl index 4ace5d536..14588fa59 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -212,12 +212,17 @@ process_iq(From, To, {false, [], []} end, if IsCaptchaEnabled and not IsRegistered -> + TopInstrEl = {xmlelement, "instructions", [], + [{xmlcdata, + translate:translate( + Lang, "You need an x:data capable client " + "with CAPTCHA support to register")}]}, InstrEl = {xmlelement, "instructions", [], [{xmlcdata, translate:translate( Lang, "Choose a username and password " - "to register with this server.")}]}, + "to register with this server")}]}, UField = {xmlelement, "field", [{"type", "text-single"}, {"label", translate:translate(Lang, "User")}, @@ -234,7 +239,7 @@ process_iq(From, To, IQ#iq{type = result, sub_el = [{xmlelement, "query", [{"xmlns", "jabber:iq:register"}], - CaptchaEls}]}; + [TopInstrEl | CaptchaEls]}]}; error -> ErrText = "Unable to generate a captcha", IQ#iq{type = error,