mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 02:07:21 +02:00
Workaround for new blueprints. Force select with null value to empty string
This commit is contained in:
@@ -90,6 +90,7 @@ export default class FormState {
|
||||
field = $(field);
|
||||
let name = field.prop('name');
|
||||
let type = field.prop('type');
|
||||
let tag = field.prop('tagName').toLowerCase();
|
||||
let value;
|
||||
|
||||
switch (type) {
|
||||
@@ -101,6 +102,10 @@ export default class FormState {
|
||||
value = field.val();
|
||||
}
|
||||
|
||||
if (tag === 'select' && value === null) {
|
||||
value = '';
|
||||
}
|
||||
|
||||
if (name && !~this.options.ignore.indexOf(name)) {
|
||||
values[name] = value;
|
||||
}
|
||||
|
||||
8
themes/grav/js/admin.min.js
vendored
8
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user