Bugzilla – Attachment 2999 Details for
Bug 4959
Language inconsistencies on basket groups; skip confirmation when closing basket.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 5.90 KB, created by
Marcel de Rooy
on 2011-01-17 14:02:34 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-01-17 14:02:34 UTC
Size:
5.90 KB
patch
obsolete
>From c6ab59b93fd1a4ff40653f4d6a1a430e892aa9ea Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 29 Nov 2010 11:19:51 +0100 >Subject: [PATCH] Bug 4959 (Language inconsistencies on basket groups; skip confirmation when closing basket) >Content-Type: text/plain; charset="utf-8" > >This patch adds a new pref BasketConfirmations. This adds the option to skip >confirmations on closing and reopening a basket. If you skip the confirmation, >you do not create a new basket group. >The confusing line Create a purchase order (when closing a basket) is replaced >by Attach basket to a new basket group with the same name. >A warning for a null value on basketgroupid is fixed. >--- > acqui/basket.pl | 7 +++++-- > .../prog/en/modules/acqui/basket.tmpl | 9 ++++----- > .../en/modules/admin/preferences/acquisitions.pref | 7 +++++++ > 3 files changed, 16 insertions(+), 7 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 005fcb9..330ddbf 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -90,6 +90,9 @@ if (!defined $op) { > $op = q{}; > } > >+my $confirm_pref= C4::Context->preference("BasketConfirmations") || '1'; >+$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2'; >+ > if ( $op eq 'delete_confirm' ) { > my $basketno = $query->param('basketno'); > DelBasket($basketno); >@@ -144,7 +147,7 @@ if ( $op eq 'delete_confirm' ) { > print GetBasketAsCSV($query->param('basketno')); > exit; > } elsif ($op eq 'close') { >- my $confirm = $query->param('confirm'); >+ my $confirm = $query->param('confirm') || $confirm_pref eq '2'; > if ($confirm) { > my $basketno = $query->param('basketno'); > my $booksellerid = $query->param('booksellerid'); >@@ -197,7 +200,7 @@ if ( $op eq 'delete_confirm' ) { > if ($basket->{closedate} && haspermission({ flagsrequired => { acquisition => 'group_manage'} })) { > $basketgroups = GetBasketgroups($basket->{booksellerid}); > for my $bg ( @{$basketgroups} ) { >- if ($basket->{basketgroupid} == $bg->{id}){ >+ if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){ > $bg->{default} = 1; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl >index 9079b6d..3084b48 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl >@@ -39,8 +39,8 @@ > <!-- TMPL_UNLESS name="grouped" --> > <script type="text/javascript"> > //<![CDATA[ >- function confirm_reopen() { >- var is_confirmed = confirm(_('Are you sure you want to reopen this basket?')); >+ function confirm_reopen(skip) { >+ var is_confirmed = skip || confirm(_('Are you sure you want to reopen this basket?')); > if (is_confirmed) { > window.location = "<!-- TMPL_VAR name="script_name" -->?op=reopen&basketno=<!-- TMPL_VAR name="basketno" -->"; > } >@@ -95,7 +95,6 @@ > <li><a href="basketheader.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->&op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li> > <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li> > <!-- TMPL_IF name="unclosable" --> >- <li><button onclick="confirm_close()" class="yui-button-disabled" id="closebutton" type="button" disabled="disabled" title="You can not close this basket">Can not close basket</button></li> > <!-- TMPL_ELSIF name="uncertainprices" --> > <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR name="booksellerid" -->&owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li> > <!-- TMPL_ELSE --> >@@ -121,7 +120,7 @@ > //]]> > </script> > <ul id="toolbar-list" class="toolbar"> >- <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li> >+ <li><a href="javascript:confirm_reopen(<!-- TMPL_VAR NAME="skip_confirm_reopen" -->);" class="button" id="reopenbutton">Reopen this basket</a></li> > </ul> > </div> > <!-- /TMPL_UNLESS --> >@@ -313,7 +312,7 @@ > <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm"> > <h1>Are you sure you want to close basket <!-- TMPL_VAR name="basketname" -->?</h1> > <p> >- <label for="createbasketgroup">create a purchase order now?</label> >+ <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label> > <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/> > </p> > <input type="hidden" id="basketno" value="<!-- TMPL_VAR name="basketno" -->" name="basketno" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 2a900f0..43a7ad5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -9,6 +9,13 @@ Acquisitions: > receiving: receiving an order. > cataloguing: cataloging the record. > - >+ - When closing or reopening a basket, >+ - pref: BasketConfirmations >+ default: 1 >+ choices: >+ 1: always ask for confirmation. >+ 2: do not ask for confirmation. >+ - > - Display currencies using the following format > - pref: CurrencyFormat > choices: >-- >1.6.0.6 >
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 4959
:
2999
|
3735
|
3862
|
4009
|
4010
|
4955