Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 5385 | Rev 8365 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5385 Rev 5386
Línea 274... Línea 274...
274
            ]);
274
            ]);
275
        }
275
        }
Línea 276... Línea 276...
276
 
276
 
277
 
-
 
278
        if ($request->isPost()) {
277
 
279
            try {
278
        if ($request->isPost()) {
280
            $form = new SurveyFormForm($this->adapter, $currentCompany->id);
279
            $form = new SurveyFormForm($this->adapter, $currentCompany->id);
Línea 281... Línea 280...
281
            $dataPost = $request->getPost()->toArray();
280
            $dataPost = $request->getPost()->toArray();
Línea 298... Línea 297...
298
                if ($result) {
297
                if ($result) {
299
                    $this->logger->info('Se edito el formulario ' . $survey->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
298
                    $this->logger->info('Se edito el formulario ' . $survey->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
300
                    $data = [
299
                    $data = [
301
                        'success' => true,
300
                        'success' => true,
302
                        'id' => $survey->id,
301
                        'id' => $survey->id,
303
                        'action_edit' => $this->url()->fromRoute('surveys-section/forms/edit', ['id' => $survey->uuid]),
302
                        'action_edit' => $this->url()->fromRoute('survey/form/edit', ['id' => $survey->uuid]),
304
                        'data' => 'LABEL_RECORD_UPDATED'
303
                        'data' => 'LABEL_RECORD_UPDATED'
305
                    ];
304
                    ];
306
                } else {
305
                } else {
307
                    $data = [
306
                    $data = [
308
                        'success' => false,
307
                        'success' => false,
Línea 321... Línea 320...
321
                return new JsonModel([
320
                return new JsonModel([
322
                    'success' => false,
321
                    'success' => false,
323
                    'data' => $messages
322
                    'data' => $messages
324
                ]);
323
                ]);
325
            }
324
            }
326
        }catch(\Exception $e) {
-
 
327
            return new JsonModel([
-
 
328
                'success' => false,
-
 
329
                'data' => $e,
-
 
330
            ]);
-
 
331
        }
-
 
332
        } else if ($request->isGet()) {
325
        } else if ($request->isGet()) {
333
            $hydrator = new ObjectPropertyHydrator();
326
            $hydrator = new ObjectPropertyHydrator();
Línea 334... Línea 327...
334
 
327
 
335
            $data = [
328
            $data = [