Ejemplo n.º 1
0
 /**
  * E-Mail Mailing Settings
  */
 public function actionMailing()
 {
     $model = new \humhub\modules\admin\models\forms\MailingDefaultsForm();
     $model->receive_email_activities = Setting::Get("receive_email_activities", 'mailing');
     $model->receive_email_notifications = Setting::Get("receive_email_notifications", 'mailing');
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         Setting::Set('receive_email_activities', $model->receive_email_activities, 'mailing');
         Setting::Set('receive_email_notifications', $model->receive_email_notifications, 'mailing');
         Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
     }
     return $this->render('mailing', array('model' => $model));
 }
Ejemplo n.º 2
0
 /**
  * E-Mail Mailing Settings
  */
 public function actionMailing()
 {
     $form = new \humhub\modules\admin\models\forms\MailingDefaultsForm();
     if ($form->load(Yii::$app->request->post()) && $form->validate() && $form->save()) {
         Yii::$app->getSession()->setFlash('data-saved', Yii::t('AdminModule.controllers_SettingController', 'Saved'));
     }
     return $this->render('mailing', array('model' => $form));
 }