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

(-)a/admin/biblio_framework.pl (-1 / +3 lines)
Lines 54-63 if ( $op eq 'add_form' ) { Link Here
54
    my $frameworkcode = $input->param('frameworkcode');
54
    my $frameworkcode = $input->param('frameworkcode');
55
    my $frameworktext = $input->param('frameworktext');
55
    my $frameworktext = $input->param('frameworktext');
56
    my $is_a_modif    = $input->param('is_a_modif');
56
    my $is_a_modif    = $input->param('is_a_modif');
57
    my $is_fast_add   = $input->param('is_fast_add') || 0;
57
58
58
    if ($is_a_modif) {
59
    if ($is_a_modif) {
59
        my $framework = Koha::BiblioFrameworks->find($frameworkcode);
60
        my $framework = Koha::BiblioFrameworks->find($frameworkcode);
60
        $framework->frameworktext($frameworktext);
61
        $framework->frameworktext($frameworktext);
62
        $framework->is_fast_add($is_fast_add);
61
        eval { $framework->store; };
63
        eval { $framework->store; };
62
        if ($@) {
64
        if ($@) {
63
            push @messages, { type => 'error', code => 'error_on_update' };
65
            push @messages, { type => 'error', code => 'error_on_update' };
Lines 69-74 if ( $op eq 'add_form' ) { Link Here
69
            {
71
            {
70
                frameworkcode => $frameworkcode,
72
                frameworkcode => $frameworkcode,
71
                frameworktext => $frameworktext,
73
                frameworktext => $frameworktext,
74
                is_fast_add   => $is_fast_add,
72
            }
75
            }
73
        );
76
        );
74
        eval { $framework->store; };
77
        eval { $framework->store; };
Lines 127-130 $template->param( Link Here
127
);
130
);
128
131
129
output_html_with_http_headers $input, $cookie, $template->output;
132
output_html_with_http_headers $input, $cookie, $template->output;
130
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-2 / +16 lines)
Lines 135-140 Link Here
135
                        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
135
                        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
136
                        <span class="required">Required</span>
136
                        <span class="required">Required</span>
137
                    </li>
137
                    </li>
138
                    <li>
139
                        <label for="is_fast_add">Use as a Fast Add framework: </label>
140
                        [% IF framework.frameworkcode == 'FA' %]
141
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked disabled />
142
                        [% ELSIF framework.is_fast_add %]
143
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked />
144
                        [% ELSE %]
145
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" />
146
                        [% END %]
147
                    </li>
138
                </ol>
148
                </ol>
139
            </fieldset>
149
            </fieldset>
140
            <fieldset class="action">
150
            <fieldset class="action">
Lines 292-298 Link Here
292
                    [% FOREACH loo IN frameworks %]
302
                    [% FOREACH loo IN frameworks %]
293
                        <tr>
303
                        <tr>
294
                            <td>[% loo.frameworkcode | html %]</td>
304
                            <td>[% loo.frameworkcode | html %]</td>
295
                            <td>[% loo.frameworktext | html %]</td>
305
                            <td>
306
                                [% loo.frameworktext | html %]
307
                                [% IF loo.is_fast_add %]
308
                                    <span class="badge rounded-pill bg-secondary float-end">Fast Add</span>
309
                                [% END %]
310
                            </td>
296
                            <td>
311
                            <td>
297
                                <div class="btn-group dropup">
312
                                <div class="btn-group dropup">
298
                                    <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-bs-toggle="dropdown" href="#"> Actions </a>
313
                                    <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-bs-toggle="dropdown" href="#"> Actions </a>
299
- 

Return to bug 32773