Skip to content

Commit

Permalink
Merge pull request #79 from WordPress/no-update-prompt
Browse files Browse the repository at this point in the history
Show prompt only when creating new events
  • Loading branch information
trymebytes authored Feb 15, 2024
2 parents f1c0f7d + d4a42d9 commit 8e1251e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/translation-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jQuery(document).ready(function($) {
return;
}
var btnClicked = $(this).data('event-status');
if ( btnClicked == 'publish' ) {
if ( btnClicked == 'publish' && '' == $('#event-id').val() ) {
var submitPrompt = 'Are you sure you want to publish this event?';
if ( ! confirm( submitPrompt ) ) {
return;
Expand Down

0 comments on commit 8e1251e

Please sign in to comment.