Skip to content

Commit

Permalink
[PROD-7433] Make sure to trigger warning only if activity is set to s…
Browse files Browse the repository at this point in the history
…chedule
  • Loading branch information
amincdev committed May 16, 2024
1 parent 7fe22d1 commit bbad9ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3905,7 +3905,7 @@ window.bp = window.bp || {};
if ( undefined !== typeof schedule_allowed && 'enabled' === schedule_allowed ) {
whats_new_form.find( '#bb-schedule-posts' ).show();
Backbone.trigger( 'cleanFeedBack' );
} else {
} else if( this.model.attributes.activity_action_type === 'scheduled' ) {
// Reset the schedule data.
this.model.set( 'activity_action_type', null );
this.model.set( 'activity_schedule_date_raw', null );
Expand All @@ -3916,6 +3916,8 @@ window.bp = window.bp || {};

// Show Warning message.
Backbone.trigger( 'onError', BP_Nouveau.activity_schedule.strings.notAllowScheduleWarning, 'error' );
} else {
whats_new_form.find( '#bb-schedule-posts' ).hide();
}
} else {
whats_new_form.find( '#bb-schedule-posts' ).show();
Expand Down

Large diffs are not rendered by default.

0 comments on commit bbad9ab

Please sign in to comment.