Bugzilla – Attachment 60678 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 - Successfully working budget and fund form display order
Bug-18002---Successfully-working-budget-and-fund-f.patch (text/plain), 9.18 KB, created by
Alex Buckley
on 2017-02-26 07:42:31 UTC
(
hide
)
Description:
Bug 18002 - Successfully working budget and fund form display order
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-02-26 07:42:31 UTC
Size:
9.18 KB
patch
obsolete
>From 57076b412201c57062a58993ea7c7e30555d73fe Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 17 Feb 2017 10:18:58 +0000 >Subject: [PATCH] Bug 18002 - Successfully working budget and fund form display > order > >Created onboardinginclude2.inc for fund form > >Added perl If statement logic into acqui-home.pl to control onboarding >include display >--- > acqui/acqui-home.pl | 9 ++++ > admin/aqbudgetperiods.pl | 4 +- > .../prog/en/includes/onboardinginclude.inc | 57 +++------------------- > .../prog/en/includes/onboardinginclude2.inc | 57 ++++++++++++++++++++++ > .../prog/en/modules/acqui/acqui-home.tt | 8 ++- > 5 files changed, 81 insertions(+), 54 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index fe53174..c1fcf39 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -107,6 +107,15 @@ 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 8258578..1aad2e8 100755 >--- a/admin/aqbudgetperiods.pl >+++ b/admin/aqbudgetperiods.pl >@@ -120,7 +120,9 @@ elsif ( $op eq 'add_validate' ) { > } > else { # ELSE ITS AN ADD > my $budget_period_id=AddBudgetPeriod($budget_period_hashref); >- print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl?step=2"); >+ my $step= $input->param( 'step' ); >+ $template->param( step => $step); >+ print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); > exit; > } > $op='else'; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc >index f64848c..b372886 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc >@@ -13,56 +13,14 @@ > border-radius:25px; > } > </style> >- > <div id="onboardingModal"> >- <span class="close">×</span><br><br> >+ <span class="close">×</span><br><br> > [% IF displayonboardscreen == "acquisitions" %] >- [% IF step == 2 %] >- <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 >- [% IF ( budget_period_description ) %] >- [% budget_name %] for Budget '[% budget_period_description %]' >- [% END %] >- </legend> >- <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 %] >- >- <li> >- <label class="required" for="budget_code">Fund code: </label> >- <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" /> >- </li> >- >- <li> >- <label class="required" for="budget_name">Fund name: </label> >- <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" /> >- </li> >- >- <li> >- <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label> >- <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> >- </form> >- >- [% ELSE %] > <h2> Create a budget</h2> > <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post"> > <fieldset class="rows"> > <input type="hidden" name="op" value="add_validate" /> >+ <input type="hidden" name="step" value="2"/> > <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" /> > <ol> > <li> >@@ -93,20 +51,17 @@ > </li> > </ol> > </fieldset> >- > <fieldset class="action"> >- <a href = "/cgi-bin/koha/acqui/acqui-home.pl?step=2"> >+ <a href = "/cgi-bin/koha/acqui/acqui-home.pl"> > <input type="submit" class="action" value="Submit" /> > </a> >- <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl" class="cancel">Cancel</a> > </fieldset> > </form> > </div> >- [% END %] >+ [% ELSIF displayonboardscreen == "label" %] >+<h2>testing</h2> > >-[% ELSIF displayonboardscreen == "label" %] > > > >-<h2>testing</h2> >-[% END %] >+ [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >new file mode 100644 >index 0000000..00d4afd >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc >@@ -0,0 +1,57 @@ >+<style type="text/css"> >+ #onboardingModal{ >+ z-index:1; >+ background-color:#5bad3f; >+ padding:20px; >+ width:80%; >+ height:60%; >+ position:fixed; >+ left:auto; >+ top:auto; >+ right:auto; >+ bottom:auto; >+ border-radius:25px; >+ } >+</style> >+ >+<div id="onboardingModal"> >+ <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 >+ [% IF ( budget_period_description ) %] >+ [% budget_name %] for Budget '[% budget_period_description %]' >+ [% END %] >+ </legend> >+ <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 %] >+ <li> >+ <label class="required" for="budget_code">Fund code: </label> >+ <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" /> >+ </li> >+ >+ <li> >+ <label class="required" for="budget_name">Fund name: </label> >+ <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" /> >+ </li> >+ >+ <li> >+ <label style="white-space: nowrap;" for="budget_amount" class="required">Amount: </label> >+ <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> >+ </fieldset> >+ </form> >+</div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 5240eee..ac29397 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -118,8 +118,12 @@ $(document).ready(function() { > [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %] > [% UNLESS ( loop_budget ) %] > [% IF ( CAN_user_acquisition_period_manage ) %] >- [% displayonboardscreen = "acquisitions" %] >- [% INCLUDE onboardinginclude.inc %] >+ [% displayonboardscreen = "acquisitions" %] >+ [% IF stepfund == 1 %] >+ [% INCLUDE onboardinginclude.inc %] >+ [% ELSE %] >+ [% INCLUDE onboardinginclude2.inc %] >+ [% END %] > [% ELSE %] > <div class="dialog alert">Your administrator must define a budget in Administration</div> > [% END %] >-- >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