Lines 14-23
Link Here
|
14 |
}); |
14 |
}); |
15 |
$("body").on('click', "#fillrandom",function(e) { |
15 |
$("body").on('click', "#fillrandom",function(e) { |
16 |
e.preventDefault(); |
16 |
e.preventDefault(); |
17 |
$("#newpassword").after("<input type=\"text\" name=\"newpassword\" value=\"[% defaultnewpassword %]\">").remove(); |
17 |
$.get("/cgi-bin/koha/members/member-password.pl?member=[% userid %]", function(response) { |
18 |
$("#newpassword2").after("<input type=\"text\" name=\"newpassword2\" value=\"[% defaultnewpassword %]\">").remove(); |
18 |
var defaultnewpass = $(response).find("#defaultnewpassfield").val(); |
|
|
19 |
$("#newpassword").after("<input type=\"text\" name=\"newpassword\" id=\"newpassword\" value=\"" + defaultnewpass + "\">").remove(); |
20 |
$("#newpassword2").after("<input type=\"text\" name=\"newpassword2\" id=\"newpassword2\" value=\"" + defaultnewpass + "\">").remove(); |
21 |
}); |
19 |
}); |
22 |
}); |
20 |
$("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>"); |
23 |
$("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>"); |
|
|
24 |
|
25 |
$(document).ajaxStart(function () { |
26 |
$("input[name^=newpassword]").hide(); |
27 |
$("label[for=newpassword2]").hide(); |
28 |
$(".hint:last").after($(".loading").show()); |
29 |
}); |
30 |
$(document).ajaxStop(function () { |
31 |
$("input[name^=newpassword]").show(); |
32 |
$("label[for=newpassword2]").show(); |
33 |
$(".loading").hide(); |
34 |
}); |
21 |
}); |
35 |
}); |
22 |
//]]> |
36 |
//]]> |
23 |
</script> |
37 |
</script> |
Lines 91-97
Link Here
|
91 |
|
105 |
|
92 |
</div> |
106 |
</div> |
93 |
</div> |
107 |
</div> |
94 |
|
108 |
<input type="hidden" name="defaultnewpassfield" id="defaultnewpassfield" value="[% defaultnewpassword %]" /> |
|
|
109 |
<div class="loading hide"><strong>Processing...</strong><img src="[% interface %]/[% theme %]/img/loading.gif" alt="" /></div> |
95 |
<div class="yui-b"> |
110 |
<div class="yui-b"> |
96 |
[% INCLUDE 'circ-menu.inc' %] |
111 |
[% INCLUDE 'circ-menu.inc' %] |
97 |
</div> |
112 |
</div> |
98 |
- |
|
|