Add newsletter to UI

This commit is contained in:
cuom1999 2020-08-02 17:52:44 -05:00
parent 991835e4f4
commit 3ca7be189a
2 changed files with 11 additions and 15 deletions

View file

@ -98,7 +98,7 @@ MATHOID_CACHE_URL = False
TEXOID_GZIP = False TEXOID_GZIP = False
TEXOID_META_CACHE = 'default' TEXOID_META_CACHE = 'default'
TEXOID_META_CACHE_TTL = 86400 TEXOID_META_CACHE_TTL = 86400
DMOJ_NEWSLETTER_ID_ON_REGISTER = None DMOJ_NEWSLETTER_ID_ON_REGISTER = 1
BAD_MAIL_PROVIDERS = () BAD_MAIL_PROVIDERS = ()
BAD_MAIL_PROVIDER_REGEX = () BAD_MAIL_PROVIDER_REGEX = ()

View file

@ -1,24 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Newsletter list - {{ SITE_LONG_NAME }}{% endblock %} {% block title %} {{ _('Newsletter list') }} - {{ SITE_LONG_NAME }}{% endblock %}
{% block content_title %}Newsletter list{% endblock %} {% block content_title %} {{ _('Newsletter list') }} {% endblock %}
{% block media %}
<style>
* {
box-sizing: border-box;
}
</style>
{% endblock %}
{% block body %} {% block body %}
<h3> {{ _('Subscribe to get the latest emails about upcoming contests and events.')}} </h3>
<br/>
<div style="width: 50%; margin: auto;">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<form method="POST" action="" class="form-area"> <form method="POST" action="" class="form-area" style="width:100%;">
{% csrf_token %} {% csrf_token %}
{{ formset.management_form }} {{ formset.management_form }}
<table class="table"> <table class="table">
<tr> <tr>
<th>Newsletter</th> <th>{{ _('Newsletter') }}</th>
<th>Subscribe</th> <th>{{ _('Subscribe') }}</th>
</tr> </tr>
{% for form in formset.forms %} {% for form in formset.forms %}
<tr> <tr>
@ -32,7 +27,7 @@
</table> </table>
<hr> <hr>
<p> <p>
<input id="id_submit" name="submit" value="Update subscriptions" type="submit" style="float: right"> <input id="id_submit" name="submit" value="{{_('Update subscriptions')}}" type="submit" style="float: right">
</p> </p>
</form> </form>
{% else %} {% else %}
@ -47,4 +42,5 @@
{% endfor %} {% endfor %}
</table> </table>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}