Skip to content
Snippets Groups Projects
Commit b7d695a5 authored by Sean McArthur's avatar Sean McArthur
Browse files

adding email disabling to dialog and signup pages

parent ff5e49f5
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment