Ghost/ghost/admin/templates/signup.hbs
Felix Rieseberg 2712bb6828 Autofocus on input fields after routing
closes #3538, closes #3541
- The “autofocus” property isn’t considered by browsers if the element
is created after the page has been loaded. The Ember cookbook
recommends extending the input type with a manually triggered
autofocus, which I included here.
- This introduces the new helper “gh-focus-input”, an input field
gaining focus even when routing occurs.
2014-08-03 09:16:13 -07:00

34 lines
1.6 KiB
Handlebars

<section class="setup-box js-signup-box fade-in">
<div class="vertical">
<form id="signup" class="setup-form" method="post" novalidate="novalidate">
{{!-- Horrible hack to prevent Chrome from incorrectly auto-filling inputs --}}
<input style="display:none;" type="text" name="fakeusernameremembered"/>
<input style="display:none;" type="password" name="fakepasswordremembered"/>
<header>
<h1>Welcome to Ghost</h1>
<h2>Create your account to start publishing</h2>
</header>
<div class="form-group">
<label for="email">Email Address</label>
{{input type="email" name="email" autocorrect="off" value=email }}
<p>Used for important notifications</p>
</div>
<div class="form-group">
<label for="name">Full Name</label>
{{gh-trim-focus-input type="text" name="name" autofocus="autofocus" autocorrect="off" value=name }}
<p>The name that you will sign your posts with</p>
</div>
<div class="form-group">
<label for="password">Password</label>
{{input type="password" name="password" autofocus="autofocus" autocorrect="off" value=password }}
<p>Must be at least 8 characters</p>
</div>
<footer>
<button type="submit" class="button-add large" {{action "signup"}} {{bind-attr disabled=submitting}}>Create Account</button>
</footer>
</form>
</div>
</section>