Skip to content

Commit

Permalink
Add restart confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
gdarko committed Sep 19, 2023
1 parent 2f105eb commit da9044d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@

$(document).on('click', '#batch-process-restart', function(e){
e.preventDefault();
restart_batch();
if(confirm(DgBatchRunner.text.confirm_restart)) {
restart_batch();
}
});


Expand Down
1 change: 1 addition & 0 deletions includes/class-batch-processor-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function enqueue_scripts() {
'text' => array(
'processing' => __( 'Processing...', 'wp-batch-processing' ),
'start' => __( 'Start', 'wp-batch-processing' ),
'confirm_restart' => __('Are you sure you want to restart? This action can not be reverted.', 'wp-batch-processing')
)
) );
}
Expand Down

0 comments on commit da9044d

Please sign in to comment.