-
-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
505 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends "admin/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block userlinks %} | ||
<a href="{% url 'admin:two_factor:profile' %}">{% trans 'Two Factor' %}</a> / | ||
{{ block.super }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<style type="text/css"> | ||
.form-row button { | ||
background: #79aec8; | ||
padding: 10px 15px; | ||
border: none; | ||
border-radius: 4px; | ||
color: #fff; | ||
cursor: pointer; | ||
} | ||
.login .form-row #id_auth-username, | ||
.login .form-row #id_auth-password, | ||
.login .form-row #id_token-otp_token, | ||
.login .form-row #id_backup-otp_token, | ||
.login .form-row #id_method-method, | ||
.login .form-row #id_generator-token, | ||
.login .form-row #id_call-number, | ||
.login .form-row #id_sms-number { | ||
clear: both; | ||
padding: 8px; | ||
width: 100%; | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
.login .form-row #id_method-method li { | ||
list-style: none; | ||
} | ||
|
||
.form-row button:active, | ||
.form-row button:focus, | ||
.form-row button:hover { | ||
background: #609ab6; | ||
} | ||
|
||
.form-row button[disabled] { | ||
opacity: 0.4; | ||
} | ||
|
||
.form-row button.default { | ||
float: right; | ||
border: none; | ||
font-weight: 400; | ||
background: #417690; | ||
} | ||
|
||
.form-row button.default:active, | ||
.form-row button.default:focus, | ||
.form-row button.default:hover { | ||
background: #205067; | ||
} | ||
|
||
.form-row button.default, | ||
.form-row button.default { | ||
opacity: 0.4; | ||
} | ||
</style> |
14 changes: 14 additions & 0 deletions
14
two_factor/templates/two_factor/admin/_wizard_actions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% load i18n %} | ||
|
||
{# hidden submit button to enable [enter] key #} | ||
<div style="margin-left: -9999px; position: absolute;"><input type="submit" value=""/></div> | ||
|
||
<div class="form-row"> | ||
<a href="{{ cancel_url }}" class="pull-right btn btn-link">{% trans "Cancel" %}</a> | ||
{% if wizard.steps.prev %} | ||
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}" class="">{% trans "Back" %}</button> | ||
{% else %} | ||
<button disabled name="" type="button">{% trans "Back" %}</button> | ||
{% endif %} | ||
<button type="submit" class="">{% trans "Next" %}</button> | ||
</div> |
21 changes: 21 additions & 0 deletions
21
two_factor/templates/two_factor/admin/_wizard_form_auth.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% load i18n %} | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %} | ||
<label for="id_auth-username" class="required">{{ form.username.label }}:</label> {{ form.username }} | ||
</div> | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %} | ||
<label for="id_auth-password" class="required">{% trans 'Password:' %}</label> {{ form.password }} | ||
<input type="hidden" name="this_is_the_login_form" value="1" /> | ||
<input type="hidden" name="next" value="{{ next }}" /> | ||
</div> | ||
{% url 'admin_password_reset' as password_reset_url %} | ||
{% if password_reset_url %} | ||
<div class="password-reset-link"> | ||
<a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a> | ||
</div> | ||
{% endif %} | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_auth-username').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_backup.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.otp_token.errors }}{% endif %} | ||
<label for="id_backup-otp_token" class="required">{{ form.otp_token.label }}:</label> {{ form.otp_token }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_backup-otp_token').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_generator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.token.errors }}{% endif %} | ||
<label for="id_generator-token" class="required">{{ form.token.label }}:</label> {{ form.token }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_generator-token').focus() | ||
</script> |
9 changes: 9 additions & 0 deletions
9
two_factor/templates/two_factor/admin/_wizard_form_method.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load i18n %} | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.method.errors }}{% endif %} | ||
{{ form.method }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_auth-username').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_phone_number.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.number.errors }}{% endif %} | ||
<label for="id_call-number" class="required">{{ form.number.label }}:</label> {{ form.number }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_call-number').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_token.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.otp_token.errors }}{% endif %} | ||
<label for="id_token-otp_token" class="required">{{ form.otp_token.label }}:</label> {{ form.otp_token }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_token-otp_token').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_validation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.token.errors }}{% endif %} | ||
<label for="id_validation-token" class="required">{{ form.token.label }}:</label> {{ form.token }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_validation-token').focus() | ||
</script> |
8 changes: 8 additions & 0 deletions
8
two_factor/templates/two_factor/admin/_wizard_form_yubikey.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="form-row"> | ||
{% if not form.this_is_the_login_form.errors %}{{ form.token.errors }}{% endif %} | ||
<label for="id_yubikey-token" class="required">{{ form.token.label }}:</label> {{ form.token }} | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('id_yubikey-token').focus() | ||
</script> |
Oops, something went wrong.