diff --git a/ghost/admin/app/templates/setup/two.hbs b/ghost/admin/app/templates/setup/two.hbs index 8b322542e9..504abfc5e1 100644 --- a/ghost/admin/app/templates/setup/two.hbs +++ b/ghost/admin/app/templates/setup/two.hbs @@ -71,21 +71,21 @@ {{gh-profile-image email=email setImage=(action "setImage")}} - {{#gh-form-group errors=errors hasValidated=hasValidated property="email"}} - - - {{inline-svg "email"}} - {{gh-trim-focus-input email + {{#gh-form-group errors=errors hasValidated=hasValidated property="blogTitle"}} + + + {{inline-svg "content"}} + {{gh-trim-focus-input blogTitle tabindex="1" - type="email" - name="email" - placeholder="Eg. john@example.com" + type="text" + name="blog-title" + placeholder="Eg. The Daily Awesome" autocorrect="off" - focusOut=(action "preValidate" "email") - update=(action (mut email)) - data-test-email-input=true}} + focusOut=(action "preValidate" "blogTitle") + update=(action (mut blogTitle)) + data-test-blog-title-input=true}} - {{gh-error-message errors=errors property="email"}} + {{gh-error-message errors=errors property="blogTitle"}} {{/gh-form-group}} {{#gh-form-group errors=errors hasValidated=hasValidated property="name"}} @@ -105,12 +105,29 @@ {{gh-error-message errors=errors property="name"}} {{/gh-form-group}} + {{#gh-form-group errors=errors hasValidated=hasValidated property="email"}} + + + {{inline-svg "email"}} + {{gh-input email + tabindex="3" + type="email" + name="email" + placeholder="Eg. john@example.com" + autocorrect="off" + focusOut=(action "preValidate" "email") + update=(action (mut email)) + data-test-email-input=true}} + + {{gh-error-message errors=errors property="email"}} + {{/gh-form-group}} + {{#gh-form-group errors=errors hasValidated=hasValidated property="password"}} {{inline-svg "lock"}} {{gh-input password - tabindex="3" + tabindex="4" type="password" name="password" placeholder="At least 8 characters" @@ -122,23 +139,6 @@ {{gh-error-message errors=errors property="password"}} {{/gh-form-group}} - {{#gh-form-group errors=errors hasValidated=hasValidated property="blogTitle"}} - - - {{inline-svg "content"}} - {{gh-input blogTitle - tabindex="4" - type="text" - name="blog-title" - placeholder="Eg. The Daily Awesome" - autocorrect="off" - focusOut=(action "preValidate" "blogTitle") - update=(action (mut blogTitle)) - data-test-blog-title-input=true}} - - {{gh-error-message errors=errors property="blogTitle"}} - {{/gh-form-group}} - {{#gh-task-button task=setup type="submit" diff --git a/ghost/admin/tests/acceptance/setup-test.js b/ghost/admin/tests/acceptance/setup-test.js index aa4020c54d..b177aa0b5a 100644 --- a/ghost/admin/tests/acceptance/setup-test.js +++ b/ghost/admin/tests/acceptance/setup-test.js @@ -99,7 +99,7 @@ describe('Acceptance: Setup', function () { // email field is focused by default // NOTE: $('x').is(':focus') doesn't work in phantomjs CLI runner // https://github.com/ariya/phantomjs/issues/10427 - expect(find(testSelector('email-input')).get(0) === document.activeElement, 'email field has focus') + expect(find(testSelector('blog-title-input')).get(0) === document.activeElement, 'blog title has focus') .to.be.true; await click('.gh-btn-green');