Adding Confirm_deletion javascript.
This commit is contained in:
parent
991242c415
commit
5764a0dcf1
1 changed files with 8 additions and 4 deletions
|
@ -50,7 +50,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<!-- TMPL_UNLESS name="used" -->
|
<!-- TMPL_UNLESS name="used" -->
|
||||||
<a href="javascript:do_delete('authorities-home.pl?op=delete&authid=<!-- TMPL_VAR NAME="authid" -->')">
|
<a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="authid" -->)">
|
||||||
<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0">
|
<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0">
|
||||||
</a>
|
</a>
|
||||||
<!-- /TMPL_UNLESS -->
|
<!-- /TMPL_UNLESS -->
|
||||||
|
@ -87,8 +87,12 @@
|
||||||
|
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript" >
|
<script language="JavaScript" type="text/javascript" >
|
||||||
function do_delete(page)
|
|
||||||
{
|
function confirm_deletion(id) {
|
||||||
window.location = page;
|
|
||||||
|
var is_confirmed = confirm('Are you sure you want to delete this authority?');
|
||||||
|
if (is_confirmed) {
|
||||||
|
window.location="authorities-home.pl?op=delete&authid="+id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in a new issue