Bug 14509: (follow-up) Reject invalid passwords

The members.js was not included in member-password.tt
And it cannot, there are specific code which cannot be used outside of
memberentry.tt

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
Jonathan Druart 2015-09-02 09:43:51 +01:00 committed by Tomas Cohen Arazi
parent 1b8f3194e9
commit 53dd856c66

View file

@ -3,6 +3,14 @@
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/JavaScript">
//<![CDATA[
function check_password( password ) {
if ( password.match(/^\s/) || password.match(/\s$/)) {
return false;
}
return true;
}
$(document).ready(function() {
var MSG_PASSWORD_CONTAINS_TRAILING_SPACES = _("Password contains leading and/or trailing spaces.");
$("#changepasswordf").submit(function(){