aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorJef van Schendel <mail@jefvanschendel.nl>2011-12-29 22:54:31 +0100
committerJef van Schendel <mail@jefvanschendel.nl>2011-12-29 22:54:31 +0100
commit4e9d467fc0b3dfc55db15e84d5d988cefa400fa1 (patch)
tree44c04d8ecbc64112bd90ded056056eacf63273a8 /mediagoblin/templates
parentdab1d70280652049078add60c6c44f675fbe267c (diff)
downloadmediagoblin-4e9d467fc0b3dfc55db15e84d5d988cefa400fa1.tar.lz
mediagoblin-4e9d467fc0b3dfc55db15e84d5d988cefa400fa1.tar.xz
mediagoblin-4e9d467fc0b3dfc55db15e84d5d988cefa400fa1.zip
Isolate JavaScript; add new show_password.js to forgot-password-page as well
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/auth/change_fp.html5
-rw-r--r--mediagoblin/templates/mediagoblin/auth/register.html23
2 files changed, 7 insertions, 21 deletions
diff --git a/mediagoblin/templates/mediagoblin/auth/change_fp.html b/mediagoblin/templates/mediagoblin/auth/change_fp.html
index 03a6583b..e8e64023 100644
--- a/mediagoblin/templates/mediagoblin/auth/change_fp.html
+++ b/mediagoblin/templates/mediagoblin/auth/change_fp.html
@@ -19,6 +19,11 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+{% block mediagoblin_head %}
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/show_password.js') }}"></script>
+{% endblock mediagoblin_head %}
+
{% block mediagoblin_content %}
<form action="{{ request.urlgen('mediagoblin.auth.verify_forgot_password') }}"
diff --git a/mediagoblin/templates/mediagoblin/auth/register.html b/mediagoblin/templates/mediagoblin/auth/register.html
index 73eae0d8..cdc2ea24 100644
--- a/mediagoblin/templates/mediagoblin/auth/register.html
+++ b/mediagoblin/templates/mediagoblin/auth/register.html
@@ -20,27 +20,8 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_head %}
- <script>
- $(document).ready(function(){
- $("#password").after('<input type="text" value="" name="password_clear" id="password_clear" /><label><input type="checkbox" id="password_boolean" />Show password</label>');
- $('#password_clear').hide();
- $('#password_boolean').click(function(){
- if($('#password_boolean').prop("checked")) {
- $('#password_clear').val($('#password').val());
- $('#password').hide();
- $('#password_clear').show();
- } else {
- $('#password').val($('#password_clear').val());
- $('#password_clear').hide();
- $('#password').show();
- };
- });
- $('#password,#password_clear').keyup(function(){
- $('#password').val($(this).val());
- $('#password_clear').val($(this).val());
- });
- });
- </script>
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/show_password.js') }}"></script>
{% endblock mediagoblin_head %}
{% block mediagoblin_content %}