diff --git a/assets/js/src/form/fields/selection.jsx b/assets/js/src/form/fields/selection.jsx index 48fb7b1a28..709d2e6051 100644 --- a/assets/js/src/form/fields/selection.jsx +++ b/assets/js/src/form/fields/selection.jsx @@ -101,6 +101,11 @@ define([ } return null; }, + isDisabled: function () { + return this.props.item.status == 'sending' + && this.props.item.queue + && this.props.item.queue.status == 'paused'; + }, loadCachedItems: function () { if(typeof(window['mailpoet_'+this.props.field.endpoint]) !== 'undefined') { let items = window['mailpoet_'+this.props.field.endpoint]; @@ -180,6 +185,7 @@ define([ @@ -235,11 +237,13 @@ define( onChange={this.handleChange} displayFormat={dateDisplayFormat} storageFormat={dateStorageFormat} + disabled={this.props.disabled} validation={this.props.dateValidation}/> ); @@ -282,6 +286,11 @@ define( 'data-parsley-errors-container': '#mailpoet_scheduling', }; }, + isDisabled: function () { + return this.props.item.status == 'sending' + && this.props.item.queue + && this.props.item.queue.status == 'paused'; + }, render: function () { let schedulingOptions; @@ -292,6 +301,7 @@ define( name="scheduledAt" value={this._getCurrentValue().scheduledAt} onChange={this.handleValueChange} + disabled={this.isDisabled()} dateValidation={this.getDateValidation()} />   @@ -308,6 +318,7 @@ define( type="checkbox" value="1" checked={this.isScheduled()} + disabled={this.isDisabled()} name="isScheduled" onChange={this.handleCheckboxChange} />