Bug 1750409

Summary: [RFE] Users do not have to click on ID field to enter their ID
Product: Red Hat OpenStack Reporter: jhardee
Component: python-django-horizonAssignee: Tatiana Ovchinnikova <tovchinn>
Status: CLOSED ERRATA QA Contact: ikanias
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: ahyder, athomas, csibbitt, jrist, nlevinki, rdopiera, shrjoshi, spower, tovchinn
Target Milestone: AlphaKeywords: FutureFeature, Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-django-horizon-16.2.2-2.20210316175254.b72b7e7.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-15 07:07:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot of customers login page. none

Description jhardee 2019-09-09 14:33:26 UTC
Created attachment 1613188 [details]
Screenshot of customers login page.

Description of problem: Customer wants to modify horizon dashboard so that their customers doesn't have to click on ID field on login page when it load.


Version-Release number of selected component (if applicable): Openstack 13


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Text field that is selected is the first text box (Domain)


Expected results:
Customer wants the second text box to be selected when loading login page (User Name)


Additional info:

Comment 1 jhardee 2019-09-09 19:44:56 UTC
Customer has been looking at the code within /usr/lib/python2.7/site-packages/openstack_auth/forms.py

The form fields appear to be created in this file: /usr/lib/python2.7/site-packages/openstack_auth/forms.py

The default behaviour is to autofocus the username field:

username = forms.CharField(
        label=_("User Name"),
        widget=forms.TextInput(attrs={"autofocus": "autofocus"}))

Yet, if you enter the block of code controlled by this if-statement, which in our case, we do (line 61):

if getattr(settings,
                  'OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT',
                  False):

the username.widget is reassigned (futher down, line 81):

self.fields['username'].widget = forms.widgets.TextInput()

losing the autofocus attribute. 

The attribute appears to be removed because it is reassigned to the domain drop-down, but it is only assigned to the domain drop-down when the OPENSTACK_KEYSTONE_DOMAIN_DROPDOWN variable is False; for us, it is True.

Comment 2 jhardee 2019-09-12 15:52:56 UTC
Customer would prefer to have the autofocus on the username regardless of the multidomain domain-drop down (in other words, username should ALWAYS have autofocus).

Comment 6 Chris Sibbitt 2021-02-10 12:54:38 UTC
Dropping from 16.2 release until a fix is ready

Comment 9 Tatiana Ovchinnikova 2021-03-10 22:22:20 UTC
This patch is not merged upstream yet. I'll change the status to POST.

Comment 14 errata-xmlrpc 2021-09-15 07:07:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483