akkounts/app/views/signup/steps.html.erb
2020-12-03 14:47:57 +01:00

62 lines
1.8 KiB
Plaintext

<% case @step %>
<% when 1 %>
<h2>Choose a username</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<div class="field">
<p>
<%= f.label :cn, 'Username' %><br />
<%= f.text_field :cn, autofocus: true, autocomplete: "username" %>
<span class="at-sign">@</span>
<span class="domain">kosmos.org</span>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Username <%= @validation_error %></p>
<% end %>
</div>
<div class="actions">
<p><%= f.submit "Continue" %></p>
</div>
<% end %>
<% when 2 %>
<h2>What's your email?</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<div class="field">
<p>
<%= f.label :email, 'Email address' %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Email <%= @validation_error %></p>
<% end %>
</div>
<div class="actions">
<p><%= f.submit "Continue" %></p>
</div>
<% end %>
<% when 3 %>
<h2>Choose a password</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<div class="field">
<p>
<%= f.label :password, 'Password' %><br />
<%= f.password_field :password, autofocus: true %>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Password <%= @validation_error %></p>
<% end %>
</div>
<p class="accept-terms">
<small>
By clicking the button below, you accept our future Terms of Service
and Privacy Policy. Don't worry, they will be excellent!
</small>
</p>
<div class="actions">
<p><%= f.submit "Create account" %></p>
</div>
<% end %>
<% end %>