- allow empty input

- allow svg avatar
This commit is contained in:
Peter Papp
2021-05-06 10:08:58 +02:00
parent 86b6844d62
commit bd881da856
4 changed files with 25 additions and 15 deletions
+2 -4
View File
@@ -29,11 +29,9 @@ const Helpers = {
}
}, 300)
Vue.prototype.$updateText = debounce(function (route, name, value) {
Vue.prototype.$updateText = debounce(function (route, name, value, allowEmpty = false) {
let enableEmptyInput = ['mimetypes_blacklist', 'google_analytics', 'upload_limit']
if (value === '' || value === ' ' && !enableEmptyInput.includes(name)) return
if ((value === '' || value === ' ') && !allowEmpty) return
axios.post(this.$store.getters.api + route, {name, value, _method: 'patch'})
.catch(() => {