proxmox-backup/www/tape/window/LabelMedia.js
Dominik Csapak 41c0333814 ui: tape/window/LabelMedia: change to POST
this changed in the backend

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-09 08:46:14 +01:00

50 lines
964 B
JavaScript

Ext.define('PBS.TapeManagement.LabelMediaWindow', {
extend: 'Proxmox.window.Edit',
alias: 'widget.pbsLabelMediaWindow',
mixins: ['Proxmox.Mixin.CBind'],
isCreate: true,
isAdd: true,
title: gettext('Label Media'),
submitText: gettext('OK'),
method: 'POST',
showProgress: true,
items: [
{
xtype: 'displayfield',
fieldLabel: gettext('Drive'),
cbind: {
value: '{driveid}',
},
},
{
fieldLabel: gettext('Label'),
name: 'label-text',
xtype: 'proxmoxtextfield',
allowBlank: false,
},
{
xtype: 'pbsMediaPoolSelector',
fieldLabel: gettext('Media Pool'),
name: 'pool',
allowBlank: true,
skipEmptyText: true,
},
],
initComponent: function() {
let me = this;
if (!me.driveid) {
throw "no driveid given";
}
let driveid = encodeURIComponent(me.driveid);
me.url = `/api2/extjs/tape/drive/${driveid}/label-media`;
me.callParent();
},
});