Restored functionality of the region switcher dropdown.
Fixes bug 1004222 and fixes bug 1004234. Change-Id: I7bd61cdcac576600e6dea97e3b7c131dfb8d469c
This commit is contained in:
parent
629453f41e
commit
48e325dd90
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block modal-header %}{% trans "Log In" %}{% endblock %}
|
||||
{% block modal_class %}login{% endblock %}
|
||||
{% block modal_class %}login {% if hide %}modal hide{% endif %}{% endblock %}
|
||||
|
||||
{% block form_action %}{% url horizon:auth_login %}{% endblock %}
|
||||
|
||||
|
@ -90,9 +90,11 @@ class Login(forms.SelfHandlingForm):
|
||||
# For now we'll allow fallback to OPENSTACK_KEYSTONE_URL if the
|
||||
# form post doesn't include a region.
|
||||
endpoint = data.get('region', None) or settings.OPENSTACK_KEYSTONE_URL
|
||||
region_name = dict(self.fields['region'].choices)[endpoint]
|
||||
request.session['region_endpoint'] = endpoint
|
||||
request.session['region_name'] = region_name
|
||||
if endpoint != request.session.get('region_endpoint', None):
|
||||
region_name = dict(self.fields['region'].choices)[endpoint]
|
||||
request.session['region_endpoint'] = endpoint
|
||||
request.session['region_name'] = region_name
|
||||
request.user.service_catalog = None
|
||||
|
||||
redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, "")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user