Fix horizon login autocomplete control issues

The autocomplete html attribute isn't respected by many of the newer
browsers, so setting autocomplete=False or off will not work to disable
autocompletion in many cases. https://review.openstack.org/#/c/114312/
solved this issue for most forms, however the login screen overrides
these fixes, so this patch ports those changes to the login screen
fixing the problem of autocomplete not disabling the fields.

Change-Id: Ibd62b0956991aa3e65e2756fa6750eb9721c3549
Closes-Bug: 1433110
This commit is contained in:
Sam Betts 2015-03-23 14:52:57 +00:00
parent 4fdc42cf63
commit e5d5e64fb3
1 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,15 @@
{% block autocomplete %}{{ HORIZON_CONFIG.password_autocomplete }}{% endblock %}
{% block modal-body %}
{% comment %}
These fake fields are required to prevent Chrome v34+ from autofilling form.
{% endcomment %}
{% if HORIZON_CONFIG.password_autocomplete != "on" %}
<div class="fake_credentials" style="display: none">
<input type="text" name="fake_email" value="" />
<input type="password" name="fake_password" value="" />
</div>
{%endif%}
<fieldset>
{% if request.user.is_authenticated and 'next' in request.GET %}
<div class="form-group clearfix error">