ui: auth realm: do not delete tfa if empty on create

that breaks the schema as the POST endpoint obviously doesn't knows
about a delete property.

fixes commit 58e1ccc4f5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-04-26 13:33:46 +02:00
parent aaf5e58452
commit ed00cf491f
2 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,7 @@ Ext.define('PVE.panel.AuthBase', {
// last field of column2is tfa // last field of column2is tfa
me.column2.push({ me.column2.push({
xtype: 'pveTFASelector', xtype: 'pveTFASelector',
deleteEmpty: !me.isCreate,
}); });
me.columnB.push({ me.columnB.push({

View File

@ -1,6 +1,9 @@
Ext.define('PVE.form.TFASelector', { Ext.define('PVE.form.TFASelector', {
extend: 'Ext.container.Container', extend: 'Ext.container.Container',
xtype: 'pveTFASelector', xtype: 'pveTFASelector',
mixins: ['Proxmox.Mixin.CBind'],
deleteEmpty: true,
viewModel: { viewModel: {
data: { data: {
@ -66,7 +69,9 @@ Ext.define('PVE.form.TFASelector', {
name: 'tfa', name: 'tfa',
hidden: true, hidden: true,
submitValue: true, submitValue: true,
deleteEmpty: true, cbind: {
deleteEmpty: '{deleteEmpty}',
},
bind: { bind: {
value: "{tfavalue}", value: "{tfavalue}",
}, },