From 2977f5a6495c0ab243c8fb55f5048c3c4e2b4023 Mon Sep 17 00:00:00 2001 From: cobbspur Date: Tue, 11 Aug 2015 14:21:30 +0100 Subject: [PATCH] Lock out email address on signup page refs #5653 - disables email field - pull error message from api response --- core/client/app/controllers/signup.js | 2 +- core/client/app/templates/signup.hbs | 2 +- core/client/app/templates/team/user.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/client/app/controllers/signup.js b/core/client/app/controllers/signup.js index f9f81d5964..794222305d 100644 --- a/core/client/app/controllers/signup.js +++ b/core/client/app/controllers/signup.js @@ -44,7 +44,7 @@ export default Ember.Controller.extend(ValidationEngine, { }).catch(function (resp) { self.toggleProperty('submitting'); if (resp && resp.jqXHR && resp.jqXHR.responseJSON && resp.jqXHR.responseJSON.errors) { - self.set('flowErrors', 'That email address is already in use.'); + self.set('flowErrors', resp.jqXHR.responseJSON.errors[0].message); } else { notifications.showAPIError(resp); } diff --git a/core/client/app/templates/signup.hbs b/core/client/app/templates/signup.hbs index b6a5e35eb6..49a86ff053 100644 --- a/core/client/app/templates/signup.hbs +++ b/core/client/app/templates/signup.hbs @@ -21,7 +21,7 @@ {{#gh-form-group errors=model.errors property="email"}} - {{gh-input type="email" name="email" placeholder="Eg. john@example.com" class="gh-input" enter=(action "signup") autofocus="autofocus" autocorrect="off" value=model.email focusOut=(action "validate" "email")}} + {{gh-input type="email" name="email" placeholder="Eg. john@example.com" class="gh-input" enter=(action "signup") disabled=true autocorrect="off" value=model.email focusOut=(action "validate" "email")}} {{gh-error-message errors=model.errors property="email"}} {{/gh-form-group}} diff --git a/core/client/app/templates/team/user.hbs b/core/client/app/templates/team/user.hbs index 420bb0f4f4..2f5d4fab3b 100644 --- a/core/client/app/templates/team/user.hbs +++ b/core/client/app/templates/team/user.hbs @@ -1,7 +1,7 @@
{{#gh-view-title openMobileMenu="openMobileMenu"}} - {{link-to "team" "team"}} + {{link-to "Team" "team"}} {{user.name}} {{/gh-view-title}}