aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-04-21 20:56:25 +0800
committerWeitian LI <liweitianux@gmail.com>2014-04-21 20:56:25 +0800
commit202b0633c975c75af87538e42c25e16fa9e9cd17 (patch)
treee6bfe745134df71e36bf0d3e9ef1a130cd5d9ace /static
parent83bd9f81631424694b95a50e923e3f6933f67141 (diff)
downloaddjango-skaschool-202b0633c975c75af87538e42c25e16fa9e9cd17.tar.bz2
* added 'ResendEmailForm' forms
* implemented 'ResendEmailView' class-based view and templates * added js code 'account_email_resend.js' Warning: cannot load static file located in app directory
Diffstat (limited to 'static')
-rw-r--r--static/js/account_email_resend.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/static/js/account_email_resend.js b/static/js/account_email_resend.js
new file mode 100644
index 0000000..e8d2411
--- /dev/null
+++ b/static/js/account_email_resend.js
@@ -0,0 +1,19 @@
+/*
+ * email_resend.js for 'account/email_resend.html'
+ */
+
+$(document).ready(function() {
+ // disable email field by default
+ $("input#id_email").prop("disabled", true);
+
+ // update email field when 'is_update_email' checkbox changed
+ $("input#id_is_update_email").change(function(e) {
+ if ($(this).prop("checked")) {
+ $("input#id_email").prop("disabled", false);
+ }
+ else {
+ $("input#id_email").prop("disabled", true);
+ }
+ });
+});
+