From 16f77af37bb36a0377acb4d7e325a2c58faf3eea Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Jan 2017 16:07:40 +0000 Subject: [PATCH] Bug 17942 - Update style of the web installer with Bootstrap 3 This patch makes style and markup changes to the web installer and new onboarding tool (Bug 17855). - Markup has been corrected, improved, and in many places reindented. - Some page titles have been made more specific. - Some JavaScript and CSS have been moved to separate files. In the onboarding tool I have removed form validation from the markup and JavaScript in many cases where the requirements were not matched elsewhere in Koha. For instance, we shouldn't limit item type descriptions to only letters because the database doesn't require such a limit. To test, apply the patch and run the web installer with an empty database. Confirm that the installation process completes correctly and that each page looks good and works correctly. Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/prog/css/installer.css | 229 ++++++++++ .../prog/en/includes/installer-doc-head-close.inc | 79 +--- .../prog/en/includes/installer-strings.inc | 7 + .../prog/en/modules/installer/auth.tt | 93 ++-- .../prog/en/modules/installer/step1.tt | 168 +++---- .../prog/en/modules/installer/step2.tt | 129 +++--- .../prog/en/modules/installer/step3.tt | 501 +++++++++------------ .../prog/en/modules/onboarding/onboardingstep1.tt | 128 +++--- .../prog/en/modules/onboarding/onboardingstep2.tt | 272 +++++------ .../prog/en/modules/onboarding/onboardingstep3.tt | 331 ++++++-------- .../prog/en/modules/onboarding/onboardingstep4.tt | 133 +++--- .../prog/en/modules/onboarding/onboardingstep5.tt | 234 +++++----- koha-tmpl/intranet-tmpl/prog/js/onboarding.js | 150 ++++++ 13 files changed, 1340 insertions(+), 1114 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/css/installer.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/js/onboarding.js diff --git a/koha-tmpl/intranet-tmpl/prog/css/installer.css b/koha-tmpl/intranet-tmpl/prog/css/installer.css new file mode 100644 index 0000000..374c56d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/css/installer.css @@ -0,0 +1,229 @@ +body { + background-color: #EEE; + text-align: left; + font-family: arial, verdana, helvetica, sans-serif; +} + +h1 { + font-size: 161.6%; + font-weight: bold; +} + +h2 { + background-color: #eee; + border-radius: 4px; + font-size: 146.5%; + font-weight: bold; + text-shadow: 1px 1px 0px #FFF; + padding: .5em; +} + +h3 { + color: #003366; + font-size: 131%; + font-weight: bold; +} + +hr { + margin-top: .5em; + margin-bottom: .5em; +} + +.installer-main { + background-color: #FFF; + border-radius: 5px; + margin-top: 3%; + margin-bottom: 3%; + padding: 1em; + -webkit-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); + -moz-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); + box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0.5); +} + +ul, ol { padding: 5px 5px 5px 20px; } + +#logo { + background: url(../img/koha-logo.gif) no-repeat top center; + margin-top: 0; + margin-bottom: .5em; +} + +#logo a { + display: block; + text-indent: -1000px; + height: 74px; + border-bottom: none; +} + +.bg-danger { + padding: .2em .4em; +} + +.step a, .step input { font-size: 2em; } + +td input { font-size: 1.5em; } + +.step, th { text-align: right; } + +#bloc25, .bloc25 { + float:left; + border:1px solid #000000; + margin:0px; + padding:0px; + +} + +#footer { + text-align: center; + border-top: 1px solid #ccc; + padding-top: 1em; + font-style: italic; +} + +.update_error { + color: red; + font-weight: bold; +} + +.checkbox { + margin-bottom: 1em; +} + +fieldset.rows { + border-width: 0; + float: left; + font-size: 90%; + clear: left; + margin: .9em 0 0 0; + padding: 0; + width: 100%; +} + +fieldset.rows legend { + border: 0; + margin-left: 1em; + font-weight: bold; + font-size: 110%; + margin-bottom: 0; +} + +fieldset.rows label, +fieldset.rows span.label { + float: left; + font-weight: bold; + width: 9em; + margin-right: 1em; + text-align: right; +} + +fieldset.rows span.label { + display: inline; + padding: .2em .6em .3em; + font-size: inherit; + font-weight: bold; + line-height: 1; + color: inherit; + text-align: right; + white-space: normal; + vertical-align: baseline; + border-radius: 0; +} + +fieldset.rows fieldset { + background-color: transparent; + border-width: 1px; + margin: 1em; + padding: .3em; +} + +fieldset.rows ol { + padding: 1em 1em 0 1em; + list-style-type: none; +} + +fieldset.rows li { + float: left; + clear: left; + padding-bottom: 1em; + list-style-type: none; + width: 100%; +} + +fieldset.rows .hint { + margin-left: 10.5em; + margin-right: 4em; + margin-top: .5em; + font-size: 96%; + color: #666; +} + +fieldset.rows label.error { + color: #cc0000; + float: none; + margin-left: 1em; + width: auto; +} + +fieldset.rows ol { + padding: 0 1em 0 1em; +} + + +label.required, +span.required { + color : #C00; +} + +span.required { + font-style : italic; + margin-left : .5em; +} + +.breadcrumbs { + background-color: #e6f0f2; + margin: 1em 0; + padding: .4em 2em; +} + +/* Override core jQueryUI widgets */ +.ui-widget-content { border: 1px solid #B9D8D9; background: #ffffff none; color: #222222; } +.ui-widget-header { border: 1px solid #B9D8D9; background: #E6F0F2 none; color: #222222; font-weight: bold; } +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B9D8D9; background: #F4F8F9 none; font-weight: normal; color: #555555; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #B9D8D9; background: #E6F0F2 none; font-weight: normal; color: #212121; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff none; font-weight: normal; color: #212121; } +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #FED22F; background: #FFF4C6; color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec; color: #cd0a0a; } + +.ui-widget, +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family : inherit; + font-size : inherit; +} + +/* jQuery UI Datepicker */ +.ui-datepicker table { + width: 100%; + font-size: .9em; + border : 0; + border-collapse: collapse; + margin:0 0 .4em; +} + +.ui-datepicker th { + background : transparent none; + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} + +.ui-datepicker-trigger { + vertical-align: middle; + margin : 0 3px; +} +.ui-datepicker { + box-shadow: 1px 1px 3px 0 #666; +} 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 60d0e66..d62bfe6 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,92 +2,15 @@ - - - + - - - - - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc new file mode 100644 index 0000000..21b8245 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-strings.inc @@ -0,0 +1,7 @@ + \ No newline at end of file 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 c3509cd..28d95ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/auth.tt @@ -1,52 +1,63 @@ [% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -Koha › +<title>Koha › [% IF ( nopermission ) %]Access denied[% END %] [% IF ( timed_out ) %]Session timed out[% END %] [% IF ( different_ip ) %]IP address change[% END %] [% IF ( invalid_username_or_password ) %]Invalid username or password[% END %] - [% IF ( loginprompt ) %]Log in to Koha[% END %] + [% IF ( loginprompt ) %]Log in to the Koha web installer[% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -
-

Koha [%- Koha.Version.release -%] installer

-[% IF ( nopermission ) %] -
Error: Unauthorized user click to log out
-[% END %] - -[% IF ( timed_out ) %] -
Error: Session timed out, please log in again
-[% END %] - -[% IF ( different_ip ) %] -
Error: IP address has changed, please log in again
-[% END %] - -[% IF ( invalid_username_or_password ) %] -
Error: Invalid username or password
-[% END %] - -[% IF ( loginprompt ) %] - -
-[% FOREACH INPUT IN INPUTS %] - -[% END %] -

Welcome to the Koha web installer

-

Before we begin, please verify you have the correct credentials to continue. Please log in -with the username and password given to you by your systems administrator and located in your -koha-conf.xml configuration file.

-

Please enter your username and password:

-

-

-

-

-

-
- -[% END %] +
+
+
+ +

Koha

+ + [% IF ( nopermission ) %] +
Error: Unauthorized user click to log out
+ [% END %] + + [% IF ( timed_out ) %] +
Error: Session timed out, please log in again
+ [% END %] + + [% IF ( different_ip ) %] +
Error: IP address has changed, please log in again
+ [% END %] + + [% IF ( invalid_username_or_password ) %] +
Error: Invalid username or password
+ [% END %] + + [% IF ( loginprompt ) %] +

Welcome to the Koha [%- Koha.Version.release -%] web installer

+ +

Before we begin, please verify you have the correct credentials to continue. Please log in with the username and password given to you by your systems administrator and located in your koha-conf.xml configuration file.

+ +
+ [% FOREACH INPUT IN INPUTS %] + + [% END %] + +
+ Please enter your username and password + +
+ + +
+
+ + +
+

+
+
+ [% END %] +
+
+
[% INCLUDE '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 89da761..9647ae9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt @@ -1,82 +1,98 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Web installer › Step 1 -[% INCLUDE 'installer-doc-head-close.inc' %] -
-

Koha Web installer › Step 1

-[% UNLESS ( language ) %] -

You are about to install Koha.

- -

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

-
- -

- -

Click 'Next' to continue

-
-[% END %] -[% IF ( language ) %] - [% IF ( checkmodule ) %] -

All required Perl modules appear to be installed.
- [% ELSE %] - [% IF ( missing_modules ) %] -

Warning: Some Perl modules are missing.
Modules in red must be installed before you may continue.
-

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

    I encountered some problems.

    -
      - [% IF ( perlversion ) %] -
    • Your Perl version seems to be obsolete. - Please upgrade to a newer version of Perl (at least Version 5.10).
    • - [% END %] -
    - [% END %] - [% END %] -
    -[% IF ( checkmodule ) %] -[% IF (op == 'noop') %] - -[% ELSE %] - - - -[% END %] -

    All dependencies installed.

    -

    Please click 'Next' to continue

    -[% ELSE %] -[% IF (op == 'noop') %] - -[% ELSE %] - - -[% END %] -

    Click to recheck dependencies

    -[% END %] -
    -[% END %] + +[% INCLUDE 'installer-doc-head-close.inc' %] + +
    +
    +
    + +

    Koha

    + + [% UNLESS ( language ) %] +

    Web installer › Choose your language

    +

    You are about to install Koha.

    + +

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

    + +
    +
    + + +
    + +

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

    Web installer › Perl modules missing

    +

    Some Perl modules are missing. 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 %] + +
    + +

    +
    + + [% 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 %] +
    +
    + [% INCLUDE '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 d7194b9..aaea508 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt @@ -1,63 +1,70 @@ -[% INCLUDE 'doc-head-open.inc' %]Koha › Web installer › Step 2 +[% INCLUDE 'doc-head-open.inc' %]Koha › Web installer › Database settings [% INCLUDE 'installer-doc-head-close.inc' %] -
    -

    Koha Web installer › Step 2

    -

    Database settings:

    -
      -
    • database type : [% dbms %]
    • -
    • database name : [% dbname %]
    • -
    • database host : [% hostname %]
    • -
    • database port : [% port %] (probably OK if blank)
    • -
    • database user : [% user %]
    • -
    -
    -[% IF ( dbconnection ) %] -
    - [% IF ( checkdatabaseaccess ) %] -

    Connection established.

    - [% IF ( checkdatabasecreated ) %] -

    Database [% dbname %] exists.

    - [% IF ( checkgrantaccess ) %] -

    User [% user %] has all required privileges on database [% dbname %].

    - [% ELSE %] -

    user [% user %] doesn't have enough privilege on database [% dbname %]

    -

    Ask for or make a change in the user's privileges. Need help? See - [% IF dbms == 'mysql' %] - [% ELSE %] - [% END %]this page. -

    -

    - User [% user %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on [% dbname %] -

    - [% END %] - [% ELSE %] -

    No database named [% dbname %] detected.

    -

    Please create the database before continuing.

    - [% END %] - [% ELSE %] -
    [% error %] : [% message %] + +
    +
    +
    + +

    Koha

    +

    Web installer › Database settings

    +

    Database settings:

    +
      +
    • Database type : [% dbms %]
    • +
    • Database name : [% dbname %]
    • +
    • Database host : [% hostname %]
    • +
    • Database port : [% port %] (probably okay if blank)
    • +
    • Database user : [% user %]
    • +
    + + [% IF ( dbconnection ) %] + + [% IF ( checkdatabaseaccess ) %] + + [% IF ( checkdatabasecreated ) %] +
      +
    • Database [% dbname %] exists.
    • + [% IF ( checkgrantaccess ) %] +
    • User [% user %] has all required privileges on database [% dbname %].
    • +
    + [% ELSE %] +
+

user [% user %] doesn't have enough privilege on database [% dbname %]

+

Ask for or make a change in the user's privileges. Need help? See [% IF ( mysql ) %] + + [% ELSE %] + + [% END %] + this page. User [% user %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on [% dbname %] +

+ [% END %] + [% ELSE %] + +

Please create the database before continuing.

+ [% END %] + [% ELSE %] + +
+
    +
  • Check that your database is running.
  • +
  • Check your database settings in koha-conf.xml.
  • +
  • Check the hostname setting in koha-conf.xml. + Some database servers require 127.0.0.1 rather than localhost.
  • +
+
+

Please correct these errors and start the installer again. + [% END %] + [% UNLESS ( error ) %] + +

+ [% END %] + + [% ELSE %] +
+ + +

+
+ [% END %] +
-
-
    -
  • Check that your database is running.
  • -
  • Check your database settings in koha-conf.xml.
  • -
  • Check the hostname setting in koha-conf.xml. - Some database servers require 127.0.0.1 rather than localhost.
  • -
-

Please correct these errors and start the installer again. - [% END %] - [% IF ( error ) %][% ELSE %] - -

Click 'Next' to continue

-[% END %] - -[% ELSE %] -
- - -

Please click 'Next' to continue if this information is correct

-
-[% END %] - - - +[% INCLUDE '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 4ea9580..b6458fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -1,311 +1,250 @@ -[% INCLUDE 'doc-head-open.inc' %]Koha › Web installer › Step 3 -[% IF ( finish ) %][% END %] +[% INCLUDE 'doc-head-open.inc' %] +Koha › Web installer › + [% IF ( proposeimport ) %] + Set up database + [% END %] + [% IF ( importdatastructure ) %] + [% IF ( error ) %] + Error creating database tables + [% ELSE %] + Database tables created + [% END %] + [% END %] + [% IF ( default ) %] + [% IF ( upgrading ) %] + Update database + [% ELSE %] + Install basic configuration settings + [% END %] + [% END %] + [% IF ( choosemarc ) %] + Select your MARC flavor + [% END %] + [% IF ( selectframeworks ) %] + Selecting default settings + [% END %] + +[% IF ( finish ) %][% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -
-

Koha Koha web installer › Step 3

- -[% IF ( selectframeworks ) %] - -[% END %] + [% IF ( choosemarc ) %] +

Choose your setup

+

Basic setup selects recommended settings by default.

+
+ + + +

+ +

+

+ +

+ +

Select your MARC flavor

+

MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is used globally, whereas UNIMARC tends to be used in Europe.

+ + [% FOREACH flavourloo IN flavourloop %] + [% IF ( flavourloo.label == "Unimarc") %] +

+ +

+ [% ELSE %] +

+ +

+ [% END %] + [% END %] +

+
+ [% END # / IF choosemarc %] -[% IF ( finish ) %] -

Congratulations, installation complete

-

If this page does not redirect in 10 seconds, click Start onboarding process.

-[% END %] + [% IF ( selectframeworks ) %] +

Web installer › [% setup %] setup › Selecting default settings

+ [% IF setup == "Advanced" %] +

Select all sample data

+ [% END %] -[% IF ( choosemarc ) %] -

Choose your setup

-

Basic setup selects recommended settings by default.

-
- - + + + + [% IF ( frameworksloop ) %] +

MARC frameworks: [% marcflavour %]

+ [% IF ( en_marc_frameworks ) %] +

No MARC frameworks are available for your language. + Defaulting to the frameworks supplied for English (en)

+ [% END %] + [% FOREACH frameworksloo IN frameworksloop %] +

[% frameworksloo.label %]

+ [% FOREACH framework IN frameworksloo.frameworks %] +
+ +
+
+ [% END # / FOREACH framework %] + [% END # / FOREACH frameworksloo %] + [% END # / IF frameworkdsloop %] + +

Other data

+ + [% IF ( en_sample_data ) %] +

No sample data and settings are available for your language. + Defaulting to the samples supplied for English (en)

+ [% END %] -
- Basic
- Advanced
-
+ [% FOREACH levelloo IN levelloop %] +

[% levelloo.label %]

-

Select your MARC flavor

-

MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is more commonly used globally, whereas UNIMARC tends to be used in Europe.

+ [% IF (setup == "Basic" && levelloo.label == "Optional") %] +

Select all sample data

+ [% END %] - [% FOREACH flavourloo IN flavourloop %] -
- [% IF ( flavourloo.label == "Unimarc") %] - [% flavourloo.label %]
- [% ELSE %] - [% flavourloo.label %]
- [% END %] -
- [% END %] + [% FOREACH framework IN levelloo.frameworks %] +
+ +
+ [% END # / FOREACH framework %] + [% END # / FOREACH levelloo %] -

Click 'Next' to continue

+

When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, + please be patient.

-
+

+ + [% END # / IF selectframeworks %] -[% END %] + [% IF ( addframeworks ) %] +

Web installer › Default data loaded

-[% IF ( selectframeworks ) %] -

[% setup %] setup

-

Selecting Default Settings

+ [% FOREACH lis IN list %] +

[% lis.level FILTER ucfirst %] data added

- [% IF setup == "Advanced" %] - - [% END %] -
- - - [% IF ( frameworksloop ) %] -

MARC frameworks: [% marcflavour %]

- [% IF ( en_marc_frameworks ) %] -

No MARC frameworks are available for your language. - Defaulting to the frameworks supplied for English (en)

- [% END %] - [% FOREACH frameworksloo IN frameworksloop %] -
-

[% frameworksloo.label %]

- [% FOREACH framework IN frameworksloo.frameworks %] - - - - - [% ELSE %] - - [% END %] - -
- [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] - - [% ELSE %] - - [% END %] - - [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] -
    +
      + [% FOREACH fwklis IN lis.fwklist %]
    • - + [% fwklis.fwkname %] + [% IF ( fwklis.error ) %]

      [% fwklis.error %]

      [% END %]
    • -
    -
- -
- [% END %] -
- [% END %] -

Other data

- [% END %] - [% IF ( en_sample_data ) %] -

No sample data and settings are available for your language. - Defaulting to the samples supplied for English (en)

- [% END %] - [% FOREACH levelloo IN levelloop %] -
-

[% levelloo.label %]

- - [% IF (setup == "Basic" && levelloo.label == "Optional") %] - - [% END %] - - [% FOREACH framework IN levelloo.frameworks %] - - - - + +

All done!

+

Installation complete.

+ + + +

+ + + [% END # / IF addframeworks %] + + [% IF ( importdatastructure ) %] + [% IF ( error ) %] +

The following error occurred while importing the database structure:

+

[% error %]

+

Please contact your system administrator

[% ELSE %] - +

Web installer › Success

+

Database tables created

+ + +

+ [% END %] - -
- [% IF (levelloo.label == "Default" ) && (setup=="Basic")%] - - [% ELSE %] - + [% END %] + [% END %] - - [% IF (levelloo.label == "Default") && (setup=="Basic")%] -
    -
  • - -
  • -
-
- -
- [% END %] -
- [% END %] -

When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, - please be patient.

-

-

- -[% END %] - - -[% IF ( addframeworks ) %] - [% FOREACH lis IN list %] -

[% lis.level %] data added

-
    - [% FOREACH fwklis IN lis.fwklist %] -
  • [% fwklis.fwkname %][% IF ( fwklis.error ) %]
    [% fwklis.error %][% END %]
  • - [% END %] -
- [% END %] -

All done!

-

Installation complete.
-

Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool. -

- - - -
-

-

-[% END %] - + [% END %] -[% IF ( importdatastructure ) %] - [% IF ( error ) %] -

The following error occurred while importing the database structure:

-

[% error %]

-

Please contact your system administrator

- [% ELSE %] -

Success

-
    -
  • Database tables created
  • -
-
- -

Click 'Next' to continue

-
- [% END %] -[% END %] + [% IF ( proposeimport ) %] +

Web installer › Set up database

+

Now we're ready to create the database tables and fill them with some default data.

+
+ + +

+
+ [% END %] + [% IF ( default ) %] + [% IF ( upgrading ) %] +

Web installer › Update database

+

We are upgrading from Koha [% dbversion %] to [% kohaversion %]

+

Update your database

+ [% ELSE %] +

Web installer › Install basic configuration settings

+

We are ready to do some basic configuration.

+

Continue to the next step

+ [% END %] + [% END %] -[% IF ( proposeimport ) %] -

Now we're ready to create the database tables and fill them with some default data.

-
- - -

Click 'Next' to continue

-
-[% END %] + [% IF ( updatestructure ) %] +

Updating database structure

+ [% IF ( has_update_succeeds ) %] +

Update report :

+
    + [% FOREACH update_repor IN update_report %] +
  • [% update_repor.line |html %]
  • + [% END %] +
+ [% END %] -[% IF ( default ) %] - [% IF ( upgrading ) %] -

- We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database. -
- -

- [% ELSE %] -

We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation: -
-
- + [% IF ( has_update_errors ) %] +

Update errors :

+
    + [% FOREACH update_error IN update_errors %] +
  • [% update_error.line |html %]
  • + [% END %] +
+ [% END %] - [% END %] -[% END %] + [% UNLESS ( has_update_errors ) %] +

Everything went okay. Update done.

+ [% END %] +

Continue to log in to Koha

+ [% END # / IF updatestructure %] +
+ -[% IF ( updatestructure ) %] -

Updating database structure

- [% IF ( has_update_succeeds ) %] -

Update report :

-
    - [% FOREACH update_repor IN update_report %] -
  • [% update_repor.line |html %]
  • - [% END %] -
- [% END %] - [% IF ( has_update_errors ) %] -

Update errors :

-
    - [% FOREACH update_error IN update_errors %] -
  • [% update_error.line |html %]
  • - [% END %] -
- [% END %] - [% UNLESS ( has_update_errors ) %] -

Everything went OK, update done.

- [% END %] - -
+[% IF ( selectframeworks ) %] + [% END %] - - - +[% INCLUDE '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 b295fc9..0c74249 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt @@ -1,81 +1,71 @@ [% INCLUDE 'doc-head-open.inc' %] - -[% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'datatables.inc' %] - [% IF (libraries && libraries.count > 1) %] +[% END %] +Koha › Web installer › Create a library +[% INCLUDE 'installer-doc-head-close.inc' %] + -[% ELSIF (op == "add_validate_library") %] - - Welcome › to › Koha - + +
+
+
- -
-

Koha Welcome to Koha

-
+

Koha

+ + [% IF (op == "add_validate_library") %] - - [% IF message == "success_on_insert" %] -
- -

New library

-
-

Success: library created! -

-

To add another library and for more settings,
- go to:
- More -> Administration -> Libraries and groups
-

-
- Next up: - -
+ - [%ELSE %] -
- -

Failed

-
-

Library was not successfully created
- Please try again or contact your system administrator.

-
- -
- [%END%] + [% IF message == "success_on_insert" %] +

Web installer › Library created

-[% ELSE %] - - Welcome › to › Koha - +
+ +
Success: Library created!
+

To add another library and for more settings, go to:

+ + +
+ [% ELSE %] +

Web installer › Library creation failed

- -
-

Koha Welcome to Koha

+
+ +
Library was not successfully created
+

Please try again or contact your system administrator.

+ +
+ [% END %] + + [% ELSE %] + + +

Web installer › Create a library

+ +
+
+ + +
    +
  1. + + + Required +
  2. +
  3. + + + Required +
  4. +
+ +
+
+ + [% END # / IF add_validate_library %]
+
- -
-
-

Create a library

- - -
    -
  1. - - - Required -
  2. -
  3. - - - Required -
  4. -
-
- -
-
-[% END %] +[% INCLUDE '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 f0e90aa..f310cbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt @@ -2,163 +2,137 @@ [% USE KohaDates %] [% USE Price %] [% INCLUDE 'doc-head-open.inc' %] - Add a patron category +Koha › Web installer › Add a patron category +[% IF (categories && categories.count > 1 ) + # This if statement checks if the categories variable handed to this template + # by onboarding.pl has data in it. If the categories variable does have data + # in it this means that the user has previously imported sample patron category + # data and so we do not need to show them the create patron category screen 1, + #instead we can display a screen with ubtton redirecting the user to step 3 %] + +[% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] [% INCLUDE 'js_includes.inc' %] -[% INCLUDE 'datatables.inc' %] - - +[% INCLUDE 'validator-strings.inc' %] +[% INCLUDE 'installer-strings.inc' %] + -[% IF (categories && categories.count > 1 ) %] - - - - -[% ELSIF (op == "add_validate_category") %] - - -
-

Koha Welcome to Koha

-
- - [% IF message != "error_on_insert" %] -
- -

New patron category

-
-

Success: patron category created!

-

To add another patron category and for more settings
- go to:
- More -> Administration -> Patron categories
-

- Next up:
- -
- [% ELSE %] -
- Message is [% message %] - -

Failed

-
Patron category was not successfully created.
- Please try again or contact your system administrator.

-
- -
- [% END %] - - -[% ELSE %] -
-

Koha Welcome to Koha

-
- -

Create a new patron category

-

The patron category you create in this form is going to be the one which the new administrator patron account will have.

-
-
- - -
    -
  1. - - - Required -
  2. - -
  3. - - - Required -
  4. - -
  5. - - +
    Success: Patron category created!
    +

    To add another patron category and for more settings go to:

    + + +
  6. + [% ELSE %] + +

    Web installer › Patron category creation failed

    + +
    + +
    + Patron category was not successfully created. + Message is [% message %] +
    +

    Please try again or contact your system administrator.

    + +
    + [% END %] + + + [% ELSE + # Else display create patron category screen 1 where the user + # can input values to create their first patron category %] + +

    Web installer › Create a patron category

    + +

    The patron category you create will be used by the administrator account.

    + +
    +
    + + +
      +
    1. + + + Required +
    2. + +
    3. + + + Required +
    4. + +
    5. + + -
    6. - -
    7. - - - Required -
    8. - -
    9. - - +
    10. + +
    11. + Category type: + + Staff +
    12. + +
    13. + + -

      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 batch_anonymise.pl which should be set up by your system administrator.

      -
    14. -
    - Enrolment period: -
    -
    - Choose one -
      -
    1. - - months -
    2. -
    3. - - -
    4. -
    -
    -
    - -
    -
    -[% END %] + +
    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 batch_anonymise.pl which should be set up by your system administrator.
    + +
  7. + Enrolment period: +
    +
      +
    1. + Choose one +
    2. +
    3. + + months +
    4. +
    5. + + +
      [% INCLUDE 'date-format.inc' %]
      +
    6. +
    +
    +
  8. +
+ +
+ + [% END %] +
+
[% INCLUDE 'intranet-bottom.inc' %] 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 de2e595..0fa15b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt @@ -1,196 +1,157 @@ -[% USE Koha %] -[% USE KohaDates %] -[% USE Price %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( finish ) %][% END%] +Koha › Web installer › Create Koha administrator patron [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'calendar.inc' %] -[% INCLUDE 'datatables.inc' %] [% INCLUDE 'js_includes.inc' %] +[% INCLUDE 'validator-strings.inc' %] +[% INCLUDE 'installer-strings.inc' %] - -Create Koha administrator patron - - - -
-

Koha Welcome to Koha

-
+ +
+
+
+ +

Koha

+ + [% IF (nok) %] + +

Web installer › Administrator patron creation failed

+ +
+ +
+
    + [% IF errorloginexists %] +
  • Username/password already exists.
  • + [% END %] + [% IF errorcardnumberexists %] +
  • Cardnumber already in use.
  • + [% END %] + [% IF errorcardnumberlength %] +
  • Cardnumber length is incorrect
  • + [% END %] + [% IF errorshortpassword %] +
  • Password length is incorrect, must be at least [% minPasswordLength %] characters long.
  • + [% END %] + [% IF errorpasswordmismatch %] +
  • Passwords do not match.
  • + [% END %] +
+
+ +
+ + [% ELSIF op == 'add_validate' # New patron created %] + +

Web installer › Koha administrator patron created

+ +
+ +
Success: Administrator patron created!
+

To create another patron, go to:

+ + +
+ + [% ELSE %] + +

Web installer › Create Koha administrator patron

+ +

+ Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member with all permissions. +

+ +
+
+ + +

Administrator identity

+
    +
  1. + + + Required +
  2. +
  3. + + + Required +
  4. +
+ +
    +
  1. + + [% IF patrons && patrons > 1 %] + + [% ELSE %] + + [% END %] + Required +
  2. +
  3. + + + + + Required +
  4. +
  5. + + + Required

    + Note: If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box. +
  6. +
+ +

Administrator account permissions

+
    +
  1. + + + superlibrarian +
  2. +
+ +

Administrator login

+
    +
  1. + + + + Required +
  2. +
  3. + + + Required +
  4. +
  5. + + + Required +
  6. +
+
+ +
-[% IF (nok) %] -
- -

There was an error

-

Try again

-
-
    - [% IF errorloginexists %] -
  • Username/password already exists.
  • - [% END %] - [% IF errorcardnumberexists %] -
  • Cardnumber already in use.
  • - [% END %] - [% IF errorcardnumberlength %] -
  • Cardnumber length is incorrect
  • - [% END %] - [% IF errorshortpassword %] -
  • Password length is incorrect, must be at least [% minPasswordLength %] characters long.
  • - [% END %] - [% IF errorpasswordmismatch %] -
  • Passwords do not match.
  • [% END %] -
- -
- -
- - - -[% ELSIF op == 'add_validate' %] - -
- -

Koha administrator patron

-
-

Success: administrator patron created!

-

To create another patron, go to Patrons -> New Patron.
- More -> Set Permissions in a user page to gain superlibrarian permissions. -

- Next up: - -
-[% ELSE %] - -

Create koha administrator patron

-

- Now we will create a patron with superlibrarian permissions. Login with this to access Koha as a staff member will all permissions. -

-
-
- - - Library management -
    -

    Patron identity

    -
  1. - - - Required -
  2. -
  3. - - - Required -
  4. -
- -
    -
  1. - - [% IF patrons && patrons > 1 %] - - [% ELSE %] - - [% END %] - Required -
  2. -
  3. - - - - - Required -
  4. -
  5. - - - Required

    - Note: If you installed sample patron categories please select the "Staff" option in the patron categories dropdown box. -
  6. -
- -
    -

    Koha administrator patron permissions

    - -
  1. - - -
  2. -
-
    -

    OPAC/Staff Login

    -
  1. - - - - Required -
  2. -
  3. - - - Required -
  4. -
  5. - - - Required -
  6. -
-

- -
-[% END %] +
+
+ +[% INCLUDE 'intranet-bottom.inc' %] 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 6176fb4..5a2c597 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt @@ -1,67 +1,82 @@ [% INCLUDE 'doc-head-open.inc' %] -[% IF ( finish ) %][% END%] +[% IF ( finish ) %] + +[% ELSIF ( op != "add_validate" && itemtypes && itemtypes.count > 1 ) %] + +[% END %] +Koha › Web installer › Create a new item type [% INCLUDE 'installer-doc-head-close.inc' %] - - Create item type +[% INCLUDE 'validator-strings.inc' %] +[% INCLUDE 'installer-strings.inc' %] + -
-

Koha Welcome to Koha

-
-[% IF (itemtypes && itemtypes.count >1) %] + - +
+
+
-[% ELSIF op == "add_validate" %] - [% IF message != "error_on_insert" %] -
- -

New Item type

-
-

Success: New item type created!

-

To create another item type later and for more settings
- go to:
- More -> Administration -> Item types
-

- Next up: - -
- [% ELSE %] -
- -

Failed

-
-

Item type was not successfully created.
- Please try again or contact your system administrator. -

-
-
- - [% END %] -[% ELSE %] - -

Create a new Item type

-

Item types are used to group related items. Examples of item types are books, cds, and DVDs.

When adding to your institutions catalogue you will create an item of a particular item type.

Importantly item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items, for example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for borrowing any DVD.

-
-
- - -
    -
  1. - - - Required -
  2. +

    Koha

    -
  3. - - - Required -
  4. -
-
- -
-
-[% END %] + [% IF op == "add_validate" %] + [% IF message != "error_on_insert" %] + +

Web installer › Item type created

+ +
+ +
Success: New item type created!
+

To create another item type later and for more settings go to:

+ + +
+ [% ELSE %] + +

Web installer › Item type creation failed

+ +
+ +

Failed

+
+

Item type was not successfully created.
+ Please try again or contact your system administrator. +

+
+
+ + [% END %] + [% ELSE %] + +

Web installer › Create a new item type

+ +

Item types are used to group related items. Examples of item types might be books, CDs, or DVDs.

+

When adding to your institution's catalog you will create an item of a particular item type.

+

Importantly item types are what you apply circulation rules to. Circulation rules govern how your institution will lend its items: Checkout length, renewal policy, hold policy, etc. For example a circulation rule applied to the DVD item type may enforce a payment of $1.00 for checking out any DVD.

+ +
+
+ + +
    +
  1. + + + Required +
  2. + +
  3. + + + Required +
  4. +
+ +
+
+ [% END %] +
+
+ +[% INCLUDE 'intranet-bottom.inc' %] 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 81ba89c..e4366fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -1,127 +1,131 @@ [% INCLUDE 'doc-head-open.inc' %] -Create Circulation rule +Koha › Web installer › Create circulation rule [% IF ( finish ) %][% END %] [% INCLUDE 'installer-doc-head-close.inc' %] +[% INCLUDE 'validator-strings.inc' %] +[% INCLUDE 'installer-strings.inc' %] + + -
-

Koha Welcome to Koha

-
+ -[% IF (finish) %] -

Congratulations you have finished and ready to use Koha

-Start using Koha +
+
+
-[% END %] +

Koha

- -[% IF op == "add_validate" %] - -
- -

New circulation rule

-
-

Success: circulation rule created!

-

To create circulation rule, go to
- More -> Administration -> Circulation and Fine Rules -

- Next up: - -
-[% ELSE %] - -

Create a new circulation rule

-
-
- - -
    -
  1. - - - Required -
  2. -
  3. - - - Required -
  4. + [% IF (finish) %] -
  5. - - - Required -
  6. -
  7. - - - Required -
  8. +

    Web installer › Complete

    +

    Congratulations you have finished and ready to use Koha

    + Start using Koha -
  9. - - - Required -
  10. -
  11. - - -
  12. -
  13. - - - Required -
  14. + -
  15. - - - Required -
  16. + [% IF op == "add_validate" %] + +

    Web installer › New circulation rule created

    + + +
    + Success: circulation rule created! +
    +

    To create more circulation rules, go to:

    + + + + [% ELSE %] -
  17. - - -
  18. -
-

- - -[% END %] + +

Web installer › Create a new circulation rule

+
+
+ + +
    +
  1. + + + Required +
  2. +
  3. + + + Required +
  4. + +
  5. + + + Required +
  6. +
  7. + + + Required +
  8. + +
  9. + + + Required +
  10. +
  11. + + +
  12. +
  13. + + + Required +
  14. + +
  15. + + + Required +
  16. + +
  17. + + +
  18. +
+
+ +
+ [% END %] +
+
+ +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/onboarding.js b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js new file mode 100644 index 0000000..9b1d13d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/js/onboarding.js @@ -0,0 +1,150 @@ +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; + 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 +); + +jQuery.validator.addMethod( "enrollment_period", function(){ + enrolmentperiod = $("#enrolmentperiod").val(); + enrolmentperioddate = $("#enrolmentperioddate").val(); + if (( $("#enrolmentperiod").val() === "" && $("#enrolmentperioddate").val() === "") || ($("#enrolmentperiod").val() !== "" && $("#enrolmentperioddate").val() !== "")) { + return false; + } else { + return true; + } + }, MSG_ONLY_ONE_ENROLLMENTPERIOD +); + +jQuery.validator.addMethod( "password_match", function(value,element){ + var MSG_PASSWORD_MISMATCH = ( MSG_PASSWORD_MISMATCH ); + var password = document.getElementById('password').value; + var confirmpassword = document.getElementById('password2').value; + + if ( password != confirmpassword ){ + return false; + } + else{ + return true; + } + }, 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; + return true; +} + +$(document).ready(function() { + if ($("#branches option:selected").length < 1) { + $("#branches option:first").attr("selected", "selected"); + } + $("#categorycode").on("blur",function(){ + toUC(this); + }); + + $("#enrolmentperioddate").datepicker({ + minDate: 1 + }); // Require that "until date" be in the future + + $("#category_form").validate({ + rules: { + categorycode: { + required: true, + category_code_check: true + }, + description: { + required:true + }, + enrolmentperiod: { + 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()); + }, + dateofbirthrequired: { + digits: true + }, + upperagelimit: { + digits: true + }, + enrolmentfee: { + number: true + }, + reservefee: { + number: true + }, + category_type: { + required: true + } + }, + messages: { + enrolmentperiod: { + required: MSG_ONE_ENROLLMENTPERIOD + }, + enrolmentperioddate: { + required: MSG_ONE_ENROLLMENTPERIOD + } + } + }); + + $("#createpatron").validate({ + rules: { + surname: { + required: true + }, + firstname: { + required: true + }, + cardnumber: { + required: true + }, + password: { + password_match: true + } + }, + messages: { + password: { + required: MSG_PASSWORD_MISMATCH + }, + } + + }); + + $("#createitemform").validate(); + $("#createcirculationrule").validate(); +}); -- 2.7.4