Bugzilla – Attachment 63022 Details for
Bug 17942
Update style of the web installer with Bootstrap 3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17942 [Follow-up] Update style of the web installer with Bootstrap 3
Bug-17942-Follow-up-Update-style-of-the-web-instal.patch (text/plain), 12.50 KB, created by
Jonathan Druart
on 2017-05-03 15:01:14 UTC
(
hide
)
Description:
Bug 17942 [Follow-up] Update style of the web installer with Bootstrap 3
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-05-03 15:01:14 UTC
Size:
12.50 KB
patch
obsolete
>From 252a90b2b9cdb03986233a3613ef09180c5d2689 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Sat, 29 Apr 2017 09:27:01 +0000 >Subject: [PATCH] Bug 17942 [Follow-up] Update style of the web installer with > Bootstrap 3 > >This patch makes changes following QA comments: > >- Login error messages now have a style >- Select all/Select none links should now be translatable >- Date format hint now correctly detects date format preference >- Unused JS is removed from onboarding.js > >This patch also modifies the 'category_code_check' validation method to >allow numbers as well as letters. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/css/installer.css | 2 +- > .../prog/en/modules/installer/auth.tt | 8 +-- > .../prog/en/modules/installer/step3.tt | 8 +-- > .../prog/en/modules/onboarding/onboardingstep2.tt | 17 +++--- > koha-tmpl/intranet-tmpl/prog/js/onboarding.js | 62 ++++++++-------------- > 5 files changed, 39 insertions(+), 58 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/installer.css b/koha-tmpl/intranet-tmpl/prog/css/installer.css >index 7fe08a9..7d5d3d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/installer.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/installer.css >@@ -131,7 +131,7 @@ fieldset.rows span.label { > > fieldset.rows fieldset { > background-color: transparent; >- border-width: 1px; >+ font-size: 100%; > margin: 1em; > padding: .3em; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >index b9e93e3..41d2494 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt >@@ -18,19 +18,19 @@ > <h1 id="logo"><a href="#">Koha</a></h1> > > [% IF ( nopermission ) %] >- <div id="login_error"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div> >+ <div id="login_error" class="alert alert-danger"><strong>Error: </strong>Unauthorized user <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div> > [% END %] > > [% IF ( timed_out ) %] >- <div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div> >+ <div id="login_error" class="alert alert-danger"><strong>Error: </strong>Session timed out, please log in again</div> > [% END %] > > [% IF ( different_ip ) %] >- <div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div> >+ <div id="login_error" class="alert alert-danger"><strong>Error: </strong>IP address has changed, please log in again </div> > [% END %] > > [% IF ( invalid_username_or_password ) %] >- <div id="login_error"><strong>Error: </strong>Invalid username or password</div> >+ <div id="login_error" class="alert alert-danger"><strong>Error: </strong>Invalid username or password</div> > [% END %] > > [% IF ( loginprompt ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index f499521..34d5e7d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -92,8 +92,8 @@ > <div class="checkboxes"> > > <p> >- <a class="selectall [% frameworksloo.label FILTER lower %]" href="#">Select all [% frameworksloo.label FILTER lower %] data</a> >- <a class="deselectall [% frameworksloo.label FILTER lower %]" href="#">Select no [% frameworksloo.label FILTER lower %] data</a> >+ <a class="selectall [% frameworksloo.label FILTER lower %]" href="#">Select all</a> >+ <a class="deselectall [% frameworksloo.label FILTER lower %]" href="#">Select none</a> > </p> > > [% FOREACH framework IN frameworksloo.frameworks %] >@@ -127,8 +127,8 @@ > <div class="checkboxes"> > > <p> >- <a class="selectall [% levelloo.label FILTER lower %]" href="#">Select all [% levelloo.label FILTER lower %] data</a> >- <a class="deselectall [% levelloo.label FILTER lower %]" href="#">Select no [% levelloo.label FILTER lower %] data</a> >+ <a class="selectall [% levelloo.label FILTER lower %]" href="#">Select all</a> >+ <a class="deselectall [% levelloo.label FILTER lower %]" href="#">Select none</a> > </p> > > [% FOREACH framework IN levelloo.frameworks %] >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 8025415..e58616a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt >@@ -89,7 +89,7 @@ > [% END %] > </select> > <div class="hint"> >- Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <code>batch_anonymise.pl</code> which should be set up by your system administrator. >+ Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <code>batch_anonymise.pl</code> which should be set up by your system administrator. > </div> > </li> > <li> >@@ -97,23 +97,24 @@ > <fieldset class="rows"> > <ol> > <li> >- <span class="label"> </span><strong>Choose one</strong> >- </li> >- <li> >+ <span class="label"></span><strong>Choose one</strong> >+ </li> >+ <li> > <label for="enrolmentperiod">In months: </label> > <input type="number" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" min="0" size="3" value="[% IF category.enrolmentperiod %][% category.enrolmentperiod %][% END %]" /> > </li> > <li> >- <label for="enrolmentperioddate">Until date: </label> >- <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> >- <div class="hint">[% INCLUDE 'date-format.inc' %]</div> >+ <label for="enrolmentperioddate">Until date: </label> >+ <input type="text" class="enrolmentperioddate datepicker" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> >+ <div class="hint">[% INCLUDE 'date-format.inc' dateformat = Koha.Preference('dateformat') %]</div> > </li> > </ol> > </fieldset> > </li> > </ol> > >- <p> To add another patron category and for more settings go to: >+ <p> >+ To add another patron category and for more settings go to: > <span class="breadcrumbs"> Administration <b>›</b> Patron categories</span> > </p> > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >index 9b1d13d..4816dfd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js >@@ -1,23 +1,13 @@ > function _(s) { return s; } // dummy function for gettext > > jQuery.validator.addMethod( "category_code_check", function(value,element){ >- var patt = /^[A-Za-z]{0,10}$/g; >+ var patt = /^[A-Za-z0-9]{0,10}$/g; > if (patt.test(element.value)) { > return true; > } else { > return false; > } >- }, MSG_LETTERS_ONLY >-); >- >-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_LETTERS_ONLY >+ }, MSG_LETTERS_NUMBERS_ONLY > ); > > jQuery.validator.addMethod( "enrollment_period", function(){ >@@ -45,16 +35,6 @@ jQuery.validator.addMethod( "password_match", function(value,element){ > }, MSG_PASSWORD_MISMATCH > ); > >-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_LETTERS_NUMBERS_ONLY >-); >- > function toUC(f) { > var x=f.value.toUpperCase(); > f.value=x; >@@ -76,48 +56,48 @@ $(document).ready(function() { > $("#category_form").validate({ > rules: { > categorycode: { >- required: true, >- category_code_check: true >+ required: true, >+ category_code_check: true > }, > description: { > required:true > }, > enrolmentperiod: { >- required: function(element){ >- return $("#enrolmentperioddate").val() === ""; >- }, >- digits: true, >- enrollment_period: true, >+ required: function(element){ >+ return $("#enrolmentperioddate").val() === ""; >+ }, >+ digits: true, >+ enrollment_period: true, > }, > enrolmentperioddate: { >- required: function(element){ >- return $("#enrolmentperiod").val() === ""; >- }, >- enrollment_period: true, >- // is_valid_date ($(#"enrolementperioddate").val()); >+ required: function(element){ >+ return $("#enrolmentperiod").val() === ""; >+ }, >+ enrollment_period: true, >+ // is_valid_date ($(#"enrolementperioddate").val()); > }, > dateofbirthrequired: { >- digits: true >+ digits: true > }, > upperagelimit: { >- digits: true >+ digits: true > }, > enrolmentfee: { >- number: true >+ number: true > }, > reservefee: { >- number: true >+ number: true > }, > category_type: { >- required: true >+ required: true > } > }, > messages: { > enrolmentperiod: { >- required: MSG_ONE_ENROLLMENTPERIOD >+ required: MSG_ONE_ENROLLMENTPERIOD > }, > enrolmentperioddate: { >- required: MSG_ONE_ENROLLMENTPERIOD >+ required: MSG_ONE_ENROLLMENTPERIOD > } > } > }); >-- >2.9.3
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 17942
:
59275
|
59623
|
59624
|
59625
|
59627
|
59721
|
60098
|
60099
|
60100
|
60101
|
60527
|
60710
|
62856
|
62857
|
62861
|
62862
|
63013
|
63019
|
63020
|
63021
| 63022