Lock out email address on signup page

refs #5653

- disables email field
- pull error message from api response
This commit is contained in:
cobbspur 2015-08-11 14:21:30 +01:00
parent 27122091b5
commit 04130cf8c1
3 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ export default Ember.Controller.extend(ValidationEngine, {
}).catch(function (resp) { }).catch(function (resp) {
self.toggleProperty('submitting'); self.toggleProperty('submitting');
if (resp && resp.jqXHR && resp.jqXHR.responseJSON && resp.jqXHR.responseJSON.errors) { 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 { } else {
notifications.showAPIError(resp); notifications.showAPIError(resp);
} }

View File

@ -21,7 +21,7 @@
{{#gh-form-group errors=model.errors property="email"}} {{#gh-form-group errors=model.errors property="email"}}
<label for="email-address">Email address</label> <label for="email-address">Email address</label>
<span class="input-icon icon-mail"> <span class="input-icon icon-mail">
{{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")}}
</span> </span>
{{gh-error-message errors=model.errors property="email"}} {{gh-error-message errors=model.errors property="email"}}
{{/gh-form-group}} {{/gh-form-group}}

View File

@ -1,7 +1,7 @@
<section class="gh-view"> <section class="gh-view">
<header class="view-header"> <header class="view-header">
{{#gh-view-title openMobileMenu="openMobileMenu"}} {{#gh-view-title openMobileMenu="openMobileMenu"}}
{{link-to "team" "team"}} {{link-to "Team" "team"}}
<i class="icon-arrow-right"></i> {{user.name}} <i class="icon-arrow-right"></i> {{user.name}}
{{/gh-view-title}} {{/gh-view-title}}
<section class="view-actions"> <section class="view-actions">