Koha/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc
Owen Leonard 0658d84732
Bug 22957: Remove type attribute from script tags: Staff client includes 1/2
This patch removes the "type" attribute from <script> tags in several
staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

This patch also makes minor indentation changes, so diff using the "-w"
flag.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Acquisitions -> Vendor (uses acuisitions-toolbar.inc)
 - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
   (uses additem.js.inc)
 - Catalog -> Search results -> Bibliographic detail view. (uses
   browser-strings.inc, catalog-strings.inc, datatables.inc, and
   format_price.inc )
 - Tools -> Label creator -> Manage -> Label batches -> Export batch
   (uses greybox.inc)

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00

39 lines
2.3 KiB
HTML

[% INCLUDE 'blocking_errors.inc' %]
<script>
function confirm_deletion() {
if (confirm(_("Are you sure you want to delete this vendor?"))) {
window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&op=delete";
}
}
</script>
<div id="toolbar" class="btn-toolbar">
[% IF ( booksellerid ) %]
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-plus"></i> New
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
[% IF CAN_user_acquisition_order_manage && active %]
<li><a href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid | uri %]&amp;op=add_form">Basket</a></li>
[% END %]
[% IF CAN_user_acquisition_contracts_manage && active %]
<li><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;booksellerid=[% booksellerid | uri %]">Contract</a></li>
[% END %]
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<li><a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">Vendor</a></li>
[% END %]
</ul>
</div>
[% IF ( CAN_user_acquisition_vendors_manage ) %]
<div class="btn-group"><a class="btn btn-default" id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&amp;op=enter"><i class="fa fa-pencil"></i> Edit vendor</a></div>
[% UNLESS ( basketcount OR subscriptioncount ) %]
<div class="btn-group"><a class="btn btn-default" id="deletesupplier" href="javascript:confirm_deletion()"><i class="fa fa-trash"></i> Delete vendor</a></div>
[% END %]
[% END %]
[% IF CAN_user_acquisition_order_receive && basketcount %]
<div class="btn-group"><a class="btn btn-default" id="receive" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid | html %]"><i class="fa fa-inbox"></i> Receive shipments</a></div>
[% END %]
[% ELSE %]
<div class="btn-group"><a class="btn btn-default" href="/cgi-bin/koha/acqui/supplier.pl?op=enter"><i class="fa fa-plus"></i> New vendor</a></div>
[% END %]
</div>