login view: hide realm selector on quarantine view

when we target the quarantine view, we don't want to show the realm
field, since the only valid users here are from LDAP and that is not a
realm in that sense.

We do this by moving the realmfield hide/disable up before the
autologin, but after the targetview check.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2025-02-27 10:37:47 +01:00 committed by Thomas Lamprecht
parent cb73249d64
commit af75134834

View File

@ -34,6 +34,10 @@ Ext.define('PMG.LoginView', {
// hide save username field for quarantine view
me.lookup('saveunField').setVisible(false);
// disable/hide realm field for quarantine view
realmfield.setDisabled(true);
realmfield.setHidden(true);
realmfield.setValue('quarantine');
// try autologin with quarantine ticket from URL
@ -51,7 +55,6 @@ Ext.define('PMG.LoginView', {
let loginwin = me.lookup('loginwindow');
loginwin.autoShow = false;
loginwin.setVisible(false);
realmfield.setDisabled(true);
me.lookup('usernameField').setValue(username);
me.lookup('passwordField').setValue(ticket);