mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-03-11 16:58:32 +03:00
We allow usernames shorter than 4 characters since this patch [0] in pbs. [0]: https://lore.proxmox.com/pbs-devel/20240117142918.264978-1-g.goller@proxmox.com/ Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
Ext.define('PBS.BackupGroupChangeOwner', {
|
|
extend: 'Proxmox.window.Edit',
|
|
alias: 'widget.pbsBackupGroupChangeOwner',
|
|
|
|
onlineHelp: 'changing-backup-owner',
|
|
|
|
submitText: gettext("Change Owner"),
|
|
width: 350,
|
|
|
|
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',
|
|
subject: gettext("Change Owner") + ` - ${me.backup_type}/${me.backup_id}`,
|
|
items: {
|
|
xtype: 'inputpanel',
|
|
onGetValues: function(values) {
|
|
values["backup-type"] = me.backup_type;
|
|
values["backup-id"] = me.backup_id;
|
|
if (me.ns && me.ns !== '') {
|
|
values.ns = me.ns;
|
|
}
|
|
return values;
|
|
},
|
|
|
|
items: [
|
|
{
|
|
xtype: 'pbsAuthidSelector',
|
|
name: 'new-owner',
|
|
value: me.owner,
|
|
fieldLabel: gettext('New Owner'),
|
|
allowBlank: false,
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
me.callParent();
|
|
},
|
|
});
|