Bugzilla – Attachment 59140 Details for
Bug 17855
New onboarding tool feature to guide users through setting up Koha, and minor web installer UI improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17855 - Removed the html regex from the cardnumber field in the 'Create patron administrator' page of the onboarding tool. Added '|html' into the the value attribute of the cardnumber input field to filter the inputted cardnumber.
Bug-17855---Removed-the-html-regex-from-the-cardnu.patch (text/plain), 3.72 KB, created by
Alex Buckley
on 2017-01-18 05:12:01 UTC
(
hide
)
Description:
Bug 17855 - Removed the html regex from the cardnumber field in the 'Create patron administrator' page of the onboarding tool. Added '|html' into the the value attribute of the cardnumber input field to filter the inputted cardnumber.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-01-18 05:12:01 UTC
Size:
3.72 KB
patch
obsolete
>From b2ef08f91ece8675003737de5a97540a885ab682 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 18 Jan 2017 04:38:18 +0000 >Subject: [PATCH] Bug 17855 - Removed the html regex from the cardnumber field > in the 'Create patron administrator' page of the onboarding tool. Added > '|html' into the the value attribute of the cardnumber input field to filter > the inputted cardnumber. > >So now the same level of validation exists for validating the inputted >cardnumber in the staff interface and the onboarding tool. >--- > .../prog/en/modules/onboarding/onboardingstep3.tt | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > >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 e9e56bb..5d9fbe2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt >@@ -15,9 +15,13 @@ > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> > > <script type="text/javascript"> >- var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >- var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them")); >- </script> >+ var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >+ var MSG_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them")); >+ var MSG_DESCRIPTION_LETTERS_ONLY=(_("Please only enter letters into this field")); >+ var MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY=(_("Please only enter letters and numbers into this cardnumber field")); >+</script> >+ >+ > > <script type="text/javascript"> > jQuery.validator.addMethod( "password_match", function(value,element){ >@@ -35,7 +39,7 @@ jQuery.validator.addMethod( "password_match", function(value,element){ > ); > > jQuery.validator.addMethod( "letters_only", function(value,element){ >- var patt =/^[a-zA-Z ]+$/g; >+ var patt =/^[a-zA-Z- ]+$/g; > if (patt.test(element.value)){ > return true; > } else { >@@ -46,7 +50,7 @@ jQuery.validator.addMethod( "letters_only", function(value,element){ > > > jQuery.validator.addMethod( "cardnumber_check", function(value,element){ >- var patt =/[A-Za-z1-9 ]+$/g; >+ var patt =/[A-Za-z0-9]{1,16}$/g; > if (patt.test(element.value)){ > return true; > } else { >@@ -177,9 +181,9 @@ $(document).ready(function(){ > <li> > <label for="cardnumber" class="required">Card number: </label> > [% IF patrons && patrons > 1 %] >- <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber %]" class="required" required="required"> >+ <input type="text" id="cardnumber" class="noEnterSubmit valid" name="cardnumber" value="[% newcardnumber | html %]" class="required" required="required"> > [% ELSE %] >- <input type="text" pattern="[A-Za-z1-9 ]+" title="Please only enter letters and numbers into the card number field"id="cardnumber" name="cardnumber" value="[% cardnumber %]" class="required" required="required"> >+ <input type="text" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required"> > [% END %] > <span class="required">Required</span> > </li> >-- >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 17855
:
58657
|
58658
|
58659
|
58660
|
58661
|
58662
|
58663
|
58664
|
58665
|
58666
|
58667
|
58668
|
58669
|
58781
|
58782
|
58783
|
58784
|
58785
|
58792
|
58793
|
58794
|
58846
|
58860
|
58861
|
58862
|
58886
|
58892
|
58893
|
58894
|
58895
|
58896
|
58897
|
58898
|
58899
|
58900
|
58901
|
58902
|
58903
|
58904
|
58905
|
58906
|
58907
|
59037
|
59051
|
59140
|
59141
|
59174
|
59188
|
59277
|
59279
|
59280
|
59281
|
59628
|
59703
|
59705
|
59706
|
59707
|
59708
|
59709
|
59710
|
59711
|
59712
|
59742
|
59826
|
59830
|
59840
|
59841
|
59842
|
59856
|
59857
|
60092
|
61667
|
61668
|
61986
|
62186
|
62191
|
62192
|
62193
|
62220
|
62221
|
62222
|
62223
|
62231
|
62233
|
62234
|
62235
|
62236
|
62237
|
62238
|
62239
|
62240
|
62241
|
62242
|
62243
|
62251
|
62252
|
62253
|
62254
|
62255
|
62256
|
62257
|
62258
|
62259
|
62260
|
62261
|
62262
|
62263
|
62281
|
62282
|
62283
|
62284
|
62285
|
62286
|
62287
|
62288
|
62668
|
62669
|
62670
|
62671
|
62672
|
62673
|
62674
|
62675