@alexsab-ru/scripts 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/form.js +3 -2
- package/package.json +1 -1
package/lib/form.js
CHANGED
|
@@ -185,17 +185,18 @@ document.querySelectorAll("form").forEach((form) => {
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
const params = new URLSearchParams([...formData]);
|
|
189
|
-
|
|
190
188
|
let formDataObj = {};
|
|
191
189
|
try {
|
|
192
190
|
// Отправка заявки на обратный возов в CallTouch
|
|
193
191
|
const requestData = await createRequest(ct_routeKey, phone.value, verbose);
|
|
192
|
+
formData.append("ct_callback", true);
|
|
194
193
|
} catch (error) {
|
|
195
194
|
verbose && console.error("Error during request Calltouch callback:", error);
|
|
196
195
|
formDataObj = getFormDataObject(formData, form.id);
|
|
197
196
|
}
|
|
198
197
|
|
|
198
|
+
const params = new URLSearchParams([...formData]);
|
|
199
|
+
|
|
199
200
|
await fetch(url, {
|
|
200
201
|
method: "POST",
|
|
201
202
|
mode: "cors",
|