2020-11-03 08:30:54 +00:00
|
|
|
Ext.define('PBS.BackupGroupChangeOwner', {
|
|
|
|
extend: 'Proxmox.window.Edit',
|
|
|
|
alias: 'widget.pbsBackupGroupChangeOwner',
|
|
|
|
|
2020-11-10 08:53:05 +00:00
|
|
|
onlineHelp: 'changing-backup-owner',
|
|
|
|
|
2020-11-03 08:30:54 +00:00
|
|
|
submitText: gettext("Change Owner"),
|
2020-11-06 18:48:08 +00:00
|
|
|
width: 350,
|
2020-11-03 08:30:54 +00:00
|
|
|
|
|
|
|
initComponent: function() {
|
|
|
|
let me = this;
|
|
|
|
|
|
|
|
if (!me.datastore) {
|
|
|
|
throw "no datastore specified";
|
|
|
|
}
|
|
|
|
if (!me.backup_type) {
|
|
|
|
throw "no backup_type specified";
|
|
|
|
}
|
|
|
|
if (!me.backup_id) {
|
|
|
|
throw "no backup_id specified";
|
|
|
|
}
|
|
|
|
|
|
|
|
Ext.apply(me, {
|
|
|
|
url: `/api2/extjs/admin/datastore/${me.datastore}/change-owner`,
|
|
|
|
method: 'POST',
|
2020-11-06 18:48:08 +00:00
|
|
|
subject: gettext("Change Owner") + ` - ${me.backup_type}/${me.backup_id}`,
|
2020-11-03 08:30:54 +00:00
|
|
|
items: {
|
|
|
|
xtype: 'inputpanel',
|
|
|
|
onGetValues: function(values) {
|
|
|
|
values["backup-type"] = me.backup_type;
|
|
|
|
values["backup-id"] = me.backup_id;
|
|
|
|
return values;
|
|
|
|
},
|
|
|
|
|
2020-11-06 18:48:08 +00:00
|
|
|
items: [
|
2020-11-03 08:30:54 +00:00
|
|
|
{
|
2020-11-06 12:01:58 +00:00
|
|
|
xtype: 'pbsAuthidSelector',
|
2020-11-03 08:30:54 +00:00
|
|
|
name: 'new-owner',
|
2020-11-06 06:40:09 +00:00
|
|
|
value: me.owner,
|
2020-11-06 18:48:08 +00:00
|
|
|
fieldLabel: gettext('New Owner'),
|
2020-11-03 08:30:54 +00:00
|
|
|
minLength: 8,
|
|
|
|
allowBlank: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
me.callParent();
|
|
|
|
},
|
|
|
|
});
|