Bugzilla – Attachment 78196 Details for
Bug 21265
Additional step at end of onboarder to enable HEA
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21265 - Added onboardingstep6 to the end of onboarding tool.
Bug-21265---Added-onboardingstep6-to-the-end-of-on.patch (text/plain), 4.06 KB, created by
Alex Buckley
on 2018-08-27 19:49:49 UTC
(
hide
)
Description:
Bug 21265 - Added onboardingstep6 to the end of onboarding tool.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-08-27 19:49:49 UTC
Size:
4.06 KB
patch
obsolete
>From 1436d3bfa9effa37f2ab9f28aa1571016b33cad8 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sat, 25 Aug 2018 19:17:08 +1200 >Subject: [PATCH] Bug 21265 - Added onboardingstep6 to the end of onboarding > tool. > >This step is to add values/enable HEA. >--- > installer/onboarding.pl | 37 ++++++++++++++++++++-- > .../prog/en/modules/onboarding/onboardingstep5.tt | 14 -------- > 2 files changed, 34 insertions(+), 17 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index ceee2e4..b04840a 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -31,6 +31,7 @@ use Koha::Patrons; > use Koha::Patron::Categories; > use Koha::ItemTypes; > use Koha::IssuingRules; >+use Locale::Country; > > #Setting variables > my $input = new CGI; >@@ -271,14 +272,44 @@ if ( $step == 5 ) { > } > > $step++ if Koha::IssuingRules->count; >+ >+} if ($step == 6) { >+ if ( $op eq 'add_usage_data_sysprefs') { >+ my $usagestats = $input->param('usagestats'); >+ my $usagestatscountry = $input->param('usagestatscountry'); >+ my $usagestatslibraryname = $input->param('usagestatslibraryname'); >+ my $usagestatscountrytype = $input->param('usagestatscountrytype'); >+ my $usagestatslibraryurl = $input->param('usagestatslibraryurl'); >+ >+ my %statsprefvalues = ( >+ "UsageStats" => $usagestats, >+ "UsageStatsCountry" => $usagestatscountry, >+ "UsageStatsLibraryName" => $usagestatslibraryname, >+ "UsageStatsCountryType" => $usagestatscountrytype, >+ "UsageStatsLibraryURL" => $usagestatslibraryurl, >+ ); >+ >+ #Loop through the HEA syspref key value pairs >+ while(my($pref, $value) = each %statsprefvalues ) { >+ C4::Context->set_preference( $pref, $value ); >+ } >+ unless ($@) { >+ push @messages, { code => 'success_on_insert_circ_rule'}; >+ } >+ else { >+ push @messages, { code => 'error_on_insert_circ_rule' }; >+ } >+ $step++; >+ warn $op; >+ } > } > > my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); > $template_params->{libraries} = $libraries; > >-if ( $step > 5 ) { >- $template_params->{all_done} = 1; # If step 5 is complete, we are done! >- $step = 5; >+if ( $step > 6 ) { >+ $template_params->{all_done} = 1; # If step 6 is complete, we are done! >+ $step = 6; > } > > #Getting the appropriate template to display to the user >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..94fda9f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt >@@ -1,10 +1,6 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Web installer › >- [% IF all_done %] >- Complete >- [% ELSE %] > Create circulation rule >- [% END %] > </title> > [% INCLUDE 'installer-doc-head-close.inc' %] > [% INCLUDE 'validator-strings.inc' %] >@@ -18,15 +14,6 @@ > <div id="onboarding-step5" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > <h1 id="logo"><a href="#">Koha</a></h1> > >- [% IF all_done %] >- >- <h2>Web installer › Complete</h2> >- [% INCLUDE 'onboarding_messages.inc' %] >- <h3>Congratulations you have finished and are ready to use Koha</h3> >- <a class="btn btn-success" href="/cgi-bin/koha/mainpage.pl">Start using Koha</a> >- >- [% ELSE %] >- > <h2>Web installer › Create a new circulation rule </h2> > > [% INCLUDE 'onboarding_messages.inc' %] >@@ -131,7 +118,6 @@ > > <input type="submit" class="btn btn-primary" value="Submit" /> > </form> >- [% END %] > </div> <!-- / #onboarding-step5 --> > </div> <!-- / .row --> > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21265
: 78196