You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WHERE documentId=" . $document->getId() . " AND (type='input' OR type='textarea' OR type='wysiwyg') AND name LIKE '" . $brickName . "%'");
62
62
63
63
if ($elems == null && $document->getContentMasterDocumentId() != null) {
64
-
$elems = $db->fetchAll("SELECT name, type, data
65
-
FROM documents_elements
64
+
$elems = $db->fetchAll("SELECT name, type, data
65
+
FROM documents_elements
66
66
WHERE documentId=" . $document->getContentMasterDocumentId() . " AND (type='input' OR type='textarea' OR type='wysiwyg') AND name LIKE '" . $brickName . "%'");
67
67
}
68
68
@@ -71,13 +71,13 @@ public function getDocumentElementsAction(Request $request)
71
71
72
72
} else {
73
73
74
-
$elems = $db->fetchAll("SELECT name, type, data
75
-
FROM documents_elements
74
+
$elems = $db->fetchAll("SELECT name, type, data
75
+
FROM documents_elements
76
76
WHERE documentId=" . $request->get("id") . " AND (type='input' OR type='textarea' OR type='wysiwyg')");
77
77
78
78
if ($elems == null && $document->getContentMasterDocumentId() != null) {
79
-
$elems = $db->fetchAll("SELECT name, type, data
80
-
FROM documents_elements
79
+
$elems = $db->fetchAll("SELECT name, type, data
80
+
FROM documents_elements
81
81
WHERE documentId=" . $document->getContentMasterDocumentId() . " AND (type='input' OR type='textarea' OR type='wysiwyg')");
82
82
}
83
83
}
@@ -90,14 +90,11 @@ public function getDocumentElementsAction(Request $request)
90
90
];
91
91
}
92
92
93
-
$response = JsonResponse::create([
93
+
return JsonResponse::create([
94
94
"elements" => $elements,
95
95
"langTo" => ($isBrick ? $langTo : null),
96
96
"type" => ($isBrick ? $type : null)
97
97
]);
98
-
99
-
$response->send();
100
-
101
98
}
102
99
103
100
@@ -117,12 +114,10 @@ public function saveBrickAction(Request $request)
117
114
118
115
$document->save();
119
116
120
-
$response = JsonResponse::create([
117
+
return JsonResponse::create([
121
118
"success" => true
122
119
]);
123
120
124
-
$response->send();
125
-
126
121
}
127
122
128
123
@@ -245,20 +240,18 @@ public function saveDocumentAction(Request $request)
0 commit comments