v1.18.x
Barış Soner Uşaklı 7 years ago
parent ac1f7eefe5
commit 089769c107

@ -457,19 +457,6 @@ define('settings', function () {
return callback(err); return callback(err);
} }
// Parse all values. If they are json, return json
for (var key in values) {
if (values.hasOwnProperty(key)) {
try {
if (!utils.isNumber(values[key])) {
values[key] = JSON.parse(values[key]);
}
} catch (e) {
// Leave the value as is
}
}
}
// Save loaded settings into ajaxify.data for use client-side // Save loaded settings into ajaxify.data for use client-side
ajaxify.data.settings = values; ajaxify.data.settings = values;
@ -500,12 +487,6 @@ define('settings', function () {
} }
}); });
// Normalizing value of multiple selects
formEl.find('select[multiple]').each(function (idx, selectEl) {
selectEl = $(selectEl);
values[selectEl.attr('name')] = JSON.stringify(selectEl.val());
});
socket.emit('admin.settings.set', { socket.emit('admin.settings.set', {
hash: hash, hash: hash,
values: values, values: values,

Loading…
Cancel
Save