Properly support backups in Directory format. Fixes #3309

This commit is contained in:
Khushboo Vashi
2018-06-29 15:14:37 +01:00
committed by Dave Page
parent c85ced4c6b
commit fb1ef9ac0b
15 changed files with 504 additions and 714 deletions

View File

@@ -139,9 +139,23 @@ define([
label: gettext('Filename'),
type: 'text',
disabled: false,
control: Backform.FileControl,
control: Backform.FileControl.extend({
render: function() {
var attributes = this.model.toJSON();
if (attributes.format == 'directory') {
this.field.attributes.dialog_type = 'select_folder';
}
else {
this.field.attributes.dialog_type = 'create_file';
}
Backform.InputControl.prototype.render.apply(this, arguments);
return this;
},
}),
dialog_type: 'create_file',
supp_types: ['*', 'sql', 'backup'],
deps: ['format'],
}, {
id: 'format',
label: gettext('Format'),