[pve-devel] applied: [PATCH manager 1/3] Revert "ui: always show otp field"

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Apr 8 17:00:30 CEST 2019


On 4/8/19 1:58 PM, Wolfgang Bumiller wrote:
> This reverts commit ca52c8e381fc5b619ee945f59f8b93f7593523e2.
> ---
>  www/manager6/window/LoginWindow.js | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
> index a923bca1..379653fa 100644
> --- a/www/manager6/window/LoginWindow.js
> +++ b/www/manager6/window/LoginWindow.js
> @@ -135,13 +135,12 @@ Ext.define('PVE.window.LoginWindow', {
>  		change: function(f, value) {
>  		    var otp_field = this.lookupReference('otpField');
>  		    if (f.needOTP(value)) {
> -			otp_field.setConfig('allowBlank', false);
> -			otp_field.setEmptyText(gettext('2nd factor'));
> +			otp_field.setVisible(true);
> +			otp_field.setDisabled(false);
>  		    } else {
> -			otp_field.setConfig('allowBlank', true);
> -			otp_field.setEmptyText(gettext('2nd factor, if required'));
> +			otp_field.setVisible(false);
> +			otp_field.setDisabled(true);
>  		    }
> -		    otp_field.validate();
>  		}
>  	    },
>  	    'field[name=lang]': {
> @@ -227,8 +226,8 @@ Ext.define('PVE.window.LoginWindow', {
>  		fieldLabel: gettext('OTP'),
>  		name: 'otp',
>  		reference: 'otpField',
> -		allowBlank: true,
> -		emptyText: gettext('2nd factor, if required')
> +		allowBlank: false,
> +		hidden: true
>  	    },
>  	    {
>  		xtype: 'pveRealmComboBox',
> 

applied, thanks!




More information about the pve-devel mailing list