mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Lock out email address on signup page
refs #5653 - disables email field - pull error message from api response
This commit is contained in:
parent
27122091b5
commit
04130cf8c1
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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}}
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user