Bug 16968 - Remove the use of "onclick" from serial patron and vendor search templates
This patch removes instances of "onclick" from the serials templates for patron and vendor search. To test, go to Serials and click "New subscription." - In the new subscription form, click the "Search for a vendor" link. - In the popup, search for a vendor. Confirm that clicking "Choose" selects the correct vendor. - From the detail page of an existing subscription, click "Create routing list." - Search for a patron and test that the "Add" button in search results works correctly to add patrons to the routing list. Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
1fccc1ea5d
commit
c585c9cf9d
|
|
@ -1,7 +1,7 @@
|
|||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Serials › Select vendor</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
function GetIt(aqbooksellerid,name)
|
||||
{
|
||||
|
|
@ -9,6 +9,14 @@ function GetIt(aqbooksellerid,name)
|
|||
opener.document.f.aqbooksellername.value = name;
|
||||
window.close();
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(".select_vendor").on("click",function(e){
|
||||
e.preventDefault();
|
||||
var vendorname = $(this).data("vendorname");
|
||||
var vendorid = $(this).data("vendorid");
|
||||
GetIt( vendorid, vendorname );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body id="ser_acqui-search-result" class="ser">
|
||||
|
|
@ -29,13 +37,15 @@ function GetIt(aqbooksellerid,name)
|
|||
[% FOREACH loop_supplier IN loop_suppliers %]
|
||||
<tr>
|
||||
<td>[% loop_supplier.name %]</td>
|
||||
<td><a href="#" onclick="GetIt([% loop_supplier.aqbooksellerid %],$(this).parent().prev().text())">Choose</a></td>
|
||||
<td><a class="btn btn-mini select_vendor" href="#" data-vendorid="[% loop_supplier.aqbooksellerid %]" data-vendorname="[% loop_supplier.name |html%]">Choose</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</table>
|
||||
[% END %]
|
||||
|
||||
<p><a href="/cgi-bin/koha/serials/acqui-search.pl">Perform a new search</a> <a class="button" href="#" onclick="window.close()">Close</a></p>
|
||||
<p><a href="/cgi-bin/koha/serials/acqui-search.pl">Perform a new search</a></p>
|
||||
|
||||
<div id="closewindow"><a href="#" class="btn btn-default close">Cancel</a></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"dt_branch":
|
||||
"[% data.branchname |html %]",
|
||||
"dt_action":
|
||||
"<a href=\"#\" onclick='add_user(\"[% data.borrowernumber %]\", \"[% data.firstname %] [% data.surname %]\"); return false;'>Add</a>"
|
||||
"<a href=\"#\" class=\"add_user btn btn-mini\" data-borrowernumber=\"[% data.borrowernumber %]\" data-firstname=\"[% data.firstname %]\" data-surname=\"[% data.surname %]\">Add</a>"
|
||||
}[% UNLESS loop.last %],[% END %]
|
||||
[% END %]
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue