From 56d5984f821c94f28fe612f1cc71bb716738c224 Mon Sep 17 00:00:00 2001 From: Hayley Mapley Date: Thu, 28 Mar 2019 10:39:40 +1300 Subject: [PATCH] Bug 18308: (follow up) Changed order of onboarding steps This patch cleans up the previous patches according to comment 23, fixes various typos, and changes the order of steps in the onboarding so that the setting of minPasswordLength occurs before the admin password is set. Test plan: 1) Drop and recreate your database, and restart_all 2) Go through installation and onboarding 3) Note that the order of steps is: 1 Create a library 2 Create a ptron category 3 Create Koha administrator patron 4 Create a new item type 5 Create a new circulation rule 6 Set minPasswordLength syspref/Complete 4) Repeat steps 1 & 2 5) Note that the order of steps is now: 1 Create a library 2 Create a patron category 3 Set minPasswordLength syspref 4 Create Koha administrator patron 5 Create a new item type 6 Create a new circulation rule/Complete 6) Verify that the minPasswordLength syspref is set to the value from onboarding 7) Verify that the patron, item type, and circulation rule made in the onboarding exist in the administration 8) Sign off! Sponsored-by Catalyst IT --- installer/onboarding.pl | 40 +++--- .../prog/en/modules/onboarding/onboardingstep3.tt | 133 +++++-------------- .../prog/en/modules/onboarding/onboardingstep4.tt | 103 ++++++++++++--- .../prog/en/modules/onboarding/onboardingstep5.tt | 147 +++++---------------- .../prog/en/modules/onboarding/onboardingstep6.tt | 114 +++++++++++++--- 5 files changed, 269 insertions(+), 268 deletions(-) diff --git a/installer/onboarding.pl b/installer/onboarding.pl index 785b686ddd..32944c51b6 100755 --- a/installer/onboarding.pl +++ b/installer/onboarding.pl @@ -136,7 +136,22 @@ if ( $step == 2 ) { $step++ if Koha::Patron::Categories->count; } + if ( $step == 3 ) { + if ( $op eq 'set_validate_min_password_length' ) { + my $minPasswordLength = $input->param('pref_minPasswordLength'); + C4::Context->set_preference( 'minPasswordLength', $minPasswordLength ); + unless ($@) { + push @messages, { code => 'success_on_update_minPasswordLength_syspref' }; + $step++; + } + else { + push @messages, { code => 'error_on_update_minPasswordLength_syspref' }; + } + } +} + +if ( $step == 4 ) { if ( $op eq 'add_validate_patron' ) { #Create a patron @@ -202,7 +217,8 @@ if ( $step == 3 ) { $step++ if Koha::Patrons->search( { flags => 1 } )->count; } -if ( $step == 4 ) { + +if ( $step == 5 ) { if ( $op eq 'add_validate_itemtype' ) { my $description = $input->param('description'); my $itemtype_code = $input->param('itemtype'); @@ -226,9 +242,9 @@ if ( $step == 4 ) { $step++ if Koha::ItemTypes->count; } -if ( $step == 5 ) { - if ( $op eq 'add_validate_circ_rule' ) { +if ( $step == 6 ) { + if ( $op eq 'add_validate_circ_rule' ) { #If no libraries exist then set the $branch value to * my $branch = $input->param('branch') || '*'; @@ -286,25 +302,9 @@ if ( $step == 5 ) { } } } - $step++ if Koha::IssuingRules->count; } -if ( $step == 6 ) { - if ( $op eq 'set_validate_min_password_length' ) { - my $minPasswordLength = $input->param('pref_minPasswordLength'); - warn $minPasswordLength; - C4::Context->set_preference( 'minPasswordLength', $minPasswordLength ); - unless ($@) { - push @messages, { code => 'success_on_update_minPasswordLength_syspref' }; - $step++; - } - else { - push @messages, { code => 'error_on_update_minPasswordLength_syspref' }; - } - } -} - my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); $template_params->{libraries} = $libraries; @@ -312,7 +312,7 @@ my $minPasswordLength = C4::Context->preference('minPasswordLength'); $template_params->{minPasswordLength} = $minPasswordLength; if ( $step > 6 ) { - $template_params->{all_done} = 1; # If step 5 is complete, we are done! + $template_params->{all_done} = 1; # If step 6 is complete, we are done! $step = 6; } 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 eed7068f05..7da53e68c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt @@ -1,6 +1,11 @@ -[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Web installer › Create Koha administrator patron +Koha › Web installer › + [% IF all_done %] + Complete + [% ELSE %] + Create circulation rule + [% END %] + [% INCLUDE 'installer-doc-head-close.inc' %] @@ -9,114 +14,36 @@

Koha

-

Web installer › Create Koha administrator patron

- - [% INCLUDE 'onboarding_messages.inc' %] - -

- Now we will create a patron with superlibrarian permissions. Log in 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. -
-

- To create another patron, go to: - Patrons › New patron -

-

- To edit patron permissions, go to: - More › Set permissions -

-
- - -
+

Web installer › Set minPasswordLength system preference

+ [% INCLUDE 'onboarding_messages.inc' %] + + The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to. + +
+
+ + +
    +
  1. + + + Required +
  2. +
+

+ To amend the minPasswordLength system preference go to: + Administration › Global system preferences › Patrons +

+
+ +
- [% 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' %] - 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 ba41c63488..876a746896 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt @@ -1,5 +1,6 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Web installer › Create a new item type +Koha › Web installer › Create Koha administrator patron [% INCLUDE 'installer-doc-head-close.inc' %] @@ -8,39 +9,102 @@

Koha

-

Web installer › Create a new item type

+

Web installer › Create Koha administrator patron

[% INCLUDE 'onboarding_messages.inc' %] - - -

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.

-

Importantl: 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.

- -
+

+ Now we will create a patron with superlibrarian permissions. Log in 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. +
-

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

Administrator account permissions

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

Administrator login

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

+ To create another patron, go to: + Patrons › New patron +

+

+ To edit patron permissions, go to: + More › Set permissions

-
+ +
@@ -50,6 +114,9 @@ [% 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' %] \ No newline at end of file +[% INCLUDE 'installer-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 bdeda07463..7744f05160 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -1,11 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Web installer › - [% IF all_done %] - Complete - [% ELSE %] - Create circulation rule - [% END %] - +Koha › Web installer › Create a new item type [% INCLUDE 'installer-doc-head-close.inc' %] @@ -14,111 +8,40 @@

Koha

- -

Web installer › Create a new circulation rule

- - [% INCLUDE 'onboarding_messages.inc' %] - -
-
- - -
    -
  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. -
-

- To create circulation rule, go to: - Administration › Circulation and fine rules -

- -
- +

Web installer › Create a new item type

+ + [% INCLUDE 'onboarding_messages.inc' %] + + + +

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.

+

Important: 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. +
+ +

To create another item type later and for more settings go to: + Administration › Item types +

- +
+
@@ -129,4 +52,4 @@ [% END %] -[% INCLUDE 'installer-intranet-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'installer-intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt index f02435646f..4161f71b31 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt @@ -7,47 +7,131 @@ [% END %] [% INCLUDE 'installer-doc-head-close.inc' %] -[% INCLUDE 'validator-strings.inc' %] -[% INCLUDE 'installer-strings.inc' %] -
-
+

Koha

[% IF all_done %]

Web installer › Complete

[% INCLUDE 'onboarding_messages.inc' %] -

Congratulations you have finished and are ready to use Koha

+

Congratulations! You have finished and are ready to use Koha

Start using Koha [% ELSE %] -

Web installer › Set minPasswordLength system preference

+

Web installer › Create a new circulation rule

[% INCLUDE 'onboarding_messages.inc' %] - The minPasswordLength system preference is a setting for the shortest length library staff and patrons can set their passwords to. - -
+
- +
  1. - - + + + Required +
  2. +
  3. + + + Required +
  4. + +
  5. + + + Required +
  6. +
  7. + + + Required +
  8. + +
  9. + + + Required +
  10. +
  11. + + +
  12. +
  13. + + Required
  14. + +
  15. + + + Required +
  16. + +
  17. + + +

- To amend the minPasswordLength system preference go to: - Administration › Global system preferences › Patrons + To create circulation rule, go to: + Administration › Circulation and fine rules

+
+
[% END %]
+
+ +[% MACRO jsinclude BLOCK %] + [% INCLUDE 'validator-strings.inc' %] + [% INCLUDE 'installer-strings.inc' %] + +[% END %] -[% INCLUDE 'intranet-bottom.inc' %] +[% INCLUDE 'installer-intranet-bottom.inc' %] -- 2.11.0