Bugzilla – Attachment 102538 Details for
Bug 7046
subscription renewal period should be a pull down
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7046: Preselect dropdown option and prefill input
Bug-7046-Preselect-dropdown-option-and-prefill-inp.patch (text/plain), 4.27 KB, created by
Jonathan Druart
on 2020-04-08 09:16:02 UTC
(
hide
)
Description:
Bug 7046: Preselect dropdown option and prefill input
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-08 09:16:02 UTC
Size:
4.27 KB
patch
obsolete
>From a86d65c81fdd599072f215d0bca5506e1f13b61a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 8 Apr 2020 10:42:41 +0200 >Subject: [PATCH] Bug 7046: Preselect dropdown option and prefill input > >With previous renew values > >Bug 7046: Simplify dropdown list construction > >Bug 7046: Remove "earlier declaration in same scope" > >"my" variable $numberpattern masks earlier declaration in same scope at /kohadevbox/koha/serials/subscription-add.pl line 437. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../en/modules/serials/subscription-renew.tt | 38 +++++++------------ > serials/subscription-add.pl | 1 - > serials/subscription-renew.pl | 1 - > 3 files changed, 13 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >index 614e4d5e41..e5f121ee98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >@@ -38,35 +38,23 @@ > <li> > <label>Subscription length:</label> > <select name="subtype" id="subtype"> >- [% FOREACH st IN subtypes %] >- [% SWITCH st %] >- [% CASE 'numberlength'%] >- [% IF st == subtype %] >- <option value="issues" selected="selected"> >- [% ELSE %] >- <option value="issues"> >- [% END %] >- issues >- [% CASE 'weeklength' %] >- [% IF st == subtype %] >- <option value="weeks" selected="selected"> >- [% ELSE %] >- <option value="weeks"> >- [% END %] >- weeks >- [% CASE 'monthlength' %] >- [% IF st == subtype %] >- <option value="months" selected="selected"> >- [% ELSE %] >- <option value="months"> >- [% END %] >- months >- [% CASE %][% st | html %] >+ [% FOREACH st IN [['numberlength', 'issues'], ['weeklength', 'weeks'], ['monthlength', 'months']] %] >+ [% SET subtype = st.0 %] >+ [% SET value = st.1 %] >+ [% IF subscription.$subtype %] >+ <option value="[% value %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% value %]"> >+ [% END %] >+ [% SWITCH subtype %] >+ [% CASE 'numberlength'%]issues >+ [% CASE 'weeklength' %]weeks >+ [% CASE 'monthlength' %]months > [% END %] > </option> > [% END %] > </select> >- <input type="text" name="sublength" id="sublength" size="3" />(enter amount in numerals) >+ <input type="text" name="sublength" id="sublength" size="3" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength %]" />(enter amount in numerals) > <input type="hidden" name="issuelengthcount"> > </li> > >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 6fdc1b29d1..f0cb7b53e1 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -434,7 +434,6 @@ sub redirect_mod_subscription { > my $subtype = $query->param('subtype'); > my $sublength = $query->param('sublength'); > my ($numberlength, $weeklength, $monthlength) = GetSubscriptionLength( $subtype, $sublength ); >- my $numberpattern = $query->param('numbering_pattern'); > my $locale = $query->param('locale'); > my $lastvalue1 = $query->param('lastvalue1'); > my $innerloop1 = $query->param('innerloop1'); >diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl >index 954b007fac..1889f9a5b6 100755 >--- a/serials/subscription-renew.pl >+++ b/serials/subscription-renew.pl >@@ -135,7 +135,6 @@ my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); > $template->param( > op => $op, > libraries => $libraries, >- subtypes => [ qw( numberlength weeklength monthlength ) ], > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.20.1
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 7046
:
5938
|
5939
|
69355
|
69356
|
69408
|
81641
|
81642
|
102275
|
102276
|
102278
|
102425
|
102427
|
102428
|
102429
|
102430
|
102535
|
102536
|
102537
| 102538 |
102564