Bug 15866: Add confirm message for deleting rotating collection from toolbar
To test:
1) Go to Tools -> Rotating Collections
2) Click on any rotating collection ('Add or remove items' from drop down menu)
3) Click 'Delete' from toolbar. Validate you are now asked to confirm your deletion. Check that cancel works, then check that confirm works.
Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I've added the word 'rotating' before collection, to make
it clear for translators what is meant here.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit a48d166bbf)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 887bb8c92f)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
parent
8a77af1215
commit
882e002165
|
|
@ -1,3 +1,17 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(".confirmdelete").click(function(){
|
||||
$(this).parents('tr').addClass("warn");
|
||||
if(confirm(_("Are you sure you want to delete this rotating collection?"))){
|
||||
return true;
|
||||
} else {
|
||||
$(this).parents('tr').removeClass("warn");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="toolbar" class="btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=new"><i class="icon-plus"></i> New collection</a>
|
||||
|
|
@ -11,7 +25,7 @@
|
|||
<a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=edit&colId=[% colId %]"><i class="icon-pencil"></i> Edit</a>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-small" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="icon-remove"></i> Delete</a>
|
||||
<a class="btn btn-small confirmdelete" href="/cgi-bin/koha/rotating_collections/editCollections.pl?action=delete&colId=[% colId %]"><i class="icon-remove"></i> Delete</a>
|
||||
</div>
|
||||
[% END %]
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue