subscriptions page fitting the user auth
1 parent edff62a commit 45126734d50e2e23f486aaeedcba6f3ebd977e0b
@benste benste authored on 4 Aug 2011
Showing 4 changed files
View
12
forms.py
 
class ListSubscribe(FieldsetForm):
"""Form fields to join an existing list.
"""
listname = forms.EmailField(
label = _('List Name'),
fqdn_listname = forms.EmailField(
label = '',#_('List Name'),
widget = forms.HiddenInput(),
error_messages = {
'required': _('Please enter the mailing list address.'),
'invalid': _('Please enter a valid email address.')
To use it: add a list for each wished fieldset. The first item in
the list should be the wished name of the fieldset, the following
the fields that should be included in the fieldset.
"""
layout = [["Subscribe", "email","real_name","name"]]
layout = [["Subscribe", "email","real_name","name","fqdn_listname"]]
 
class ListUnsubscribe(FieldsetForm):
"""Form fields to leave an existing list.
"""
listname = forms.EmailField(
label = _('List Name'),
fqdn_listname = forms.EmailField(
label = '',#_('List Name'),
widget = forms.HiddenInput(),
error_messages = {
'required': _('Please enter the mailing list address.'),
'invalid': _('Please enter a valid email address.')
To use it: add a list for each wished fieldset. The first item in
the list should be the wished name of the fieldset, the following
the fields that should be included in the fieldset.
"""
layout = [["Unsubscribe", "email","name"]]
layout = [["Unsubscribe", "email","name","fqdn_listname"]]
 
# should at one point add the password to be required as well! #TODO
class ListSettings(FieldsetForm):
"""Form fields dealing with the list settings.
View
4
templates/mailman-django/base.html
<div id="mm_footer">
{% block footer %}
{% include "mailman-django/list_selector.html" %}
{% if request.user.is_authenticated %}
<p id="login"><a href="{% url user_login %}">{% trans "Login" %}</a></p>
<p id="login"><a href="{% url user_login %}">{% trans "Login" %}</a> {{request.user.username}}</p>
{% else %}
<p id="logout"><a href="{% url user_logout %}">{% trans "Logout" %}</a></p>
<p id="logout"><a href="{% url user_logout %}">{% trans "Logout" %}</a> {{request.user.username}}</p>
{% endif %}
{% endblock %}
</div>
</div>
View
templates/mailman-django/lists/subscriptions.html
View
views.py