View | Details | Raw Unified | Return to bug 7046
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt (-25 / +13 lines)
Lines 38-72 Link Here
38
    <li>
38
    <li>
39
    <label>Subscription length:</label>
39
    <label>Subscription length:</label>
40
    <select name="subtype" id="subtype">
40
    <select name="subtype" id="subtype">
41
        [% FOREACH st IN subtypes %]
41
        [% FOREACH st IN [['numberlength', 'issues'], ['weeklength', 'weeks'], ['monthlength', 'months']] %]
42
            [% SWITCH st %]
42
            [% SET subtype = st.0 %]
43
                [% CASE 'numberlength'%]
43
            [% SET value = st.1 %]
44
                    [% IF st == subtype %]
44
            [% IF subscription.$subtype %]
45
                        <option value="issues" selected="selected">
45
                <option value="[% value %]" selected="selected">
46
                    [% ELSE %]
46
            [% ELSE %]
47
                        <option value="issues">
47
                <option value="[% value %]">
48
                    [% END %]
48
            [% END %]
49
                    issues
49
            [% SWITCH subtype %]
50
                [% CASE 'weeklength' %]
50
                [% CASE 'numberlength'%]issues
51
                    [% IF st == subtype %]
51
                [% CASE 'weeklength'  %]weeks
52
                        <option value="weeks" selected="selected">
52
                [% CASE 'monthlength' %]months
53
                    [% ELSE %]
54
                        <option value="weeks">
55
                    [% END %]
56
                    weeks
57
                [% CASE 'monthlength' %]
58
                    [% IF st == subtype %]
59
                        <option value="months" selected="selected">
60
                    [% ELSE %]
61
                        <option value="months">
62
                    [% END %]
63
                    months
64
                [% CASE %][% st | html %]
65
            [% END %]
53
            [% END %]
66
            </option>
54
            </option>
67
        [% END %]
55
        [% END %]
68
    </select>
56
    </select>
69
    <input type="text" name="sublength" id="sublength" size="3" />(enter amount in numerals)
57
    <input type="text" name="sublength" id="sublength" size="3" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength %]" />(enter amount in numerals)
70
    <input type="hidden" name="issuelengthcount">
58
    <input type="hidden" name="issuelengthcount">
71
    </li>
59
    </li>
72
60
(-)a/serials/subscription-add.pl (-1 lines)
Lines 434-440 sub redirect_mod_subscription { Link Here
434
    my $subtype = $query->param('subtype');
434
    my $subtype = $query->param('subtype');
435
    my $sublength = $query->param('sublength');
435
    my $sublength = $query->param('sublength');
436
    my ($numberlength, $weeklength, $monthlength) = GetSubscriptionLength( $subtype, $sublength );
436
    my ($numberlength, $weeklength, $monthlength) = GetSubscriptionLength( $subtype, $sublength );
437
    my $numberpattern = $query->param('numbering_pattern');
438
    my $locale = $query->param('locale');
437
    my $locale = $query->param('locale');
439
    my $lastvalue1 = $query->param('lastvalue1');
438
    my $lastvalue1 = $query->param('lastvalue1');
440
    my $innerloop1 = $query->param('innerloop1');
439
    my $innerloop1 = $query->param('innerloop1');
(-)a/serials/subscription-renew.pl (-2 lines)
Lines 135-141 my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); Link Here
135
$template->param(
135
$template->param(
136
    op => $op,
136
    op => $op,
137
    libraries      => $libraries,
137
    libraries      => $libraries,
138
    subtypes => [ qw( numberlength weeklength monthlength ) ],
139
);
138
);
140
139
141
output_html_with_http_headers $query, $cookie, $template->output;
140
output_html_with_http_headers $query, $cookie, $template->output;
142
- 

Return to bug 7046