Bugzilla – Attachment 59281 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]
[SIGNED-OFF] Bug 17855 - Other followups
SIGNED-OFF-Bug-17855---Other-followups.patch (text/plain), 15.23 KB, created by
Mark Tompsett
on 2017-01-19 20:18:55 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17855 - Other followups
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-19 20:18:55 UTC
Size:
15.23 KB
patch
obsolete
>From d210f8c36da99eafed35a593f9e6bfc0857e7a0d 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] [SIGNED-OFF] Bug 17855 - Other followups > >- 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. > >- Removed the unnecessary javascript cardnumber >validation code from onboardingstep3.tt > >- Removed HTML regexes from all fields on all screens >of onboarding tool except branchcode, patron category code >and item type code. Also ensured these three remaining regexes >are all {1,10} for length as they are all required. > >- Added |html and added in input title attribute to >input fields where it existed previously > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > .../prog/en/modules/onboarding/onboardingstep1.tt | 4 +- > .../prog/en/modules/onboarding/onboardingstep2.tt | 29 ++++-------- > .../prog/en/modules/onboarding/onboardingstep3.tt | 53 ++++------------------ > .../prog/en/modules/onboarding/onboardingstep4.tt | 4 +- > 4 files changed, 23 insertions(+), 67 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >index 18cff8c..b295fc9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt >@@ -65,12 +65,12 @@ > <ol> > <li> > <label for="branchcode" class="required">Library code: </label> >- <input type="text" pattern="^[A-Za-z]{0,10}$" title="Please enter 3 capital letters" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> >+ <input type="text" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> > <label for="branchname" class="required">Name: </label> >- <input type="text" pattern="[a-zA-Z ]+" title="Please enter a sentence of letters only" name="branchname" id="branchname" size="42" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> >+ <input type="text" name="branchname" id="branchname" title="Please enter the name of your institution" size="42" value="[% library.branchname |html %]" class=" required" required="required" style="width:200px;"> > <span class="required">Required</span> > </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >index 453d96a..86b68f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -166,30 +166,20 @@ $(document).ready(function(){ > > > <script type="text/javascript"> >-var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >-var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); >-var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrolment period.")); >-var MSG_DESCRIPTION_LETTERS_ONLY=(_("Please only enter letters.")); >+ var MSG_CATEGORYCODE_CHARS=(_("Please only enter letters into this field.")); >+ var MSG_ONE_ENROLLMENTPERIOD =(_("Please choose an enrollment period in months OR by date.")); >+ var MSG_ONLY_ONE_ENROLLMENTPERIOD=(_("Please only choose one enrolment period.")); > </script> > > <script type="text/javascript"> > jQuery.validator.addMethod( "category_code_check", function(value,element){ >- var patt = /^[A-Za-z]{0,10}$/g; >+ var patt = /[0-9A-Za-z]{1,10}$/g; > if (patt.test(element.value)) { > return true; > } else { > return false; > } >-}, MSG_CATEGORYCODE_CHARS >-); >-jQuery.validator.addMethod( "letters_only", function(value,element){ >- var patt =/^[A-Za-z ]{0,30}$/g; >- if (patt.test(element.value)){ >- return true; >- } else { >- return false; >- } >- }, MSG_DESCRIPTION_LETTERS_ONLY >+ }, MSG_CATEGORYCODE_CHARS > ); > > jQuery.validator.addMethod( "enrollment_period", function(){ >@@ -221,7 +211,6 @@ $(document).ready(function() { > }, > description: { > required:true, >- letters_only: true > }, > enrolmentperiod: { > required: function(element){ >@@ -235,7 +224,6 @@ $(document).ready(function() { > return $("#enrolmentperiod").val() === ""; > }, > enrollment_period: true, >- // is_valid_date ($(#"enrolementperioddate").val()); > }, > dateofbirthrequired: { > digits: true >@@ -254,6 +242,9 @@ $(document).ready(function() { > } > }, > messages: { >+ categorycode: { >+ required: MSG_CATEGORYCODE_CHARS >+ }, > enrolmentperiod: { > required: MSG_ONE_ENROLLMENTPERIOD > }, >@@ -319,13 +310,13 @@ $(document).ready(function() { > <ol> > <li> > <label for="categorycode" class="required">Category code: </label> >- <input type="text" pattern="^[A-Za-z]{0,10}$" title="Please enter 1 or 2 capital letters" id="categorycode" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" /> >+ <input type="text" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="categorycode" name="categorycode" value="[% category.categorycode |html %]" size="10" maxlength="10" class="required" required="required" /> > <span class="required">Required</span> > </li> > > <li> > <label for="description" class="required">Description: </label> >- <input type="text" pattern="[a-zA-Z ]+" title="Please enter a description sentence of letters only" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description |html %]" /> >+ <input type="text" name="description" title="Please enter a description of the category" size="40" maxlength="80" class="required" required="required" value="[% category.description |html%]" /> > <span class="required">Required</span> > </li> > >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..a484835 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,10 @@ > <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_PASSWORD_MISMATCH=(_("The entered passwords do not match, please rewrite them")); >+</script> >+ >+ > > <script type="text/javascript"> > jQuery.validator.addMethod( "password_match", function(value,element){ >@@ -34,30 +35,6 @@ jQuery.validator.addMethod( "password_match", function(value,element){ > }, MSG_PASSWORD_MISMATCH > ); > >-jQuery.validator.addMethod( "letters_only", function(value,element){ >- var patt =/^[a-zA-Z ]+$/g; >- if (patt.test(element.value)){ >- return true; >- } else { >- return false; >- } >- }, MSG_DESCRIPTION_LETTERS_ONLY >-); >- >- >-jQuery.validator.addMethod( "cardnumber_check", function(value,element){ >- var patt =/[A-Za-z1-9 ]+$/g; >- if (patt.test(element.value)){ >- return true; >- } else { >- return false; >- } >- }, MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY >-); >- >- >- >- > $(document).ready(function(){ > > $("#Submit").click(function(){ >@@ -65,30 +42,18 @@ $(document).ready(function(){ > rules: { > surname: { > required: true, >- letters_only: true > }, > firstname: { > required: true, >- letters_only: true > }, > cardnumber: { > required: true, >- cardnumber_check: true > }, > password: { > password_match:true > } > }, > messages: { >- surname: { >- required: MSG_DESCRIPTION_LETTERS_ONLY >- }, >- firstname: { >- required: MSG_DESCRIPTION_LETTERS_ONLY >- }, >- cardnumber: { >- required: MSG_CARDNUMBER_LETTERS_NUMBERS_ONLY >- }, > password: { > required: MSG_PASSWORD_MISMATCH > }, >@@ -163,12 +128,12 @@ $(document).ready(function(){ > <h3>Patron identity</h3> > <li> > <label for="surname" class="required">Surname: </label> >- <input type="text" pattern="[a-zA-Z- ]+" title="Please only enter letters in the surname field" id="surname" name="surname" value="[% surname %]" class="required" required="required" /> >+ <input type="text" id="surname" name="surname" title="Please only enter letters in the surname field" value="[% surname |html %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> > <label for="firstname" class="required">First name: </label> >- <input type="text" pattern="[a-zA-Z ]+" title="Please only enter letters in the firstname field" name="firstname" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required"> >+ <input type="text" name="firstname" title="Please only enter letters in the first name field" id="firstname" size="20" value="[% firstname |html %]" class="required" required="required"> > <span class="required">Required</span> > </li> > </ol> >@@ -177,9 +142,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" title="Please enter a 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" title="Please enter a cardnumber" name="cardnumber" value="[% cardnumber | html %]" class="required" required="required"> > [% END %] > <span class="required">Required</span> > </li> >@@ -221,7 +186,7 @@ $(document).ready(function(){ > <li> > <input type="hidden" name="BorrowerMandatoryField" value = [% BorrowerMandatoryField %] /> > <label for="userid" class="required">Username: </label> >- <input type="text" name="userid" id ="userid" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this username field" size="20" value="[% userid %]" class="required" required="required" /> >+ <input type="text" name="userid" id ="userid" size="20" title="Please only enter a username of letters and numbers" value="[% userid |html %]" class="required" required="required" /> > <span class="required">Required</span> > </li> > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >index ce5a48f..6176fb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt >@@ -50,13 +50,13 @@ > <ol> > <li> > <label for="itemtype" class="required">Item type code: </label> >- <input type="text" name="itemtype" pattern="^[A-Za-z]{0,10}$" title="Please enter either 2 or 3 capital letters as the item type" id="itemtype" size="10" maxlength="10" class="required" required="required" /> >+ <input type="text" name="itemtype" pattern="[0-9A-Za-z]{1,10}" title="Please enter up to 10 letters and/or numbers" id="itemtype" size="10" maxlength="10" class="required" required="required" value="[% itemtype.itemtype |html %]" /> > <span class="required">Required</span> > </li> > > <li> > <label for="description" class="required">Description: </label> >- <input type="text" name="description" pattern="[A-Za-z1-9 ]+" title="Please only enter letters or numbers into this item type description" id="description" size="42" value="[% itemtype.description |html %]" class="required" required="required"> >+ <input type="text" name="description" id="description" title="Please only enter letters and/or numbers into this item type description" size="42" value="[% itemtype.description |html %]" class="required" required="required"> > <span class="required">Required</span> > </li> > </ol> >-- >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