Update emails
This commit is contained in:
parent
164a712902
commit
af5bee5147
18 changed files with 481 additions and 170 deletions
21
templates/email_change/email_change.html
Normal file
21
templates/email_change/email_change.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block media %}
|
||||
<style type="text/css">
|
||||
.errorlist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
color: red;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<form action="" method="post" class="form-area">{% csrf_token %}
|
||||
<table border="0">{{ form.as_table() }}</table>
|
||||
<hr>
|
||||
<button style="float:right;" type="submit">{{ _('Verify Email') }}</button>
|
||||
</form>
|
||||
{% endblock %}
|
4
templates/email_change/email_change_failure.html
Normal file
4
templates/email_change/email_change_failure.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<p>{{ _('Invalid reset link.') }}</p>
|
||||
{% endblock %}
|
6
templates/email_change/email_change_pending.html
Normal file
6
templates/email_change/email_change_pending.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
{% if request.profile.email_change_pending %}
|
||||
<p>{{ _('An email was sent to') }} {{request.profile.email_change_pending}}. {{_('If you don\'t see it, kindly check your spam folder as well.')}}</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
4
templates/email_change/email_change_success.html
Normal file
4
templates/email_change/email_change_success.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<p>{{ _('Your email was sucessfully changed to') }} {{user.email}}</p>
|
||||
{% endblock %}
|
21
templates/general_email.html
Normal file
21
templates/general_email.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div style="max-width: 600px; margin: 0 auto; padding: 20px; background-color: #ffffff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);">
|
||||
<div style="text-align: center; margin-bottom: 20px;">
|
||||
<img src="{{ protocol }}://{{ domain }}{{static('icons/logo.png')}}" alt="{{site_name}}" style="max-width: 150px;">
|
||||
</div>
|
||||
<div style="margin-bottom: 20px; text-align: center;">
|
||||
<h2>{{title}}</h2>
|
||||
<p>{{_('Dear')}} {{username}},</p>
|
||||
<p>{{message}}</p>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<a href="{{ protocol }}://{{ domain }}{{ url_path }}" style="display: inline-block; padding: 10px 20px; background-color: #007bff; color: #ffffff; text-decoration: none; border-radius: 4px;">{{button_text}}</a>
|
||||
</div>
|
||||
</div>
|
|
@ -6,7 +6,7 @@
|
|||
{% if show_preview %}
|
||||
<div id="{{ postfix|safe }}-preview" data-preview-url="{{ preview_url }}" data-textarea-id="wmd-input-{{ postfix }}"
|
||||
data-timeout="{{ preview_timeout or '' }}" class="wmd-panel wmd-preview dmmd-preview {{ extra_classes }}">
|
||||
<div class="dmmd-preview-update"><i class="fa fa-refresh"></i> Update Preview</div>
|
||||
<div class="dmmd-preview-update"><i class="fa fa-refresh"></i> {{_('Update Preview')}}</div>
|
||||
<div class="dmmd-preview-content content-description"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
<b>Thanks for registering on the {{ site.name }}! We're glad to have you.</b>
|
||||
<br><br>
|
||||
The last step is activating your account. Please activate your {{ SITE_NAME }} account in the next {{ expiration_days }} days.
|
||||
<br><br>
|
||||
Please click on the following link to activate your account:
|
||||
<p style="margin-left:1em">
|
||||
<a href="http://{{ site.domain }}/accounts/activate/{{ activation_key }}/">http://{{ site.domain }}/accounts/activate/{{ activation_key }}</a>
|
||||
</p>
|
||||
|
||||
Alternatively, you can reply to this message to activate your account.
|
||||
Your reply must keep the following text intact for this to work:
|
||||
{% set url_path = "/accounts/activate/" + activation_key %}
|
||||
{% set title = _("Account activation") %}
|
||||
{% set message = _("Thanks for registering! We're glad to have you. The last step is activating your account. Please activate your account in the next %(expiration_days)d days.", expiration_days=expiration_days) %}
|
||||
{% set username = user.get_username() %}
|
||||
{% set button_text = _("Activate") %}
|
||||
{% set domain = site.domain %}
|
||||
{% set protocol = "http" %}
|
||||
{% include "general_email.html" %}
|
||||
<br>
|
||||
{{_("Alternatively, you can reply to this message to activate your account. Your reply must keep the following text intact for this to work:")}}
|
||||
|
||||
<pre style="margin-left:1em">
|
||||
{{ activation_key }}
|
||||
</pre>
|
||||
|
||||
{% if SITE_ADMIN_EMAIL %}
|
||||
See you soon!
|
||||
<br>
|
||||
If you have problems activating your account, feel free to send us an email at <a href="mailto:{{ SITE_ADMIN_EMAIL }}">{{ SITE_ADMIN_EMAIL }}</a>.
|
||||
{% else %}
|
||||
See you soon!
|
||||
{% endif %}
|
||||
{{_("See you soon!")}}
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
<span style="display:block;margin: 0 2px;padding: 1em;border: 3px solid #FFDE05;background-color: #000;border-radius: 6px;font-size: .95em;color: #444;margin-bottom:0.75em">
|
||||
<div style="display:table;margin-left:2em"><img src="https://avatars1.githubusercontent.com/u/6934864?v=3&s=101" style="display:inline;vertical-align: middle">
|
||||
<h1 style="font-size:4em;display:inline;vertical-align: middle"><a href="//{{ domain }}" style="text-decoration:none;color:gray"><span style="color: #FFDE05">LQD</span>OJ</a>
|
||||
</h1>
|
||||
</div>
|
||||
</span>
|
||||
<div style="display:block;margin: 0 2px;padding: 1em;border: 3px solid #2980B9;background-color: #f8f8f8;border-radius: 6px;font-size: .95em;color: #444;">
|
||||
|
||||
<b>Forgot your password on the {{ site_name }}? Don't worry!</b><br><br>
|
||||
To reset the password for your account "{{ user.get_username() }}", click the below button.
|
||||
<p align="center">
|
||||
<a href="{{ protocol }}://{{ domain }}{{ url('password_reset_confirm', uidb64=uid, token=token) }}" style="cursor: pointer;display:block;text-align: center;padding: 4px 2px 5px;color: white;border: 1px solid #666;border-radius: 1px;background: #2980b9;background: linear-gradient(180deg, #00aee0, #2980b9);text-decoration: none;line-height:2em;font-size:1emm;width:12em;">Reset password</a>
|
||||
</p>
|
||||
{% if SITE_ADMIN_EMAIL %}
|
||||
See you soon! If you have problems resetting your email, feel free to shoot us an email at <a href="mailto:{{ SITE_ADMIN_EMAIL }}">{{ SITE_ADMIN_EMAIL }}</a>
|
||||
{% else %}
|
||||
See you soon!
|
||||
{% endif %}
|
||||
</div>
|
||||
{% set url_path = url('password_reset_confirm', uidb64=uid, token=token) %}
|
||||
{% set title = _("Password Reset") %}
|
||||
{% set message = _("We have received a request to reset your password. Click the button below to reset your password:") %}
|
||||
{% set username = user.get_username() %}
|
||||
{% set button_text = _("Reset Password") %}
|
||||
{% include "general_email.html" %}
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<p>{{ _('You have successfully been registered. An email has been sent to the email address you provided to confirm your registration.') }}</p>
|
||||
<p>{{ _('You have successfully been registered. An email has been sent to the email address you provided to confirm your registration. If you don\'t see it, kindly check your spam folder as well.') }}</p>
|
||||
{% endblock %}
|
|
@ -78,12 +78,6 @@
|
|||
<div class="block-header">{{ _('Default language') }}</div>
|
||||
<span class="fullwidth">{{ form.language }}</span>
|
||||
|
||||
<div class="block-header">{{ _('Affiliated organizations') }}</div>
|
||||
{{ form.organizations }}
|
||||
{% if form.organizations.errors %}
|
||||
<div class="form-field-error">{{ form.organizations.errors }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.captcha %}
|
||||
<div style="margin-top: 0.5em">{{ form.captcha }}</div>
|
||||
{% if form.captcha.errors %}
|
||||
|
@ -92,12 +86,6 @@
|
|||
{% endif %}
|
||||
|
||||
<hr>
|
||||
{% if tos_url %}
|
||||
<span class="tos-section">
|
||||
{{ _('By registering, you agree to our') }}
|
||||
<a href="{{ tos_url }}">{{ _('Terms & Conditions') }}</a>.
|
||||
</span>
|
||||
{% endif %}
|
||||
<button style="float:right;" type="submit">{{ _('Register!') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -47,6 +47,10 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.main-info tr td {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -91,7 +95,7 @@
|
|||
|
||||
{% csrf_token %}
|
||||
|
||||
<table class="block-header grayed">
|
||||
<table class="block-header grayed main-info">
|
||||
<tr>
|
||||
<td> {{ _('Fullname') }}: </td>
|
||||
<td> {{ form_user.first_name }} </td>
|
||||
|
@ -101,8 +105,25 @@
|
|||
<td> {{ form_user.last_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-top: 1em">{{ _('Avatar') }}: </td>
|
||||
<td style="padding-top: 1em">{{ form.profile_image }}</td>
|
||||
<td> {{ _('Password') }}: </td>
|
||||
<td>
|
||||
<a href="{{ url('password_change') }}">
|
||||
{{ _('Change your password') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> {{ _('Email') }}: </td>
|
||||
<td>
|
||||
{{ request.user.email }}
|
||||
<a href="{{ url('email_change') }}">
|
||||
({{ _('Change email') }})
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ _('Avatar') }}: </td>
|
||||
<td>{{ form.profile_image }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
@ -133,29 +154,22 @@
|
|||
<td><span class="fullwidth">{{ form.math_engine }}</span></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{{ url('password_change') }}" class="inline-header">
|
||||
{{ _('Change your password') }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<div>
|
||||
{% if profile.is_totp_enabled %}
|
||||
{{ _('Two Factor Authentication is enabled.') }}
|
||||
{% if require_staff_2fa and request.user.is_staff %}
|
||||
<a id="disable-2fa-button" class="button inline-button">Disable</a>
|
||||
{% else %}
|
||||
<a href="{{ url('disable_2fa') }}" class="button inline-button">Disable</a>
|
||||
<a href="{{ url('disable_2fa') }}" class="button inline-button">{{_('Disable')}}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ _('Two Factor Authentication is disabled.') }}
|
||||
<a href="{{ url('enable_2fa') }}" class="button inline-button">Enable</a>
|
||||
<a href="{{ url('enable_2fa') }}" class="button inline-button">{{_('Enable')}}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<br><hr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue