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 134-139 Link Here
134
                        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
134
                        <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
135
                        <span class="required">Required</span>
135
                        <span class="required">Required</span>
136
                    </li>
136
                    </li>
137
                    <li>
138
                        <label for="is_fast_add">Use as a Fast Add framework: </label>
139
                        [% IF framework.frameworkcode == 'FA' %]
140
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked disabled />
141
                        [% ELSIF framework.is_fast_add %]
142
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" checked />
143
                        [% ELSE %]
144
                            <input type="checkbox" name="is_fast_add" id="is_fast_add" value="1" />
145
                        [% END %]
146
                    </li>
137
                </ol>
147
                </ol>
138
            </fieldset>
148
            </fieldset>
139
            <fieldset class="action">
149
            <fieldset class="action">
Lines 291-297 Link Here
291
                    [% FOREACH loo IN frameworks %]
301
                    [% FOREACH loo IN frameworks %]
292
                        <tr>
302
                        <tr>
293
                            <td>[% loo.frameworkcode | html %]</td>
303
                            <td>[% loo.frameworkcode | html %]</td>
294
                            <td>[% loo.frameworktext | html %]</td>
304
                            <td>
305
                                [% loo.frameworktext | html %]
306
                                [% IF loo.is_fast_add %]
307
                                    <span class="badge rounded-pill bg-secondary float-end">Fast Add</span>
308
                                [% END %]
309
                            </td>
295
                            <td>
310
                            <td>
296
                                <div class="btn-group dropup">
311
                                <div class="btn-group dropup">
297
                                    <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-bs-toggle="dropdown" href="#"> Actions </a>
312
                                    <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-bs-toggle="dropdown" href="#"> Actions </a>
298
- 

Return to bug 32773