aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/basic_auth/static/js
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-07-08 17:28:21 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 10:28:48 -0700
commit36f901fbbd68479a911058f4ec3b9717e81e2b92 (patch)
tree5f0b06384a7cd2a653af6580c72e47772be2c0c1 /mediagoblin/plugins/basic_auth/static/js
parentaf665c4eb9dfb53ef9ac28567f7f3806ed313093 (diff)
downloadmediagoblin-36f901fbbd68479a911058f4ec3b9717e81e2b92.tar.lz
mediagoblin-36f901fbbd68479a911058f4ec3b9717e81e2b92.tar.xz
mediagoblin-36f901fbbd68479a911058f4ec3b9717e81e2b92.zip
used template hooks instead of hardcoding basic_auth functionality into templates
Diffstat (limited to 'mediagoblin/plugins/basic_auth/static/js')
-rw-r--r--mediagoblin/plugins/basic_auth/static/js/autofilledin_password.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/mediagoblin/plugins/basic_auth/static/js/autofilledin_password.js b/mediagoblin/plugins/basic_auth/static/js/autofilledin_password.js
new file mode 100644
index 00000000..45e867fe
--- /dev/null
+++ b/mediagoblin/plugins/basic_auth/static/js/autofilledin_password.js
@@ -0,0 +1,25 @@
+/**
+ * GNU MediaGoblin -- federated, autonomous media hosting
+ * Copyright (C) 2012 MediaGoblin contributors. See AUTHORS.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+$(document).ready(function(){
+ $('#forgot_password').click(function(event){
+ event.preventDefault();
+ window.location.pathname = $(this).attr('href') + '?username=' +
+ $('#username').val();
+ });
+});