mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added confirmation dialog before deleting an attachment
This commit is contained in:
parent
e41cb58950
commit
4c184eb83f
@ -47,9 +47,11 @@ function onReady()
|
|||||||
delete imReq;
|
delete imReq;
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteAtt(idx)
|
function deleteAtt(idx, str)
|
||||||
{
|
{
|
||||||
submitted = true;
|
if (confirm(str) == true) {
|
||||||
document.form1.smcmd.value='delatt'+idx;
|
submitted = true;
|
||||||
document.form1.submit();
|
document.form1.smcmd.value='delatt'+idx;
|
||||||
|
document.form1.submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -11942,7 +11942,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
sprintf(str, "im('att'+'%d','%s','%s','rotright');", index, thumb_name, att[index]);
|
sprintf(str, "im('att'+'%d','%s','%s','rotright');", index, thumb_name, att[index]);
|
||||||
ricon("rotright", loc("Rotate right"), str);
|
ricon("rotright", loc("Rotate right"), str);
|
||||||
rsprintf(" \n");
|
rsprintf(" \n");
|
||||||
sprintf(str, "deleteAtt('%d')", index);
|
sprintf(str, "deleteAtt('%d','%s')", index, loc("Are you sure to delete the attachment?"));
|
||||||
ricon("delatt", loc("Delete attachment"), str);
|
ricon("delatt", loc("Delete attachment"), str);
|
||||||
rsprintf(" \n");
|
rsprintf(" \n");
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user