Skip to content

Commit

Permalink
SECURITY-2406
Browse files Browse the repository at this point in the history
  • Loading branch information
mtughan committed Oct 28, 2021
1 parent 5f6c55d commit 7e4fa9b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<a href="editScript?id=${t.id}" class="scriptler-link-button scriptler-icon-slot">
<img width="16" height="16" title="${%edit script} ${t.name}" src="${imagesURL }/16x16/document_edit.gif" />
</a>
<form method="post" action="removeScript" class="scriptler-inline scriptler-icon-slot" onclick="return confirmDelete('${t.name}')">
<form method="post" action="removeScript" class="scriptler-inline scriptler-icon-slot" data-name="${t.name}" onclick="return confirmDelete(this)">
<input type="hidden" name="id" value="${t.id}" />
<button type="submit" name="submit_param" value="submit_value" class="scriptler-link-button">
<img width="16" height="16" title="${%remove script} ${t.name}" src="${imagesURL}/16x16/edit-delete.gif" />
Expand Down Expand Up @@ -99,7 +99,8 @@
</table>
</div>
<script>
function confirmDelete(name) {
function confirmDelete(element) {
var name = element.getAttribute('data-name');
if (confirm("Sure you want to delete ["+name+"]?")) {
return true;
}else{
Expand Down

0 comments on commit 7e4fa9b

Please sign in to comment.