Update forms messages when settings change

This commit is contained in:
Amine Ben hammou
2019-07-31 11:53:44 +01:00
committed by Jack Kitterhing
parent 4a2781e857
commit 87882d8cc0
2 changed files with 6 additions and 8 deletions

View File

@ -56,8 +56,7 @@ class Settings extends APIEndpoint {
]); ]);
} else { } else {
$old_settings = $this->settings->getAll(); $old_settings = $this->settings->getAll();
// Will be uncommented on task [MAILPOET-1998] $signup_confirmation = $this->settings->get('signup_confirmation.enabled');
// $signup_confirmation = $this->settings->get('signup_confirmation.enabled');
foreach ($settings as $name => $value) { foreach ($settings as $name => $value) {
$this->settings->set($name, $value); $this->settings->set($name, $value);
} }
@ -66,10 +65,9 @@ class Settings extends APIEndpoint {
$this->bridge->onSettingsSave($settings); $this->bridge->onSettingsSave($settings);
$this->authorized_emails_controller->onSettingsSave($settings); $this->authorized_emails_controller->onSettingsSave($settings);
// Will be uncommented on task [MAILPOET-1998] if ($signup_confirmation !== $this->settings->get('signup_confirmation.enabled')) {
// if ($signup_confirmation !== $this->settings->get('signup_confirmation.enabled')) { Form::updateSuccessMessages();
// Form::updateSuccessMessages(); }
// }
return $this->successResponse($this->settings->getAll()); return $this->successResponse($this->settings->getAll());
} }
} }

View File

@ -160,10 +160,10 @@ class Populator {
$this->scheduleBeamer(); $this->scheduleBeamer();
$this->updateLastSubscribedAt(); $this->updateLastSubscribedAt();
$this->enableStatsNotificationsForAutomatedEmails(); $this->enableStatsNotificationsForAutomatedEmails();
$this->scheduleUnsubscribeTokens(); $this->scheduleUnsubscribeTokens();
$this->detectReferral(); $this->detectReferral();
// Will be uncommented on task [MAILPOET-1998] $this->updateFormsSuccessMessages();
// $this->updateFormsSuccessMessages();
} }
private function createMailPoetPage() { private function createMailPoetPage() {