diff --git a/frontend/ajax-handler/job-containers.php b/frontend/ajax-handler/job-containers.php index c6fad77..42a8f03 100644 --- a/frontend/ajax-handler/job-containers.php +++ b/frontend/ajax-handler/job-containers.php @@ -115,8 +115,9 @@ } // ----- renew failed jobs in container if requested ----- - if(!empty($_POST['create_renew_job_container']) - && isset($_POST['job_container_id']) + if(isset($_POST['renew_job_container']) + && isset($_POST['create_new_job_container']) + && isset($_POST['job_container_name']) && isset($_POST['notes']) && isset($_POST['start_time']) && isset($_POST['end_time']) @@ -124,8 +125,9 @@ && isset($_POST['shutdown_waked_after_completion']) && isset($_POST['priority'])) { die($cl->renewFailedStaticJobsInJobContainer( - $_POST['create_renew_job_container'], $_POST['notes'], - $_POST['job_container_id'], $_POST['job_id'] ?? [], $_POST['start_time'], $_POST['end_time'], + $_POST['renew_job_container'], $_POST['job_id'] ?? [], $_POST['create_new_job_container'], + $_POST['job_container_name'], $_POST['notes'], + $_POST['start_time'], $_POST['end_time'], $_POST['use_wol'], $_POST['shutdown_waked_after_completion'], 0/*sequence mode*/, $_POST['priority'] )); diff --git a/frontend/js/main.js b/frontend/js/main.js index d143ea6..b5024f9 100644 --- a/frontend/js/main.js +++ b/frontend/js/main.js @@ -1881,13 +1881,14 @@ function showDialogRenewFailedStaticJobs(id, defaultName, jobIds) { txtRenewJobContainerJobId.value = jobIds; }); } -function renewFailedStaticJobs(id, jobId, name, notes, startTime, endTime, useWol, shutdownWakedAfterCompletion, priority) { +function renewFailedStaticJobs(id, jobId, createNewJobContainer, name, notes, startTime, endTime, useWol, shutdownWakedAfterCompletion, priority) { var params = []; - params.push({'key':'create_renew_job_container', 'value':name}); - params.push({'key':'job_container_id', 'value':id}); + params.push({'key':'renew_job_container', 'value':id}); jobId.toString().split(',').forEach(function(entry) { if(entry.trim() != '') params.push({'key':'job_id[]', 'value':entry}); }); + params.push({'key':'create_new_job_container', 'value':createNewJobContainer ? 1 : 0}); + params.push({'key':'job_container_name', 'value':name}); params.push({'key':'notes', 'value':notes}); params.push({'key':'start_time', 'value':startTime}); params.push({'key':'end_time', 'value':endTime}); diff --git a/frontend/views/dialog-jobs-renew.php b/frontend/views/dialog-jobs-renew.php index 75a0ef1..2037b56 100644 --- a/frontend/views/dialog-jobs-renew.php +++ b/frontend/views/dialog-jobs-renew.php @@ -4,13 +4,20 @@ require_once('../session.php'); ?> -

+ + + + + - + @@ -48,10 +55,7 @@ - - - - +
+ +
+
@@ -59,6 +63,7 @@