@formixru/b2b-ui 1.0.1 → 1.0.2
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -250,6 +250,7 @@ const addFiles = (fileList) => {
|
|
|
250
250
|
const uploadFile = async (file) => {
|
|
251
251
|
const index = files.value.findIndex(({ name }) => name === file.name);
|
|
252
252
|
const formData = new FormData();
|
|
253
|
+
formData.append('name', file.name);
|
|
253
254
|
formData.append('file', file);
|
|
254
255
|
try {
|
|
255
256
|
const response = await fetch(actionUpload.value, {
|
|
@@ -179,7 +179,7 @@ document.body.addEventListener('submit', (event) => {
|
|
|
179
179
|
$submitButton.disabled = true;
|
|
180
180
|
}
|
|
181
181
|
const $token = $b.querySelector('input[name="smart-token"]');
|
|
182
|
-
if ($token
|
|
182
|
+
if ($token?.value) {
|
|
183
183
|
if ($b.classList.contains('form_ajax')) {
|
|
184
184
|
event.preventDefault();
|
|
185
185
|
send($b);
|
|
@@ -220,7 +220,7 @@ document.body.addEventListener('change', (event) => {
|
|
|
220
220
|
$error.textContent = '';
|
|
221
221
|
}
|
|
222
222
|
} else if (target.closest('.select') || target.closest('.rating__input')) {
|
|
223
|
-
const $error = target.closest('.form__input-wrapper')
|
|
223
|
+
const $error = target.closest('.form__input-wrapper')?.querySelector('.form__input-error');
|
|
224
224
|
if ($error) {
|
|
225
225
|
$error.textContent = '';
|
|
226
226
|
}
|