Bug 17916 - "Delete MARC modification template" fails to actually delete it
The MARC modification templates' 'Delete' button fails because the event
handler has a "preventDefault" but the outcome of the confirmation
function must return true or false.
This patch removes the "preventDefault" from the .delete_template click
handler as well as a redundant onclick attribute from the delete link
itself.
To test, apply the patch and go to Tools -> MARC modification templates.
Clicking the delete button for any existing template should work
correctly.
Followed test plan, worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 3fddc0d737)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
parent
609c270088
commit
91c0b29534
|
|
@ -84,7 +84,7 @@
|
|||
<td class="actions">
|
||||
<a class="btn btn-mini" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id %]&op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a>
|
||||
<a class="btn btn-mini duplicate_template" href="#" data-toggle="modal" data-template_id="[% TemplatesLoo.template_id %]" data-target="#createTemplate"><i class="fa fa-fw fa-copy"></i> Duplicate</a>
|
||||
<a class="btn btn-mini delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id %]&op=delete_template" onclick="return confirmDeleteAction();"><i class="fa fa-fw fa-trash"></i> Delete</a>
|
||||
<a class="btn btn-mini delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id %]&op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
$(".delete_template").on("click",function(e){
|
||||
e.preventDefault();
|
||||
$(".delete_template").on("click",function(){
|
||||
return confirmDelete();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue