Fix bug preventing new Storage Locations from being created.
This commit is contained in:
parent
91a744b244
commit
e631c0b515
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue