Merge "Restored functionality of the region switcher dropdown."
This commit is contained in:
commit
4f7ee81b58
@ -2,7 +2,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block modal-header %}{% trans "Log In" %}{% endblock %}
|
{% 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 %}
|
{% 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
|
# For now we'll allow fallback to OPENSTACK_KEYSTONE_URL if the
|
||||||
# form post doesn't include a region.
|
# form post doesn't include a region.
|
||||||
endpoint = data.get('region', None) or settings.OPENSTACK_KEYSTONE_URL
|
endpoint = data.get('region', None) or settings.OPENSTACK_KEYSTONE_URL
|
||||||
region_name = dict(self.fields['region'].choices)[endpoint]
|
if endpoint != request.session.get('region_endpoint', None):
|
||||||
request.session['region_endpoint'] = endpoint
|
region_name = dict(self.fields['region'].choices)[endpoint]
|
||||||
request.session['region_name'] = region_name
|
request.session['region_endpoint'] = endpoint
|
||||||
|
request.session['region_name'] = region_name
|
||||||
|
request.user.service_catalog = None
|
||||||
|
|
||||||
redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, "")
|
redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user