zet-lib 1.0.82 → 1.0.84
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 +1 -1
- package/lib/zRoute.js +4 -2
- package/package.json +1 -1
package/lib/Form.js
CHANGED
|
@@ -350,7 +350,7 @@ Form.field = (obj) => {
|
|
|
350
350
|
</span>
|
|
351
351
|
</div>`
|
|
352
352
|
return `<div class="input-group">
|
|
353
|
-
<select ${tabindex} class="form-control ${obj.class} dropdown-multi" ${id} ${placeholder} ${htmlOptions} >${selects}</select>
|
|
353
|
+
<select ${tabindex} class="form-control ${obj.class} dropdown-multi" name='${obj.name}' ${id} ${placeholder} ${htmlOptions} >${selects}</select>
|
|
354
354
|
<span id="dropdownadd${obj.id}" class="input-group-text dropdownadd" data-id="${obj.id}" style="cursor: pointer;" title=" ${LANGUAGE['form_add_data']} ">+</span>
|
|
355
355
|
</div>
|
|
356
356
|
<div id="dropdownbox${obj.id}" class="boxy mb-3">${spanmulti}</div>`
|
package/lib/zRoute.js
CHANGED
|
@@ -184,8 +184,10 @@ zRoute.post = (req, res, MYMODEL, routeName, body) => {
|
|
|
184
184
|
break
|
|
185
185
|
|
|
186
186
|
case 'dropdown_multi':
|
|
187
|
-
let cleaning
|
|
188
|
-
|
|
187
|
+
let cleaning
|
|
188
|
+
if (Array.isArray(post[routeName][key])) {
|
|
189
|
+
cleaning = post[routeName][key] ? post[routeName][key].filter((item) => item) : null
|
|
190
|
+
}
|
|
189
191
|
post[routeName][key] = cleaning ? JSON.stringify(cleaning) : null
|
|
190
192
|
break
|
|
191
193
|
|