#: templates/telemeta_default/profile_detail.html:21
msgid "Last login"
msgstr "Dernière connexion"
+
+#: templates/telemeta_default/login.html:21
+msgid "Password forgotten"
+msgstr "Mot de passe oublié"
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
+
+{% block content %}
+
+<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
+
+<p><a href="../">{% trans 'Log in again' %}</a></p>
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta_default/registration/password_change_done.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_change_form.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_reset_complete.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_reset_confirm.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_reset_done.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_reset_email.html" %}
\ No newline at end of file
--- /dev/null
+{% extends "telemeta_default/registration/password_reset_form.html" %}
\ No newline at end of file
{% block content %}
<h3>{% trans "User authentication" %}</h3>
-
+<br />
{% if form.errors %}
<p class="login-error">{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
{{ form.password }}
</p>
-<a href="#" class="component_icon button icon_login"
+<a href="#" class="component_icon button icon_login" style="float: right;"
onclick="document.getElementById('_loginForm').submit(); return false;">{% trans "Sign in" %}</a>
-<!--<input class="submit" type="submit" value="{% trans "Sign in" %}"/>-->
<input type="hidden" name="next" value="{{ next }}" />
+<span style="align: right;"><a href="{% url telemeta-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
</form>
+
{% endblock %}
<dt>{% trans "Last login" %}</dt><dd>{{ usr.last_login }}</dd>
</dl>
</div>
+ <a href="{% url telemeta-password-change %}" class="component_icon button icon_login" style="float:left">{% trans "Change password" %}</a>
</div>
{% endblock %}
<table>
{% for form in forms %}
{% for field in form %}
- {% if not field.html_name in hidden_fields %}
+ {% if not field.html_name in user_hidden_fields %}
<tr>
<tr><td class="error">{{ field.errors }}</td></tr>
<td>{% trans field.label_tag %} : </td><td>{{ field }}</td>
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
+
+{% block content %}
+
+<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
+
+<p><a href="../">{% trans 'Log in again' %}</a></p>
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}{% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password change successful' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password change successful' %}</h1>
+
+<p>{% trans 'Your password was changed.' %}</p>
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n adminmedia %}
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />{% endblock %}
+{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %} {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password change' %}{% endblock %}
+
+{% block content %}<div id="content-main">
+
+<form id="password_change" action="" method="post">{% csrf_token %}
+<div>
+{% if form.errors %}
+ <p class="errornote">
+ {% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+ </p>
+{% endif %}
+
+<h1>{% trans 'Password change' %}</h1>
+
+<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<fieldset class="aligned wide">
+
+<div class="form-row">
+ {{ form.old_password.errors }}
+ <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
+</div>
+
+<div class="form-row">
+ {{ form.new_password1.errors }}
+ <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
+</div>
+
+<div class="form-row">
+{{ form.new_password2.errors }}
+ <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
+</div>
+
+</fieldset>
+
+<br />
+<div class="submit-row">
+ <a href="#" class="component_icon button icon_save"
+ onclick="document.getElementById('password_change').submit(); return false;">{% trans 'Change my password' %}</a>
+</div>
+
+<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
+</div>
+</form></div>
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset complete' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password reset complete' %}</h1>
+
+<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
+
+<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset confirmation' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset' %}{% endblock %}
+
+{% block content %}
+
+{% if validlink %}
+
+<h1>{% trans 'Enter new password' %}</h1>
+
+<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<form id="password_confirm" action="" method="post">{% csrf_token %}
+{{ form.new_password1.errors }}
+<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
+{{ form.new_password2.errors }}
+<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
+<p><a href="#" class="component_icon button icon_save" onclick="document.getElementById('password_confirm').submit(); return false;">{% trans 'Change my password' %}</a></p>
+</form>
+
+{% else %}
+
+<h1>{% trans 'Password reset unsuccessful' %}</h1>
+
+<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
+
+{% endif %}
+
+{% endblock %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset successful' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password reset successful' %}</h1>
+
+<p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p>
+
+{% endblock %}
--- /dev/null
+{% load i18n %}{% autoescape off %}
+{% trans "You're receiving this e-mail because you requested a password reset" %}
+{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
+
+{% trans "Please go to the following page and choose a new password:" %}
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url telemeta-password-reset-confirm uidb36=uid token=token %}
+{% endblock %}
+{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
+
+{% trans "Thanks for using our site!" %}
+
+{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
+
+{% endautoescape %}
--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans "Password reset" %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans "Password reset" %}</h1>
+
+<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
+
+<form id="password_reset" action="" method="post">{% csrf_token %}
+{{ form.email.errors }}
+<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <a href="#" class="component_icon button icon_ok" onclick="document.getElementById('password_reset').submit(); return false;">{% trans 'Reset my password' %}</a></p>
+</form>
+
+{% endblock %}
url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
name="telemeta-login"),
url(r'^logout/$', web_view.logout, name="telemeta-logout"),
-
+
# Profile
url(r'^accounts/(?P<username>[A-Za-z0-9._-]+)/profile/$', web_view.profile_detail, name="telemeta-profile-detail"),
url(r'^accounts/(?P<username>[A-Za-z0-9._-]+)/profile/edit/$', web_view.profile_edit, name="telemeta-profile-edit"),
+ # Registration
+ url(r'^accounts/password_change/$', 'django.contrib.auth.views.password_change', {'template_name': 'telemeta/registration/password_change_form.html'}, name="telemeta-password-change"),
+ url(r'^accounts/password_change_done/$', 'django.contrib.auth.views.password_change_done', {'template_name': 'telemeta/registration/password_change_done.html'}, name="telemeta-password-change-done"),
+
+ url(r'^accounts/password_reset/$', 'django.contrib.auth.views.password_reset', {'template_name': 'telemeta/registration/password_reset_form.html', 'email_template_name': 'telemeta/registration/password_reset_email.html'}, name="telemeta-password-reset"),
+ url(r'^accounts/password_reset_done/$', 'django.contrib.auth.views.password_reset_done', {'template_name': 'telemeta/registration/password_reset_done.html'}, name="telemeta-password-reset-done"),
+ url(r'^accounts/password_reset_confirm/(?P<uidb36>[A-Za-z0-9._-]+)/(?P<token>[A-Za-z0-9._-]+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name': 'telemeta/registration/password_reset_confirm.html'}, name="telemeta-password-reset-confirm"),
+ url(r'^accounts/password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'telemeta/registration/password_reset_complete.html'}, name="telemeta-password-reset-complete"),
+ url(r'^accounts/password_reset_complete/$', 'django.contrib.auth.views.password_reset_complete', {'template_name': 'telemeta/registration/password_reset_complete.html'}, name="telemeta-password-reset-complete"),
+
# JSON RPC
url(r'^json/browse/', 'jsonrpc.views.browse', name="jsonrpc_browser"), # for the graphical browser/web console only, omissible
url(r'^json/$', jsonrpc_site.dispatch, name='jsonrpc_mountpoint'),
def profile_edit(self, request, username, template='telemeta/profile_edit.html'):
if request.user.is_staff:
- user_hidden_fields = []
+ user_hidden_fields = ['profile-user', 'user-password', 'user-last_login', 'user-date_joined']
else:
user_hidden_fields = ['user-username', 'user-is_staff', 'profile-user', 'user-is_active',
'user-password', 'user-last_login', 'user-date_joined', 'user-groups',
user_form = UserChangeForm(instance=user, prefix='user')
profile_form = UserProfileForm(instance=profile, prefix='profile')
forms = [user_form, profile_form]
- return render(request, template, {'forms': forms, 'usr': user, 'hidden_fields': user_hidden_fields})
+ return render(request, template, {'forms': forms, 'usr': user, 'user_hidden_fields': user_hidden_fields})