Esempio n. 1
0
 public function actionSaveFormSettings()
 {
     $result = false;
     if (isset($_GET['formSettings']) && isset($_GET['formName'])) {
         $formSettings = json_decode($_GET['formSettings'], true);
         if (isset($formSettings)) {
             $result = ProfileChild::setFormSettings($formSettings, $_GET['formName']);
         }
     }
     if ($result) {
         echo 'success';
     } else {
         throw new CHttpException(400, 'Invalid request. Probabaly something wrong with the JSON string.');
     }
 }