Bugzilla – Attachment 43974 Details for
Bug 14889
Move the framework related code to Koha::BiblioFramework[s]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14889: Fix error msg on duplicate
Bug-14889-Fix-error-msg-on-duplicate.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2015-10-26 08:57:16 UTC
(
hide
)
Description:
Bug 14889: Fix error msg on duplicate
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-26 08:57:16 UTC
Size:
2.22 KB
patch
obsolete
>From 14832aab86be4954ae31743c41b7789f14267e10 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Oct 2015 08:55:43 +0000 >Subject: [PATCH] Bug 14889: Fix error msg on duplicate > >--- > admin/biblio_framework.pl | 7 ++++--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt | 1 + > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl >index 79f3eba..79a0db1 100755 >--- a/admin/biblio_framework.pl >+++ b/admin/biblio_framework.pl >@@ -54,9 +54,10 @@ if ( $op eq 'add_form' ) { > } elsif ( $op eq 'add_validate' ) { > my $frameworkcode = $input->param('frameworkcode'); > my $frameworktext = $input->param('frameworktext'); >+ my $is_a_modif = $input->param('is_a_modif'); > >- my $framework = Koha::BiblioFrameworks->find($frameworkcode); >- if ($framework) { >+ if ($is_a_modif) { >+ my $framework = Koha::BiblioFrameworks->find($frameworkcode); > $framework->frameworktext($frameworktext); > eval { $framework->store; }; > if ($@) { >@@ -65,7 +66,7 @@ if ( $op eq 'add_form' ) { > push @messages, { type => 'message', code => 'success_on_update' }; > } > } else { >- $framework = Koha::BiblioFramework->new( >+ my $framework = Koha::BiblioFramework->new( > { frameworkcode => $frameworkcode, > frameworktext => $frameworktext, > } >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 11d3edc..c67ec37 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 >@@ -151,6 +151,7 @@ > <li> > <span class="label">Framework code: </span> > <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode %]" />[% framework.frameworkcode %] >+ <input type="hidden" name="is_a_modif" value="1" /> > </li> > [% ELSE %] > <li> >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14889
:
42846
|
42847
|
43775
|
43776
|
43944
|
43974
|
43975
|
44493
|
44494
|
44495
|
44496
|
44497
|
44985
|
44986
|
44987
|
44988
|
44989
|
47857