viewModel: {
data: {
customDirectory: false,
+ eabRequired: false,
+ },
+ formulas: {
+ eabEmptyText: function(get) {
+ return get('eabRequired') ? gettext("required") : gettext("optional");
+ },
},
},
let me = this;
let w = me.up('window');
+ let vm = w.getViewModel();
let disp = w.down('#tos_url_display');
let field = w.down('#tos_url');
let checkbox = w.down('#tos_checkbox');
checkbox.setValue(false);
disp.setValue("No terms of service agreement required");
}
+ vm.set('eabRequired', !!response.result.data.externalAccountRequired);
},
failure: function(response, opt) {
disp.setValue(undefined);
return false;
},
},
+ {
+ xtype: 'proxmoxtextfield',
+ name: 'eab-kid',
+ fieldLabel: gettext('EAB Key ID'),
+ bind: {
+ hidden: '{!customDirectory}',
+ allowBlank: '{!eabRequired}',
+ emptyText: '{eabEmptyText}',
+ },
+ },
+ {
+ xtype: 'proxmoxtextfield',
+ name: 'eab-hmac-key',
+ fieldLabel: gettext('EAB Key'),
+ bind: {
+ hidden: '{!customDirectory}',
+ allowBlank: '{!eabRequired}',
+ emptyText: '{eabEmptyText}',
+ },
+ },
],
clearToSFields: function() {