From 202b0633c975c75af87538e42c25e16fa9e9cd17 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Mon, 21 Apr 2014 20:56:25 +0800 Subject: * 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 --- account/static/js/account_email_resend.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 account/static/js/account_email_resend.js (limited to 'account/static/js') diff --git a/account/static/js/account_email_resend.js b/account/static/js/account_email_resend.js new file mode 100644 index 0000000..e8d2411 --- /dev/null +++ b/account/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); + } + }); +}); + -- cgit v1.2.2