Fix activating other sending methods
[MAILPOET-2679]
This commit is contained in:
committed by
Veljko V
parent
e51043784c
commit
9039e6a8b3
@@ -6,6 +6,7 @@ import { useSelector, useAction, useSetting } from 'settings/store/hooks';
|
|||||||
import { MssStatus } from 'settings/store/types';
|
import { MssStatus } from 'settings/store/types';
|
||||||
import { t } from 'common/functions';
|
import { t } from 'common/functions';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import checkSPFRecord from 'common/check_spf_record';
|
||||||
|
|
||||||
export default function SendWith() {
|
export default function SendWith() {
|
||||||
const isNewUser = useSelector('isNewUser')();
|
const isNewUser = useSelector('isNewUser')();
|
||||||
@@ -22,7 +23,8 @@ export default function SendWith() {
|
|||||||
await setSetting(['mta', 'method'], 'MailPoet');
|
await setSetting(['mta', 'method'], 'MailPoet');
|
||||||
await setSetting(['mta', 'mailpoet_api_key'], key);
|
await setSetting(['mta', 'mailpoet_api_key'], key);
|
||||||
await setSetting(['signup_confirmation', 'enabled'], '1');
|
await setSetting(['signup_confirmation', 'enabled'], '1');
|
||||||
return saveSettings();
|
await saveSettings();
|
||||||
|
return checkSPFRecord();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@@ -695,16 +695,12 @@
|
|||||||
// enforce signup confirmation depending on selected group
|
// enforce signup confirmation depending on selected group
|
||||||
setSignupConfirmation(group);
|
setSignupConfirmation(group);
|
||||||
|
|
||||||
// back to selection of sending methods
|
|
||||||
if (navigateToTab === undefined || navigateToTab === true) {
|
|
||||||
MailPoet.Router.navigate('mta', { trigger: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
// save settings
|
// save settings
|
||||||
$('.mailpoet_settings_submit > input').trigger('click');
|
$('.mailpoet_settings_submit > input').trigger('click');
|
||||||
|
|
||||||
if (group === 'mailpoet') {
|
// back to selection of sending methods
|
||||||
updateMSSActivationUI()
|
if (navigateToTab === undefined || navigateToTab === true) {
|
||||||
|
MailPoet.Router.navigate('mta', { trigger: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user