Bugzilla – Attachment 30163 Details for
Bug 11888
Random password suggestion does not work twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11888: Random password suggestion does not work twice
PASSED-QA-Bug-11888-Random-password-suggestion-doe.patch (text/plain), 3.37 KB, created by
Katrin Fischer
on 2014-07-27 21:48:50 UTC
(
hide
)
Description:
[PASSED QA] Bug 11888: Random password suggestion does not work twice
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-27 21:48:50 UTC
Size:
3.37 KB
patch
obsolete
>From adcbbb3bac8c1b9d355eb51466018980dbfa051a Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Juhani=20Sepp=C3=A4l=C3=A4?= <jseppal@student.uef.fi> >Date: Thu, 17 Jul 2014 11:45:06 +0300 >Subject: [PATCH] [PASSED QA] Bug 11888: Random password suggestion does not > work twice >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds a simple ajax-call to pull a new suggested password >from the same perl script. > >To test: >1) Search for a patron and select "Change password" from the moremember-view. >2) In the member-password-view, click on "Click to fill with a randomly generated suggestion". >3) Confirm that you get a new suggested password and click the same link again. >4) Note that you do not get another suggested password - nothing is happening. >5) Apply patch. >6) Repeat steps 1-3 and confirm that you can keep clicking for a new suggested password. > >Patch works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script. Works as desribed. >--- > .../prog/en/modules/members/member-password.tt | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >index d035a6d..96544e0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt >@@ -14,10 +14,24 @@ > }); > $("body").on('click', "#fillrandom",function(e) { > e.preventDefault(); >- $("#newpassword").after("<input type=\"text\" name=\"newpassword\" value=\"[% defaultnewpassword %]\">").remove(); >- $("#newpassword2").after("<input type=\"text\" name=\"newpassword2\" value=\"[% defaultnewpassword %]\">").remove(); >+ $.get("/cgi-bin/koha/members/member-password.pl?member=[% userid %]", function(response) { >+ var defaultnewpass = $(response).find("#defaultnewpassfield").val(); >+ $("#newpassword").after("<input type=\"text\" name=\"newpassword\" id=\"newpassword\" value=\"" + defaultnewpass + "\">").remove(); >+ $("#newpassword2").after("<input type=\"text\" name=\"newpassword2\" id=\"newpassword2\" value=\"" + defaultnewpass + "\">").remove(); >+ }); > }); > $("div.hint").eq(0).after(" <div class=\"hint\"><a href=\"#\" id=\"fillrandom\">"+_("Click to fill with a randomly generated suggestion. ")+"<strong>"+_("Passwords will be displayed as text")+"</strong>.</a></div>"); >+ >+ $(document).ajaxStart(function () { >+ $("input[name^=newpassword]").hide(); >+ $("label[for=newpassword2]").hide(); >+ $(".hint:last").after($(".loading").show()); >+ }); >+ $(document).ajaxStop(function () { >+ $("input[name^=newpassword]").show(); >+ $("label[for=newpassword2]").show(); >+ $(".loading").hide(); >+ }); > }); > //]]> > </script> >@@ -91,7 +105,8 @@ > > </div> > </div> >- >+<input type="hidden" name="defaultnewpassfield" id="defaultnewpassfield" value="[% defaultnewpassword %]" /> >+<div class="loading hide"><strong>Processing...</strong><img src="[% interface %]/[% theme %]/img/loading.gif" alt="" /></div> > <div class="yui-b"> > [% INCLUDE 'circ-menu.inc' %] > </div> >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11888
:
29781
|
30011
|
30146
| 30163