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:
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.
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).
Dropping from 16.2 release until a fix is ready
This patch is not merged upstream yet. I'll change the status to POST.
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