Bugzilla – Attachment 2147 Details for
Bug 4531
admin/aqbookfund.pl: prevents the creation of funds with the same code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
prevents the creation of funds with the same code
0001-BUG-4531-admin-aqbookfund.pl-prevents-the-creation-of-funds-w.patch (text/plain), 2.66 KB, created by
Chris Cormack
on 2010-05-19 15:04:00 UTC
(
hide
)
Description:
prevents the creation of funds with the same code
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-05-19 15:04:00 UTC
Size:
2.66 KB
patch
obsolete
>From b6ae66efd2f70f56c95777faff83908494debc0a Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 19 May 2010 16:48:03 +0200 >Subject: [PATCH] admin/aqbookfund.pl: prevents the creation of funds with the same code > >--- > admin/aqbookfund.pl | 5 ++--- > .../intranet-tmpl/prog/en/css/staff-global.css | 4 ++++ > .../prog/en/modules/admin/aqbookfund.tmpl | 16 ++++++++++++---- > 3 files changed, 18 insertions(+), 7 deletions(-) > >diff --git a/admin/aqbookfund.pl b/admin/aqbookfund.pl >index 604ae08..31c5d3d 100755 >--- a/admin/aqbookfund.pl >+++ b/admin/aqbookfund.pl >@@ -126,7 +126,7 @@ if ($op eq 'add_form') { > elsif ($op eq 'add_validate') { > my $bookfundname = $input->param('bookfundname'); > my $branchcode = $input->param('branchcode') || undef; >- my $number = Countbookfund($bookfundid,$branchcodeid); >+ my $number = Countbookfund($bookfundid); > if ($number == 0 ) { > NewBookFund( > $bookfundid, >@@ -134,8 +134,7 @@ elsif ($op eq 'add_validate') { > $input->param('branchcode')||'' > ); > } >- print $input->redirect('aqbookfund.pl'); # FIXME: unnecessary redirect >- exit; >+ $template->param(error_bookfundid_exist => $number); > # END $OP eq ADD_VALIDATE > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index ce264d2..2729567 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -1670,3 +1670,7 @@ span.permissiondesc { > color: black; > } > >+.error-adding-fund { >+ color: red; >+} >+ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl >index eb75a67..3bb13af 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl >@@ -152,10 +152,18 @@ > <!-- /TMPL_IF --> <!-- add_form --> > > <!-- TMPL_IF name="add_validate" --> >-<h3>Fund added</h3> >-<p> >- <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a> >-</p> >+ <!-- TMPL_UNLESS NAME="error_bookfundid_exist" --> >+ <h3>Fund added</h3> >+ <p> >+ <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a> >+ </p> >+ <!-- TMPL_ELSE --> >+ <h3>Cannot adding this fund</h3> >+ <p class="error-adding-fund">This fund code already exist and can't be added</p> >+ <p> >+ <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a> >+ </p> >+ <!-- /TMPL_UNLESS --> > <!-- TMPL_ELSIF name="mod_validate" --> > <h3>Fund modified</h3> > <p> >-- >1.6.3.3 >
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 4531
: 2147