set username default server-side
This commit is contained in:
parent
6c49799deb
commit
952b97d5a0
@ -236,7 +236,8 @@ def forgot_password(request):
|
||||
|
||||
Sends an email with an url to renew forgotten password
|
||||
"""
|
||||
fp_form = auth_forms.ForgotPassForm(request.POST)
|
||||
fp_form = auth_forms.ForgotPassForm(request.POST,
|
||||
username=request.GET.get('username'))
|
||||
|
||||
if request.method == 'POST' and fp_form.validate():
|
||||
|
||||
|
@ -22,6 +22,4 @@ $(document).ready(function(){
|
||||
window.location.pathname = $(this).attr('href') + '?username=' +
|
||||
$('#username').val();
|
||||
});
|
||||
|
||||
$('#username').val(window.location.search.match(/username=(.*)/)[1]);
|
||||
});
|
||||
|
@ -19,11 +19,6 @@
|
||||
|
||||
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
|
||||
|
||||
{% block mediagoblin_head %}
|
||||
<script type="text/javascript"
|
||||
src="{{ request.staticdirect('/js/autofilledin_password.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block mediagoblin_content %}
|
||||
<form action="{{ request.urlgen('mediagoblin.auth.forgot_password') }}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
|
Loading…
x
Reference in New Issue
Block a user