You are here:  » Confirmation delete job


Confirmation delete job

Submitted by sirmanu on Mon, 2017-05-15 18:58 in

Hi. Is it possible to add a confirmation dialog to delete jobs? I have a big list and a little mistake usually deletes some jobs accidentally without knowing which one was affected.
Thanks!

Submitted by support on Wed, 2017-05-17 15:13

Hi,

Sure (I'll implement the "Enable Delete" functionality of newer admin tools in the next update to Price Tapestry). In the mean time, to insert a JavaScript confirmation, edit admin/automation_tool.php and look for the following code at line 51:

      admin_tool("Delete","automation_tool_delete.php?id=".$job["id"],TRUE,FALSE);

...and REPLACE with:

      admin_tool("Delete","automation_tool_delete.php?id=".$job["id"]."' onclick='return confirm(\"Delete job for ".$job["filename"]."?\");",TRUE,FALSE);

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Thu, 2017-05-18 09:30

Excellent David. Easy as expected, and it's enough!
Thank you.