Skip to content

Commit

Permalink
first pass through "/login"
Browse files Browse the repository at this point in the history
In #6041 we added the "aria-label" attribute in the "render_kw"
dictionary passed to each wtforms.fields.Field.  Here we add them
these attributes directly to the raw INPUT elements.
  • Loading branch information
cfm committed Nov 4, 2021
1 parent da2d0b7 commit 5b40da5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 9 additions & 7 deletions securedrop/journalist_templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,35 @@
<body>

{% if g.user %}
<div id="logout">
<nav>
{{ gettext('Logged on as') }} <a href="{{ url_for('account.edit') }}" id="link-edit-account">{{ g.user.username }}</a> |
{% if g.user and g.user.is_admin %}
<a href="{{ url_for('admin.index') }}" id="link-admin-index">{{ gettext('Admin') }}</a> |
{% endif %}
<a href="{{ url_for('main.logout') }}" id="link-logout">{{ gettext('Log Out') }}</a>
</div>
</nav>
{# FIXME
<div class="clearfix"></div>
#}
{% endif %}

<div class="content">
<div class="container">
{% block header %}
<div id="header">
<a href="{{ url_for('main.index') }}" class="no-bottom-border"><img src="{{ g.logo }}" class="logo small" alt="{{ g.organization_name }} | Home" width="250"></a>
<header>
<a href="{{ url_for('main.index') }}" class="no-bottom-border"><img src="{{ g.logo }}" class="logo small" alt="{{ g.organization_name }} logo" width="250"></a>
{% include 'locales.html' %}
</div>
</header>
{% endblock %}
<div class="panel-container column">
<main {# FIXME: class="panel-container column" #}>
<div class="flash-panel">
{% include 'flashed.html' %}
</div>
<div class="panel selected">

{% block body %}{% endblock %}
</div>
</div>
</main>
</div>

{% block footer %}
Expand Down
10 changes: 5 additions & 5 deletions securedrop/journalist_templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ <h1>{{ gettext('Login to access the journalist interface') }}</h1>

<form method="post" action="/login" autocomplete="off" class="login-form">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<p><input class="login-username" type="text" name="username" autocomplete="off" placeholder="{{ gettext('Username') }}" autofocus></p>
<p><input class="login-password" id="login-form-password" type="password" name="password" placeholder="{{ gettext('Password') }}"></p>
<p class="show-password-checkbox-container"><label><input id="show-password-check" type="checkbox">{{ gettext('Show password') }}</label></p>
<p><input class="login-token" name="token" id="token" type="text" placeholder="{{ gettext('Two-factor Code') }}"></p>
<button type="submit">{{ gettext('LOG IN') }}</button>
<div><input class="login-username" type="text" name="username" autocomplete="off" placeholder="{{ gettext('Username') }}" autofocus aria-label="{{ gettext('Username') }}"></div>
<div><input class="login-password" id="login-form-password" type="password" name="password" placeholder="{{ gettext('Password') }}" aria-label="{{ gettext('Password') }}"></div>
<div class="show-password-checkbox-container"><label><input id="show-password-check" type="checkbox">{{ gettext('Show password') }}</label></div>
<div><input class="login-token" name="token" id="token" type="text" placeholder="{{ gettext('Two-factor Code') }}" aria-label="{{ gettext('Two-factor code') }}"></div>
<button type="submit" aria-label="{{ gettext('Continue') }}">{{ gettext('LOG IN') }}</button>
</form>

{% endblock %}

0 comments on commit 5b40da5

Please sign in to comment.