Bug fix : click on confirm Bellow on opac-shelves
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 21 Sep 2009 14:28:48 +0000 (16:28 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 21 Sep 2009 14:31:09 +0000 (16:31 +0200)
Click on confirm Bellow was not showing the button up, or button was not really obvious
This adds a button right bellow the message

C4/VirtualShelves/Page.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl

index 1e44bc9..b32424e 100644 (file)
@@ -233,10 +233,10 @@ SWITCH: {
                        if (my $count = scalar @$contents){
                                unless (scalar grep {/^CONFIRM-$number$/} $query->param()) {
                                        if (defined $shelflist->{$number}) {
-                                               push(@paramsloop, {need_confirm=>$shelflist->{$number}->{shelfname}, count=>$count});
+                                               push(@paramsloop, {shelf=>$number, need_confirm=>$shelflist->{$number}->{shelfname},shelftype=>"public", count=>$count});
                                                $shelflist->{$number}->{confirm} = $number;
                                        } else {
-                                               push(@paramsloop, {need_confirm=>$privshelflist->{$number}->{shelfname}, count=>$count});
+                                               push(@paramsloop, {shelf=>$number,need_confirm=>$privshelflist->{$number}->{shelfname},shelftype=>"private", count=>$count});
                                                $privshelflist->{$number}->{confirm} = $number;
                                        }
                                        $stay = 0;
index e91aace..1487d14 100644 (file)
@@ -50,9 +50,6 @@ $(function() {
 });
 
 $(document).ready(function(){
-<!-- TMPL_IF NAME="RequestOnOpac" -->
-    $(".hold").html("Place Hold");
-<!-- /TMPL_IF -->
     <!-- TMPL_IF NAME="TagsEnabled" -->
     $("#tagsel_tag").text("Tag");
     $("#tagsel_button").click(function(){
@@ -83,7 +80,16 @@ $(document).ready(function(){
         <!-- TMPL_IF NAME="need_confirm" -->
         <div class="dialog alert">The list <i><!-- TMPL_VAR NAME="need_confirm" --></i> is not empty.
             <br />It has <b><!-- TMPL_VAR NAME="count" --></b> entries.
-            <br />Use the "Confirm" button below to confirm deletion.
+            <br />Use the "Confirm" button below to confirm deletion. 
+                       <br />
+                       <form action="opac-shelves.pl" method="post">
+                    <input type="hidden" name="shelves" value="1" />
+                    <input type="hidden" name="display" value="<!--TMPL_VAR Name="shelftype"-->shelves" />
+                    <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
+                    <input type="hidden" name="CONFIRM-<!-- TMPL_VAR NAME="shelf" -->" value="1" />
+                    <input type="submit" class="confirm" value="Confirm" />
+             </form>
+
         </div>
         <!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="nopermission" -->