-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
1 parent
e777b94
commit c842a8a
Showing
4 changed files
with
76 additions
and
57 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 was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
backend/templates/v2/account/components/password-input.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,23 @@ | ||
{% load i18n %} | ||
|
||
{% if not field_label %} | ||
{% trans "Password" as field_label %} | ||
{% endif %} | ||
|
||
<div> | ||
<label> | ||
<span class="block text-sm/6 font-medium text-gray-900 mb-2"> | ||
{{ field_label }} | ||
</span> | ||
<input | ||
type="password" | ||
name="{{ input_name }}" | ||
{% if password_type == "new" %} | ||
autocomplete="new-password" | ||
{% else %} | ||
autocomplete="current-password" | ||
{% endif %} | ||
class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-amber-400 sm:text-sm/6" | ||
required> | ||
</label> | ||
</div> |
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,51 @@ | ||
{% extends "account/base.html" %} | ||
{% load i18n static %} | ||
|
||
{% block head_title %} | ||
{{ title }} | ||
{% endblock head_title %} | ||
|
||
{% block additional_headers %} | ||
<script src='https://www.google.com/recaptcha/api.js?hl=ro' async defer></script> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="container max-w-6xl"> | ||
|
||
<form id='reset-password' action="/password/" role="form" method="post"> | ||
<header class="flex flex-col justify-center items-center"> | ||
<h1 class="text-center text-gray-900 text-3xl font-bold leading-9 mb-6"> | ||
{% trans "Set a new password" %} | ||
</h1> | ||
</header> | ||
|
||
{% csrf_token %} | ||
|
||
<div class="overflow-hidden rounded-lg bg-white drop-shadow ring-1 ring-gray-200"> | ||
<div class="px-10 py-8 grid gap-6"> | ||
|
||
<input type="hidden" name="token" value="{{ token }}"/> | ||
|
||
{% trans "New password" as password_label %} | ||
{% trans "Confirm password" as password_confirm_label %} | ||
|
||
{% include "account/components/password-input.html" with field_label=password_label input_name="password" password_type="new" %} | ||
|
||
{% include "account/components/password-input.html" with field_label=password_confirm_label input_name="password_confirm" password_type="new" %} | ||
|
||
<button | ||
type="submit" | ||
class="w-full text-center bg-amber-300 sm:text-base text-sm sm:px-6 sm:py-2 px-2 py-1 shadow-sm rounded-full text-gray-900 hover:bg-amber-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-amber-300"> | ||
{% trans "Change password" %} | ||
</button> | ||
|
||
</div> | ||
</div> | ||
</form> | ||
|
||
<div class="g-recaptcha" data-sitekey="{{ captcha_public_key }}" data-size="invisible" data-callback="onSubmit"></div> | ||
|
||
</div> | ||
|
||
{% endblock %} |