From 7f6ee8001962e0c966926e0befd4bff31af440ad Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Sep 2016 10:26:12 +0100 Subject: [PATCH] Bug 17206: Fix switch to default framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When editing a bibliographic record, if you switch the framework to default, the page is reloaded but the framework is not changed. From the pl script, you can see that the frameworkcode is set to the one of the biblio if set to false. The empty string, which means default, should be taken into account. Test plan: - Create a record using the Fast add framework - Save the record - Open the record for editing - Use the "Settings" pull down to change the framework to default - Try another framework - Try changing to default from there Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit bd0d1dd6b1eeb51540a6121c8ed84330e5f48eff) Signed-off-by: Frédéric Demians --- cataloguing/addbiblio.pl | 2 +- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 1e7cb61897..61a2649611 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -713,7 +713,7 @@ my $userflags = 'edit_catalogue'; my $changed_framework = $input->param('changed_framework'); $frameworkcode = &GetFrameworkCode($biblionumber) - if ( $biblionumber and not($frameworkcode) and $op ne 'addbiblio' ); + if ( $biblionumber and not( defined $frameworkcode) and $op ne 'addbiblio' ); if ($frameworkcode eq 'FA'){ $userflags = 'fast_cataloging'; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index ab76835ed8..d8aff05525 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -122,7 +122,7 @@ $(".change-framework").on("click", function(){ var frameworkcode = $(this).data("frameworkcode"); $("#frameworkcode").val( frameworkcode ); - Changefwk( frameworkcode ); + Changefwk(); }); }); @@ -370,7 +370,7 @@ function GetZ3950Terms(){ return strQuery; } -function Changefwk(FwkList) { +function Changefwk() { var f = document.f; f.op.value = "[% op %]"; f.biblionumber.value = "[% biblionumberdata %]"; -- 2.39.5