(BUG #4357) Closing a basket and creating baskets group
[koha_gimpoz] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tmpl
index 3bc3c89..3c48fb8 100644 (file)
             }
 //]]>
         </script>
+<script type="text/javascript">
+//<![CDATA[
+            function confirm_deletion() {
+                var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
+                if (is_confirmed) {
+                    window.location = "<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&basketno=<!-- TMPL_VAR name="basketno" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->";
+                }
+            }
+//]]>
+</script>
 <!-- TMPL_ELSE -->
 <!-- TMPL_UNLESS name="grouped" -->
 <script type="text/javascript">
@@ -68,8 +78,9 @@
                         // YUI Toolbar Functions
                         function yuiToolbar() {
                             <!-- TMPL_IF name="unclosable" -->
-                                new YAHOO.widget.Button("uncertpricesbutton");
                                 new YAHOO.widget.Button("closebutton", {disabled:true});
+                            <!-- TMPL_ELSIF name="uncertainprices" -->
+                                new YAHOO.widget.Button("uncertpricesbutton");
                             <!-- TMPL_ELSE -->
                                 new YAHOO.widget.Button("closebutton");
                             <!-- /TMPL_IF -->
                     </script>
                     <ul id="toolbar-list" class="toolbar">
                     <li><a href="basketheader.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
-                    <li><a href="<!-- TMPL_VAR NAME="script_name" -->?op=del_basket&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->" class="button" id="delbasketbutton">Delete this basket</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="push" disabled="true" title="You can not close this basket" >Can not close basket</a></li>
+                    <!-- TMPL_ELSIF name="uncertainprices" -->
                         <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
                     <!-- TMPL_ELSE -->
                         <li><a href="<!-- TMPL_VAR name="script_name" -->?op=close&amp;basketno=<!-- TMPL_VAR name="basketno" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->" class="button" id="closebutton">Close this basket</a></li>
                 <!-- TMPL_IF NAME="basketnote" --><p>Internal note: <!-- TMPL_VAR NAME="basketnote" --></p><!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="basketbooksellernote" --><p>Vendor note: <!-- TMPL_VAR NAME="basketbooksellernote" --></p><!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="basketcontractno" -->
-                    <p>Contract number: <!-- TMPL_VAR NAME="basketcontractno" --></p>
                     <p>Contract name: <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=<!-- TMPL_VAR NAME="basketcontractno" -->&amp;booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="basketcontractname" --></a></p>
                 <!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="authorisedbyname" --><p>Managed by:  <!-- TMPL_VAR NAME="authorisedbyname" --></p><!-- /TMPL_IF -->
         <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 basket group?</label>
+            <label for="createbasketgroup">create a purchase order now?</label>
             <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
             </p>
             <input type="hidden" id="basketno" value="<!-- TMPL_VAR name="basketno" -->" name="basketno" />