Fix bug preventing new Storage Locations from being created.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-10-29 19:47:28 -05:00
parent 91a744b244
commit e631c0b515
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
1 changed files with 14 additions and 4 deletions

View File

@ -27,17 +27,17 @@ export default {
: this.$gettext('Add Storage Location');
}
},
validations () {
validations() {
let validations = {
form: {
'adapter': { required },
'adapter': {required},
'storageQuota': {}
}
};
switch (this.form.adapter) {
case 'local':
validations.form.path = { required };
validations.form.path = {required};
validations.form.s3CredentialKey = {};
validations.form.s3CredentialSecret = {};
validations.form.s3Region = {};
@ -73,7 +73,7 @@ export default {
return validations;
},
methods: {
resetForm () {
resetForm() {
this.form = {
'adapter': 'local',
'path': '',
@ -86,6 +86,16 @@ export default {
'dropboxAuthToken': null,
'storageQuota': ''
};
},
getSubmittableFormData() {
if (this.isEditMode) {
return this.form;
}
return {
...this.form,
type: this.type
};
}
}
};