From d25ae0764ef4d03cac38344215f8e62a367f3822 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. Signed-off-by: Claire Gravely --- .../prog/en/includes/installer-doc-head-close.inc | 20 +-- .../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, 154 insertions(+), 125 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 d605fef..d634650 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 @@ -2,23 +2,5 @@ - - - - - - - - + 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..7537e41 --- /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 30d5a61..71cd268 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 120b45d..649d866 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 | html %] [% IF ( missing_module.require ) %]Required[% END %] -
    Version: [% missing_module.version | html %] -
    Usage: [% missing_module.usage | html %] -
  • - [% 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 | html %] [% IF ( missing_module.require ) %]Required[% END %] +
    Version: [% missing_module.version | html %] +
    Usage: [% missing_module.usage | html %] +
  • + [% 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 ec785a9..30a9209 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 60fa02b..583b759 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -262,23 +262,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 1fd91e0..4f7643c 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 b96c30d..eed7068 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 54274c0..ba41c63 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 d6eb24e..b04013e 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