Bugzilla – Attachment 69797 Details for
Bug 19514
No Password restrictions in onboarding tool patron creation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19514: Add client-side check
Bug-19514-Add-client-side-check.patch (text/plain), 3.22 KB, created by
Josef Moravec
on 2017-12-14 10:38:45 UTC
(
hide
)
Description:
Bug 19514: Add client-side check
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-12-14 10:38:45 UTC
Size:
3.22 KB
patch
obsolete
>From 8af1d02eef974566e87185f5ca16cb723afd2dde Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 6 Nov 2017 12:22:59 -0300 >Subject: [PATCH] Bug 19514: Add client-side check > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/InstallAuth.pm | 4 ++++ > .../prog/en/modules/onboarding/onboardingstep3.tt | 3 +++ > koha-tmpl/intranet-tmpl/prog/js/onboarding.js | 18 ++++++++++++++++++ > 3 files changed, 25 insertions(+) > >diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm >index 92d5d98..9d285bd 100644 >--- a/C4/InstallAuth.pm >+++ b/C4/InstallAuth.pm >@@ -149,6 +149,10 @@ sub get_template_and_user { > $template->param( CAN_user_serials => 1 ); > $template->param( CAN_user_reports => 1 ); > } >+ >+ my $minPasswordLength = C4::Context->preference('minPasswordLength'); >+ $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3; >+ $template->param(minPasswordLength => $minPasswordLength,); > } > return ( $template, $borrowernumber, $cookie ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >index 67a8c9b..a812b08 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Web installer › Create Koha administrator patron</title> > [% INCLUDE 'installer-doc-head-close.inc' %] >@@ -112,3 +113,5 @@ > </div> <!-- / .row --> > > [% INCLUDE 'intranet-bottom.inc' %] >+[% PROCESS 'password_check.inc' %] >+[% PROCESS 'add_password_check' new_password => 'password' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >index 4816dfd..93cb010 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >@@ -1,5 +1,17 @@ > function _(s) { return s; } // dummy function for gettext > >+// http://stackoverflow.com/questions/1038746/equivalent-of-string-format-in-jquery/5341855#5341855 >+String.prototype.format = function() { return formatstr(this, arguments); }; >+function formatstr(str, col) { >+ col = typeof col === 'object' ? col : Array.prototype.slice.call(arguments, 1); >+ var idx = 0; >+ return str.replace(/%%|%s|%(\d+)\$s/g, function (m, n) { >+ if (m == "%%") { return "%"; } >+ if (m == "%s") { return col[idx++]; } >+ return col[n]; >+ }); >+} >+ > jQuery.validator.addMethod( "category_code_check", function(value,element){ > var patt = /^[A-Za-z0-9]{0,10}$/g; > if (patt.test(element.value)) { >@@ -114,6 +126,12 @@ $(document).ready(function() { > required: true > }, > password: { >+ required: true, >+ password_strong: true, >+ password_no_spaces: true >+ }, >+ password2: { >+ required: true, > password_match: true > } > }, >-- >2.1.4
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 19514
:
68386
|
68387
|
68982
|
69208
|
69209
|
69796
| 69797