@osimatic/helpers-js 1.1.54 → 1.1.55
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/form_helper.js +4 -4
- package/import_from_csv.js +1 -1
- package/package.json +3 -2
package/form_helper.js
CHANGED
|
@@ -264,18 +264,18 @@ class FormHelper {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
static getFormErrorText(errors) {
|
|
267
|
-
let errorLabels =
|
|
267
|
+
let errorLabels = [];
|
|
268
268
|
for (let property in errors) {
|
|
269
269
|
// console.log(property);
|
|
270
270
|
if (typeof errors[property] != 'function') {
|
|
271
271
|
if (typeof errors[property]['error_description'] === 'undefined') {
|
|
272
|
-
errorLabels
|
|
272
|
+
errorLabels.push(errors[property]);
|
|
273
273
|
} else {
|
|
274
|
-
errorLabels
|
|
274
|
+
errorLabels.push(errors[property]['error_description']);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
return errorLabels;
|
|
278
|
+
return errorLabels.removeEmptyValues().map(errorLabel => '<span>' + errorLabel + '</span>').join('<br/>');
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
static displayFormErrors(form, btnSubmit, errors, errorWrapperDiv) {
|
package/import_from_csv.js
CHANGED
|
@@ -162,7 +162,7 @@ class ImportFromCsv {
|
|
|
162
162
|
tableContent += '<tbody>';
|
|
163
163
|
$.each(data, function (index, line) {
|
|
164
164
|
tableContent += '<tr data-line="'+(index+1)+'">';
|
|
165
|
-
tableContent += '<td class="
|
|
165
|
+
tableContent += '<td class="text-bold text-end select_line_checkbox"><input type="checkbox" class="import_line_checkbox pull-left" checked="checked" /> '+(index+1)+'.</td>';
|
|
166
166
|
$.each(line, function (key, value) {
|
|
167
167
|
tableContent += '<td data-key="'+key+'">'+(value!==null?value:'')+'</td>';
|
|
168
168
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osimatic/helpers-js",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.55",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"description": "",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"ilib": "^14.16.0"
|
|
13
|
+
"ilib": "^14.16.0",
|
|
14
|
+
"npm": "^10.2.3"
|
|
14
15
|
}
|
|
15
16
|
}
|