public function actionSettings()
 {
     $model = new FormModel(['keys' => ['frontend.registration' => ['label' => Yii::t('backend', 'Registration'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => [false => Yii::t('backend', 'Disabled'), true => Yii::t('backend', 'Enabled')]], 'frontend.email-confirm' => ['label' => Yii::t('backend', 'Email confirm'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => [false => Yii::t('backend', 'Disabled'), true => Yii::t('backend', 'Enabled')]], 'frontend.maintenance' => ['label' => Yii::t('backend', 'Frontend maintenance mode'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => [false => Yii::t('backend', 'Disabled'), true => Yii::t('backend', 'Enabled')]], 'backend.theme-skin' => ['label' => Yii::t('backend', 'Backend theme'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => ['skin-blue' => 'skin-blue', 'skin-black' => 'skin-black', 'skin-red' => 'skin-red', 'skin-yellow' => 'skin-yellow', 'skin-purple' => 'skin-purple', 'skin-green' => 'skin-green', 'skin-blue-light' => 'skin-blue-light', 'skin-black-light' => 'skin-black-light', 'skin-red-light' => 'skin-red-light', 'skin-yellow-light' => 'skin-yellow-light', 'skin-purple-light' => 'skin-purple-light', 'skin-green-light' => 'skin-green-light']], 'backend.layout-fixed' => ['label' => Yii::t('backend', 'Fixed backend layout'), 'type' => FormModel::TYPE_CHECKBOX], 'backend.layout-boxed' => ['label' => Yii::t('backend', 'Boxed backend layout'), 'type' => FormModel::TYPE_CHECKBOX], 'backend.layout-collapsed-sidebar' => ['label' => Yii::t('backend', 'Backend sidebar collapsed'), 'type' => FormModel::TYPE_CHECKBOX], 'backend.layout-mini-sidebar' => ['label' => Yii::t('backend', 'Backend sidebar mini'), 'type' => FormModel::TYPE_CHECKBOX]]]);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         Yii::$app->session->setFlash('success', Yii::t('backend', 'Settings successfully saved.'));
         return $this->refresh();
     }
     return $this->render('settings', ['model' => $model]);
 }
 public function actionSettings()
 {
     $model = new FormModel(['keys' => ['frontend.maintenance' => ['label' => Yii::t('backend', 'Frontend maintenance mode'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => ['disabled' => Yii::t('backend', 'Disabled'), 'enabled' => Yii::t('backend', 'Enabled')]], 'backend.theme-skin' => ['label' => Yii::t('backend', 'Backend theme'), 'type' => FormModel::TYPE_DROPDOWN, 'items' => ['skin-black' => 'skin-black', 'skin-blue' => 'skin-blue', 'skin-green' => 'skin-green', 'skin-purple' => 'skin-purple', 'skin-red' => 'skin-red', 'skin-yellow' => 'skin-yellow']], 'backend.layout-fixed' => ['label' => Yii::t('backend', 'Fixed backend layout'), 'type' => FormModel::TYPE_CHECKBOX], 'backend.layout-boxed' => ['label' => Yii::t('backend', 'Boxed backend layout'), 'type' => FormModel::TYPE_CHECKBOX], 'backend.layout-collapsed-sidebar' => ['label' => Yii::t('backend', 'Backend sidebar collapsed'), 'type' => FormModel::TYPE_CHECKBOX]]]);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         Yii::$app->session->setFlash('alert', ['body' => Yii::t('backend', 'Settings was successfully saved'), 'options' => ['class' => 'alert alert-success']]);
         return $this->refresh();
     }
     return $this->render('settings', ['model' => $model]);
 }
Exemple #3
0
 public function actionOthersSettings()
 {
     $model = new FormModel(['keys' => ['bei_an_url' => ['label' => Yii::t('common', 'Bei An URL'), 'type' => FormModel::TYPE_TEXTINPUT], 'wen_wang_wen_url' => ['label' => Yii::t('common', 'Wen Wang Wen URL'), 'type' => FormModel::TYPE_TEXTINPUT], 'authentication_alliance_URL' => ['label' => Yii::t('common', 'Authentication Alliance URL'), 'type' => FormModel::TYPE_TEXTINPUT], 'adverse_information_report_url' => ['label' => Yii::t('common', 'Adverse Information Report URL'), 'type' => FormModel::TYPE_TEXTINPUT]]]);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         Yii::$app->session->setFlash('alert', ['body' => Yii::t('backend', 'Settings was successfully saved'), 'options' => ['class' => 'alert alert-success']]);
         return $this->refresh();
     }
     return $this->render('others-settings', ['model' => $model]);
 }