Skip to content

Commit

Permalink
Lock out email address on signup page
Browse files Browse the repository at this point in the history
refs TryGhost#5653

- disables email field
- pull error message from api response
  • Loading branch information
cobbspur committed Aug 11, 2015
1 parent 0f9f0dd commit 2977f5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/client/app/controllers/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion core/client/app/templates/signup.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{#gh-form-group errors=model.errors property="email"}}
<label for="email-address">Email address</label>
<span class="input-icon icon-mail">
{{gh-input type="email" name="email" placeholder="Eg. [email protected]" 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. [email protected]" class="gh-input" enter=(action "signup") disabled=true autocorrect="off" value=model.email focusOut=(action "validate" "email")}}
</span>
{{gh-error-message errors=model.errors property="email"}}
{{/gh-form-group}}
Expand Down
2 changes: 1 addition & 1 deletion core/client/app/templates/team/user.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class="gh-view">
<header class="view-header">
{{#gh-view-title openMobileMenu="openMobileMenu"}}
{{link-to "team" "team"}}
{{link-to "Team" "team"}}
<i class="icon-arrow-right"></i> {{user.name}}
{{/gh-view-title}}
<section class="view-actions">
Expand Down

0 comments on commit 2977f5a

Please sign in to comment.