Bugzilla – Attachment 60679 Details for
Bug 18002
Aquisitions onboarding tool - to help users set up acquisitions the first time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18002 - Successful insertion of budget and fund in the acquisitions onboarding tool followed by the acquisition home page being displayed.
Bug-18002---Successful-insertion-of-budget-and-fun.patch (text/plain), 6.39 KB, created by
Alex Buckley
on 2017-02-26 07:42:57 UTC
(
hide
)
Description:
Bug 18002 - Successful insertion of budget and fund in the acquisitions onboarding tool followed by the acquisition home page being displayed.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-02-26 07:42:57 UTC
Size:
6.39 KB
patch
obsolete
>From 728685d36dff0db29ea5f924f3c4efb490a2cc7f Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 17 Feb 2017 22:55:29 +0000 >Subject: [PATCH] Bug 18002 - Successful insertion of budget and fund in the > acquisitions onboarding tool followed by the acquisition home page being > displayed. > >Also the order of the form display in the acquisition onboarding tool is >now correct with the budget being displayed first then fund. >--- > acqui/acqui-home.pl | 18 +++++++------- > admin/aqbudgetperiods.pl | 4 +-- > admin/aqbudgets.pl | 5 ++++ > .../prog/en/includes/onboardinginclude2.inc | 29 +++++++++++++--------- > .../prog/en/modules/admin/aqbudgets.tt | 2 +- > 5 files changed, 34 insertions(+), 24 deletions(-) > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index c1fcf39..04bb261 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -66,6 +66,15 @@ my $totspent_active = 0; > my $totordered_active = 0; > my $totavail_active = 0; > >+my $budgets = GetBudgetPeriod(1); >+if ($budgets > 0){ >+ my $stepfund = 2; >+ $template->param( stepfund => $stepfund ); >+} else { >+ my $stepfund = 1; >+ $template->param( stepfund => $stepfund ); >+} >+ > my @budget_loop; > foreach my $budget ( @{$budget_arr} ) { > next unless (CanUserUseBudget($loggedinuser, $budget, $userflags)); >@@ -107,15 +116,6 @@ foreach my $budget ( @{$budget_arr} ) { > push @budget_loop, $budget; > } > >-my $budgets = GetBudgetPeriod(); >-if ($budgets > 0) { >- my $stepfund = 2; >- $template->param( stepfund => $stepfund ); >-}else{ >- my $stepfund = 1; >- $template->param( stepfund => $stepfund ); >-} >- > $template->param( > type => 'intranet', > loop_budget => \@budget_loop, >diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl >index 1aad2e8..1935aee 100755 >--- a/admin/aqbudgetperiods.pl >+++ b/admin/aqbudgetperiods.pl >@@ -120,8 +120,8 @@ elsif ( $op eq 'add_validate' ) { > } > else { # ELSE ITS AN ADD > my $budget_period_id=AddBudgetPeriod($budget_period_hashref); >- my $step= $input->param( 'step' ); >- $template->param( step => $step); >+ my $stepfund = $input->param( 'step' ); >+ $template->param( stepfund => $stepfund ); > print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); > exit; > } >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index 483ff8f..57e2bb2 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -180,6 +180,7 @@ if ($op eq 'add_form') { > # END $OP eq ADD_FORM > #---------------------- DEFAULT DISPLAY BELOW --------------------- > >+ > # called by default form, used to confirm deletion of data in DB > } elsif ($op eq 'delete_confirm') { > >@@ -221,6 +222,10 @@ if ($op eq 'add_form') { > $budget_hash->{budget_id} = AddBudget( $budget_hash ); > ModBudgetUsers($budget_hash->{budget_id}, @budgetusersid); > $budget_modified = 1; >+ >+ print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); >+ exit; >+ > } > > my $set_owner_to_children = $input->param('set_owner_to_children'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >index 00d4afd..51ea060 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >@@ -25,14 +25,13 @@ > <input type="hidden" name="op" value="add_validate" /> > <input type="hidden" name="checked" value="0" /> > <ol> >- [% IF ( budget_parent_id ) %] >- <li> >- <span class="label">Fund parent: </span> >- [% budget_parent_name %] >- [% budget_parent_id %] - [% budget_parent_name %] >- <input type="hidden" name="budget_parent_id" value="[% budget_parent_id %]" /> >- </li> >- [% END %] >+ [% budget_parent_id = 0 %] >+ <li> >+ <span class="label">Fund parent: </span> >+ [% budget_parent_name %] >+ [% budget_parent_id %] - [% budget_parent_name %] >+ <input type="hidden" name="budget_parent_id" value= NULL /> >+ </li> > <li> > <label class="required" for="budget_code">Fund code: </label> > <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" /> >@@ -48,10 +47,16 @@ > <input type="text" name="budget_amount" id="budget_amount" value="[% budget_amount | $Price on_editing => 1 %]" size="8" /> > </li> > >- <fieldset class="action"> >- <input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a> >- <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" /> >- </fieldset> >+ <input type="hidden" name="budget_owner_id" id="budget_owner_id" value="0" /> >+ >+ [% IF ( budget_id ) %] >+ <input type="hidden" name="budget_id" value="[% budget_id %]" /> >+ [% END %] >+ >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl">Cancel</a> >+ <input type="hidden" name="budget_period_id" value="1" /> > </fieldset> > </form> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >index a3c9ee9..6e09b87 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt >@@ -453,7 +453,7 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") > > <!-- ********************************************************************************************** --> > <!-- create add/mod entry form --> >-[% IF op == 'add_form' && !error_not_authorised_to_modify %] >+[% IF op == 'add_form' %] > <form action="/cgi-bin/koha/admin/aqbudgets.pl" id="edit_fund" name="Aform" method="post"> > <fieldset class="rows"> > <legend>[% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund >-- >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 18002
:
59910
|
59911
|
59992
|
60676
|
60677
|
60678
|
60679
|
60680
|
60681
|
60682
|
60683
|
60684
|
60685
|
60686
|
60687
|
60688
|
61987
|
61988
|
63150
|
63151
|
63380
|
63456
|
64732
|
64746
|
64765
|
64947
|
66301
|
67649
|
67650
|
67651
|
68108
|
68109
|
68110