From b7d695a505af7cff457404737d4be99d046b1cc1 Mon Sep 17 00:00:00 2001
From: Sean McArthur <sean.monstar@gmail.com>
Date: Wed, 20 Jun 2012 15:52:37 -0700
Subject: [PATCH] adding email disabling to dialog and signup pages

---
 resources/static/dialog/controllers/authenticate.js | 2 ++
 resources/static/pages/signup.js                    | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/resources/static/dialog/controllers/authenticate.js b/resources/static/dialog/controllers/authenticate.js
index ac413aa99..c316e55a5 100644
--- a/resources/static/dialog/controllers/authenticate.js
+++ b/resources/static/dialog/controllers/authenticate.js
@@ -43,6 +43,7 @@ BrowserID.Modules.Authenticate = (function() {
 
     if (!email) return;
 
+    dom.setAttr('#email', 'disabled', 'disabled');
     if(info && info.type) {
       onAddressInfo(info);
     }
@@ -54,6 +55,7 @@ BrowserID.Modules.Authenticate = (function() {
 
     function onAddressInfo(info) {
       addressInfo = info;
+      dom.removeAttr('#email', 'disabled');
 
       if(info.type === "primary") {
         self.close("primary_user", info, info);
diff --git a/resources/static/pages/signup.js b/resources/static/pages/signup.js
index 3fef51bad..d7d4049ba 100644
--- a/resources/static/pages/signup.js
+++ b/resources/static/pages/signup.js
@@ -99,15 +99,17 @@ BrowserID.signUp = (function() {
           self = this;
 
       if (email) {
-
+        dom.setAttr('#email', 'disabled', 'disabled');
         user.isEmailRegistered(email, function(isRegistered) {
           if(isRegistered) {
+            dom.removeAttr('#email', 'disabled');
             $('#registeredEmail').html(email);
             showNotice(".alreadyRegistered");
             oncomplete && oncomplete(false);
           }
           else {
             user.addressInfo(email, function(info) {
+              dom.removeAttr('#email', 'disabled');
               if(info.type === "primary") {
                 createPrimaryUser.call(self, info, oncomplete);
               }
-- 
GitLab