Bugzilla – Attachment 86709 Details for
Bug 18888
Include the definition of currency in onboarding tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18888: (follow-up) Updated Currency onboarding step to match DB
Bug-18888-follow-up-Updated-Currency-onboarding-st.patch (text/plain), 7.82 KB, created by
Hayley Pelham
on 2019-03-18 01:17:23 UTC
(
hide
)
Description:
Bug 18888: (follow-up) Updated Currency onboarding step to match DB
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2019-03-18 01:17:23 UTC
Size:
7.82 KB
patch
obsolete
>From 63ac88067e4a5f60f698f4ad32209933c190ed0d Mon Sep 17 00:00:00 2001 >From: Hayley Mapley <hayleymapley@catalyst.net.nz> >Date: Mon, 18 Mar 2019 01:05:38 +0000 >Subject: [PATCH] Bug 18888: (follow-up) Updated Currency onboarding step to > match DB > >Between the time that this patch was originally created and now, a field >has been added to the currency table which allows the user to specify >whether the currency should appear with a space between the symbol and >value. This patch updates the onboarding tool to accommodate that >option, as well as cleans up some issues with script tags and duplicate >entries to the DB. > >Test plan: > >1) Drop and recreate your database, then restart_all > >2) Go through the web installer and install all data except the >currencies > >3) Go through the onboarding tool and note that when you get to the >currency page that there is no option for setting there to be a space >between symbol and value > >4) Apply the patch, and repeat step 1 and 2 > >5) Go through the onboarding tool again and this time note that on the >currency page there is an option to set there to be a space between >symbol and value - check this box. > >6) Continue on to Koha > >7) Apply a fine to a patron, log in as that patron, and verify that the >currency is displayed with a space between the symbol and the value in >the OPAC > >8) Also verify that there is only one currency (the one you created) in >the currency table in your database > >Note: This patch may fail the QA tools due to Asset not working with the >installer. > >Sponsored-by: Catalyst IT >--- > installer/onboarding.pl | 28 +++++++++++-------- > .../prog/en/modules/onboarding/onboardingstep6.tt | 32 +++++++++++++--------- > 2 files changed, 35 insertions(+), 25 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index 5ee26064fc..68396491ed 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -305,20 +305,24 @@ if ( $step > 5 && $cur ) { > my $isocode = $input->param('isocode'); > my $rate = $input->param('rate'); > my $active = $input->param('active'); >+ my $p_sep_by_space = $input->param('p_sep_by_space'); > my $is_a_modif = $input->param('is_a_modif'); >- my $currency = Koha::Acquisition::Currency->new( >- { currency => $currency_code, >- symbol => $symbol, >- isocode => $isocode, >- rate => $rate, >- active => $active, >+ if ($currency_code) { >+ my $currency = Koha::Acquisition::Currency->new( >+ { currency => $currency_code, >+ symbol => $symbol, >+ isocode => $isocode, >+ rate => $rate, >+ active => $active, >+ p_sep_by_space => $p_sep_by_space, >+ } >+ ); >+ eval { $currency->store; }; >+ if ($@) { >+ push @messages, { type => 'error', code => 'error_on_insert' }; >+ } else { >+ push @messages, { type => 'message', code => 'success_on_insert' }; > } >- ); >- eval { $currency->store; }; >- if ($@) { >- push @messages, { type => 'error', code => 'error_on_insert' }; >- } else { >- push @messages, { type => 'message', code => 'success_on_insert' }; > } > $cur = Koha::Acquisition::Currencies->get_active; > if ($cur) { >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 61955404ca..495f15c13b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep6.tt >@@ -7,9 +7,6 @@ > [% END %] > </title> > [% INCLUDE 'installer-doc-head-close.inc' %] >-[% INCLUDE 'validator-strings.inc' %] >-[% INCLUDE 'installer-strings.inc' %] >-<script type="text/javascript" src="[% interface %]/[% theme %]/js/onboarding.js"></script> > </head> > > <body id="installer" class="installer"> >@@ -43,23 +40,27 @@ > [% IF currency %] > <span class="label">Currency: </span> > <input type="hidden" name="is_a_modif" value="1" /> >- <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %] >+ <input type="hidden" name="currency_code" id="currency" value="[% currency.currency | html %]" />[% currency.currency | html %] > [% ELSE %] > <label for="currency_code" class="required">Currency: </label> >- <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="requ ired" /> <span class="required">Required</span> >+ <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span> > [% END %] > </li> > <li> >- <label for="rate" class="required">Rate: </label> >- <input type="text" name="rate" id="rate" size="10" maxlength="10" value=1 readonly /> <span class="required">Required</span> >+ <label for="rate" class="required">Rate: </label> >+ <input type="text" name="rate" id="rate" size="10" maxlength="10" value=1 readonly /> <span class="required">Required</span> > </li> > <li> >- <label for="symbol" class="required">Symbol: </label> >- <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% currency.symbol %]" required="required" class="required" /> <span class="required">Required</span> >+ <label for="symbol" class="required">Symbol: </label> >+ <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% currency.symbol | html %]" required="required" class="required" /> <span class="required">Required</span> > </li> > <li> >- <label for="isocode">ISO code: </label> >- <input type="text" name="isocode" id="isocode" size="5" maxlength="5" value="[% currency.isocode %]" /> >+ <label for="isocode">ISO code: </label> >+ <input type="text" name="isocode" id="isocode" size="5" maxlength="5" value="[% currency.isocode | html %]" /> >+ </li> >+ <li> >+ <label for="isocode">Space separation between symbol and value: </label> >+ <input type="checkbox" name="p_sep_by_space" id="p_sep_by_space" size="5" maxlength="5" value="1" /> > </li> > <input type="hidden" id="active" name="active" value="1"/> > </ol> >@@ -75,5 +76,10 @@ > [% END %] > </div> <!-- / #onboarding-step6 --> > </div> <!-- / .row --> >- >-[% INCLUDE 'intranet-bottom.inc' %] >+ </div> <!-- / .container-fluid --> >+[% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'validator-strings.inc' %] >+ [% INCLUDE 'installer-strings.inc' %] >+ <script type="text/javascript" src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script> >+[% END %] >+[% INCLUDE 'installer-intranet-bottom.inc' %] >-- >2.11.0
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 18888
:
64767
|
64771
|
86709
|
86710
|
87574
|
87687
|
87691
|
87692