From c1ab860a0679ec6eb5f89569860dbc7276fc8a64 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 25 Apr 2018 16:28:18 +0000 Subject: [PATCH] Bug 20658: Move template JavaScript to the footer: Installer and onboarding This patch updates the installer and onboarding templates so that JavaScript is included in the footer instead of the header. A new include file is added, installer-intranet-bottom.inc, so that only required JS is being loaded. Some markup changes are included to improve validity. To test, apply the patch and start with a blank Koha database. Run through the installer and onboarding processes and confirm that there are no problems. Check especially JS-related interactions like datepickers and fields which are validated via JS, like the password inputs. NOTE: The qa tool will flag this patch for not using the Asset plugin, but it doesn't work correctly for installer files. --- .../prog/en/includes/installer-doc-head-close.inc | 18 --- .../prog/en/includes/installer-intranet-bottom.inc | 20 +++ .../prog/en/modules/installer/auth.tt | 7 +- .../prog/en/modules/installer/step1.tt | 140 +++++++++++---------- .../prog/en/modules/installer/step2.tt | 3 +- .../prog/en/modules/installer/step3.tt | 33 ++--- .../prog/en/modules/onboarding/onboardingstep1.tt | 3 +- .../prog/en/modules/onboarding/onboardingstep2.tt | 12 +- .../prog/en/modules/onboarding/onboardingstep3.tt | 17 ++- .../prog/en/modules/onboarding/onboardingstep4.tt | 12 +- .../prog/en/modules/onboarding/onboardingstep5.tt | 12 +- 11 files changed, 153 insertions(+), 124 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/installer-intranet-bottom.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc index 87229c2..9deb71d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc @@ -3,22 +3,4 @@ - - - - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-intranet-bottom.inc new file mode 100644 index 0000000..2b07b8d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-intranet-bottom.inc @@ -0,0 +1,20 @@ + + + + + + + [% jsinclude # Parse the page template's JavaScript block if necessary %] + + 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 41d2494..4792c22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt @@ -58,7 +58,8 @@ [% END %] - - + + + -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt index 806f28e..0bdc021 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt @@ -14,84 +14,88 @@ [% END %] [% INCLUDE 'installer-doc-head-close.inc' %] + -
-
-
-

Koha

+ +
+
+
- [% UNLESS ( language ) %] -

Web installer › Choose your language

-

You are about to install Koha.

+

Koha

-

Please pick your language from the following list. If your language is not listed, please inform your system administrator.

+ [% UNLESS ( language ) %] +

Web installer › Choose your language

+

You are about to install Koha.

-
-
- - + [% IF ( installer_languages_loop ) %] + [% FOREACH installer_languages_loo IN installer_languages_loop %] + [% IF ( installer_languages_loo.plural ) %] + + [% FOREACH sublanguages_loo IN installer_languages_loo.sublanguages_loop %] + + [% END %] + + [% ELSE %] + + [% END %] [% END %] [% END %] - [% END %] - -
-

-
- [% END %] + +
+

+ + [% END %] - [% IF ( language ) %] - [% UNLESS ( checkmodule ) %] - [% IF ( missing_modules ) %] -

Web installer › Perl modules missing

-

Some Perl modules are missing. Important: Required modules must be installed before you may continue.
-

    - [% FOREACH missing_module IN missing_modules %] -
  • [% missing_module.name %] [% IF ( missing_module.require ) %]Required[% END %] -
    Version: [% missing_module.version %] -
    Usage: [% missing_module.usage %] -
  • - [% END %] -
- [% END %] + [% IF ( language ) %] + [% UNLESS ( checkmodule ) %] + [% IF ( missing_modules ) %] +

Web installer › Perl modules missing

+

Some Perl modules are missing. Important: Required modules must be installed before you may continue.
+

    + [% FOREACH missing_module IN missing_modules %] +
  • [% missing_module.name %] [% IF ( missing_module.require ) %]Required[% END %] +
    Version: [% missing_module.version %] +
    Usage: [% missing_module.usage %] +
  • + [% END %] +
+ [% END %] - [% IF ( problems ) %] -

Web installer › Perl version too old

-

I encountered some problems.

-
    - [% IF ( perlversion ) %] -
  • Your Perl version is out of date. Please upgrade to a newer version of Perl (at least version 5.10).
  • - [% END %] -
- [% END %] + [% IF ( problems ) %] +

Web installer › Perl version too old

+

I encountered some problems.

+
    + [% IF ( perlversion ) %] +
  • Your Perl version is out of date. Please upgrade to a newer version of Perl (at least version 5.10).
  • + [% END %] +
+ [% END %] -
- -

-
+
+ +

+
- [% ELSE # IF checkmodule %] -

Web installer › Check Perl dependencies

-

All required Perl modules appear to be installed.

-

All dependencies installed.

+ [% ELSE # IF checkmodule %] +

Web installer › Check Perl dependencies

+

All required Perl modules appear to be installed.

+

All dependencies installed.

-
- -

-
- [% END # IF checkmodule%] - [% END # IF language %] -
-
+
+ +

+
+ [% END # IF checkmodule%] + [% END # IF language %] +
+
+
-[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt index 22936a6..2302608 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt @@ -69,5 +69,6 @@ [% END # / IF dbconnection %] + -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] 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 0657946..89706db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -259,23 +259,26 @@ [% END # / IF updatestructure %] + [% IF ( selectframeworks ) %] - + + [% END %] [% END %] -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] 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 ebe91f7..ba5aaa3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt @@ -37,5 +37,6 @@ + -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] 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 6a9bdfa..68b900f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt @@ -11,9 +11,6 @@ [% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'validator-strings.inc' %] -[% INCLUDE 'installer-strings.inc' %] - @@ -127,5 +124,12 @@ + -[% INCLUDE 'intranet-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'validator-strings.inc' %] + [% INCLUDE 'installer-strings.inc' %] + +[% END %] + +[% INCLUDE 'installer-intranet-bottom.inc' %] \ No newline at end of file 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 51ed7f0..b97f709 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt @@ -2,9 +2,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Web installer › Create Koha administrator patron [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'validator-strings.inc' %] -[% INCLUDE 'installer-strings.inc' %] - @@ -111,7 +108,15 @@ + + +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'validator-strings.inc' %] + [% INCLUDE 'installer-strings.inc' %] + + [% PROCESS 'password_check.inc' %] + [% PROCESS 'add_password_check' new_password => 'password' %] +[% END %] + +[% INCLUDE 'installer-intranet-bottom.inc' %] -[% INCLUDE 'intranet-bottom.inc' %] -[% PROCESS 'password_check.inc' %] -[% PROCESS 'add_password_check' new_password => 'password' %] 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 ec9c7b6..67400e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt @@ -1,9 +1,6 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Web installer › Create a new item type [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'validator-strings.inc' %] -[% INCLUDE 'installer-strings.inc' %] - @@ -47,5 +44,12 @@ + -[% INCLUDE 'intranet-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'validator-strings.inc' %] + [% INCLUDE 'installer-strings.inc' %] + +[% END %] + +[% INCLUDE 'installer-intranet-bottom.inc' %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt index dfae544..d013a60 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -7,9 +7,6 @@ [% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'validator-strings.inc' %] -[% INCLUDE 'installer-strings.inc' %] - @@ -134,5 +131,12 @@ [% END %] + -[% INCLUDE 'intranet-bottom.inc' %] +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'validator-strings.inc' %] + [% INCLUDE 'installer-strings.inc' %] + +[% END %] + +[% INCLUDE 'installer-intranet-bottom.inc' %] \ No newline at end of file -- 2.1.4