From fbff54fc11c189f1a5c31b5f5822e0c8667eb54f Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Wed, 30 Oct 2024 02:15:32 +0000 Subject: [PATCH] Bug 32773: Add ability to set biblio_framework.is_fast_add --- admin/biblio_framework.pl | 3 +++ .../prog/en/modules/admin/biblio_framework.tt | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index a6f0e10050..3ed5cf29b0 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -53,10 +53,12 @@ if ( $op eq 'add_form' ) { my $frameworkcode = $input->param('frameworkcode'); my $frameworktext = $input->param('frameworktext'); my $is_a_modif = $input->param('is_a_modif'); + my $is_fast_add = $input->param('is_fast_add') || 0; if ($is_a_modif) { my $framework = Koha::BiblioFrameworks->find($frameworkcode); $framework->frameworktext($frameworktext); + $framework->is_fast_add($is_fast_add); eval { $framework->store; }; if ($@) { push @messages, { type => 'error', code => 'error_on_update' }; @@ -67,6 +69,7 @@ if ( $op eq 'add_form' ) { my $framework = Koha::BiblioFramework->new( { frameworkcode => $frameworkcode, frameworktext => $frameworktext, + is_fast_add => $is_fast_add, } ); eval { $framework->store; }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt index 7e471c48c6..d0c760f65e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt @@ -137,6 +137,16 @@ Required +
  • + + [% IF framework.frameworkcode == 'FA' %] + + [% ELSIF framework.is_fast_add %] + + [% ELSE %] + + [% END %] +
  • @@ -252,7 +262,12 @@ [% FOREACH loo IN frameworks %] [% loo.frameworkcode | html %] - [% loo.frameworktext | html %] + + [% loo.frameworktext | html %] + [% IF loo.is_fast_add %] + Fast Add + [% END %] +