From f5fc081265c4398f046484b495356ef11405b71d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 2 May 2017 18:24:23 -0300 Subject: [PATCH] Bug 17942: Remove type for messages It it no longer in used by the templates. Also add the include files for step5 (if the circ rule is not inserted) Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- installer/onboarding.pl | 42 ++++++------------- .../en/modules/onboarding/onboardingstep5.tt | 1 + 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/installer/onboarding.pl b/installer/onboarding.pl index 02d4827777..8b032c999b 100755 --- a/installer/onboarding.pl +++ b/installer/onboarding.pl @@ -76,12 +76,10 @@ if ( $step == 1 ) { eval { $library->store; }; unless ($@) { - push @messages, - { type => 'message', code => 'success_on_insert_library' }; + push @messages, { code => 'success_on_insert_library' }; } else { - push @messages, - { type => 'message', code => 'error_on_insert_library' }; + push @messages, { code => 'error_on_insert_library' }; } } @@ -130,12 +128,10 @@ if ( $step == 2 ) { eval { $category->store; }; unless ($@) { - push @messages, - { type => 'message', code => 'success_on_insert_category' }; + push @messages, { code => 'success_on_insert_category' }; } else { - push @messages, - { type => 'message', code => 'error_on_insert_category' }; + push @messages, { code => 'error_on_insert_category' }; } } @@ -152,21 +148,15 @@ if ( $step == 3 ) { if ( my $error_code = checkcardnumber($cardnumber) ) { if ( $error_code == 1 ) { - push @messages, - { - type => 'alert', - code => 'ERROR_cardnumber_already_exists' - }; + push @messages, { code => 'ERROR_cardnumber_already_exists' }; } elsif ( $error_code == 2 ) { - push @messages, - { type => 'alert', code => 'ERROR_cardnumber_length' }; + push @messages, { code => 'ERROR_cardnumber_length' }; } } elsif ( $firstpassword ne $secondpassword ) { - push @messages, - { type => 'alert', code => 'ERROR_password_mismatch' }; + push @messages, { code => 'ERROR_password_mismatch' }; } else { @@ -194,12 +184,10 @@ if ( $step == 3 ) { #Error handling checking if the patron was created successfully if ($borrowernumber) { - push @messages, - { type => 'message', code => 'success_on_insert_patron' }; + push @messages, { code => 'success_on_insert_patron' }; } else { - push @messages, - { type => 'error', code => 'error_on_insert_patron' }; + push @messages, { code => 'error_on_insert_patron' }; } } } @@ -221,12 +209,10 @@ if ( $step == 4 ) { eval { $itemtype->store; }; unless ($@) { - push @messages, - { type => 'message', code => 'success_on_insert_itemtype' }; + push @messages, { code => 'success_on_insert_itemtype' }; } else { - push @messages, - { type => 'message', code => 'error_on_insert_itemtype' }; + push @messages, { code => 'error_on_insert_itemtype' }; } } @@ -269,12 +255,10 @@ if ( $step == 5 ) { eval { $issuingrule->store; }; unless ($@) { - push @messages, - { type => 'message', code => 'success_on_insert_circ_rule' }; + push @messages, { code => 'success_on_insert_circ_rule' }; } else { - push @messages, - { type => 'message', code => 'error_on_insert_circ_rule' }; + push @messages, { code => 'error_on_insert_circ_rule' }; } } 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 af203edc42..dfae544472 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -21,6 +21,7 @@ [% IF all_done %]

Web installer › Complete

+ [% INCLUDE 'onboarding_messages.inc' %]

Congratulations you have finished and are ready to use Koha

Start using Koha -- 2.39.5