Bug 12508: adding an error message if a contract cannot be removed
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqcontract.tt
index e723ed4..b4a6e0c 100644 (file)
@@ -83,9 +83,18 @@ function Check(ff) {
     [% IF ( else ) %]Contracts[% END %]
 </div>
 
-<div id="doc" class="yui-t7">
+<div id="doc3" class="yui-t2">
+
     <div id="bd">
-        <div id="yui-main">
+    <div id="yui-main">
+    <div class="yui-b">
+
+[% INCLUDE 'acquisitions-toolbar.inc' %]
+
+[% IF error == 'not_deleted' %]
+    <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
+[% END %]
+
                 [% IF ( add_form ) %]
                     <form name="Aform" action="[% script_name %]" method="post">
                         <input type="hidden" name="op" value="add_validate" />
@@ -104,17 +113,17 @@ function Check(ff) {
                                             <input type="hidden" name="is_a_modif" value="1" />
                                         </li>
                                 [% END %]
-                                <li><label for="contractname" class="required">Name *</label> &nbsp;
+                                <li><label for="contractname" class="required">Name: *</label> &nbsp;
                                         <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname %]" />
                                 </li>
-                                <li><label for="contractdescription">Description</label> &nbsp;
+                                <li><label for="contractdescription">Description</label> &nbsp;
                                         <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
                                 </li>
-                                <li><label for="from" class="required">Start date *</label> &nbsp;
+                                <li><label for="from" class="required">Start date: *</label> &nbsp;
                                         <input type="text" name="contractstartdate" id="from" value="[% contractstartdate %]" maxlength="10" size="10" class="datepickerfrom" />
                                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
                                 </li>
-                                <li><label for="to" class="required">End date *</label> &nbsp;
+                                <li><label for="to" class="required">End date: *</label> &nbsp;
                                         <input type="text" name="contractenddate" id="to" value="[% contractenddate %]" maxlength="10"  size="10" class="datepickerto" />
                                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
                                 </li>
@@ -161,23 +170,6 @@ function Check(ff) {
                 </form>
             [% END %]
             [% IF ( else ) %]
-                <div id="toolbar">
-                    <script type="text/javascript">
-                        //<![CDATA[
-                        // prepare DOM for YUI Toolbar
-                        $(document).ready(function() {
-                        yuiToolbar();
-                        });
-                        // YUI Toolbar Functions
-                        function yuiToolbar() {
-                        new YAHOO.widget.Button("newcontract");
-                        }
-                        //]]>
-                    </script>
-                    <ul class="toolbar">
-                        <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid %]">New contract</a></li>
-                    </ul>
-                </div>
                 <h2>Contract(s) of [% booksellername %]</h2>
                 [% IF ( loop ) %]
                     <table>
@@ -202,9 +194,13 @@ function Check(ff) {
                     [% END %]
                 </table>
                 [% ELSE %]
-                <div class="dialog message">There are no contracts with this vendor.</div>
+                <div class="dialog message">There are no contracts with this vendor. <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid %]">Add a contract</a>.</div>
                 [% END %]
             [% END %]
-        </div>
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'vendor-menu.inc' %]
+</div>
 </div>
 [% INCLUDE 'intranet-bottom.inc' %]