akkounts/app/views/signup/steps.html.erb
Sebastian Kippe f36f6866a7
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Port signup to new layout
2022-02-23 18:07:54 -06:00

61 lines
2.1 KiB
Plaintext

<%= render HeaderCompactComponent.new(title: "Signup") %>
<%= render MainCompactComponent.new do %>
<% case @step %>
<% when 1 %>
<h2>Choose a username</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<p>
<%= f.label :cn, 'Username', class: 'hidden' %>
<%= f.text_field :cn, autofocus: true, autocomplete: "username",
class: 'text-xl w-full md:w-3/5 mb-1' %>
<span class="text-base md:text-xl text-gray-500 ml-1">@</span>
<span class="text-base md:text-xl text-gray-500">kosmos.org</span>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Username <%= @validation_error %></p>
<% end %>
<p class="mt-12">
<%= f.submit "Continue", class: 'btn btn-md btn-blue' %>
</p>
<% end %>
<% when 2 %>
<h2>What's your email?</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<p>
<%= f.label :email, 'Email address', class: 'hidden' %>
<%= f.email_field :email, autofocus: true, autocomplete: 'email',
class: 'text-xl w-full' %>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Email <%= @validation_error %></p>
<% end %>
<p class="mt-12">
<%= f.submit "Continue", class: 'btn btn-md btn-blue' %>
</p>
<% end %>
<% when 3 %>
<h2>Choose a password</h2>
<%= form_for @user, :url => signup_validate_url do |f| %>
<p>
<%= f.label :password, 'Password', class: 'hidden' %>
<%= f.password_field :password, autofocus: true,
class: 'text-xl w-full' %>
</p>
<% if @validation_error.present? %>
<p class="error-msg">Password <%= @validation_error %></p>
<% end %>
<p class="mt-8 text-sm text-gray-500">
By clicking the button below, you accept our future Terms of Service
and Privacy Policy. Don't worry, they will be excellent!
</p>
<p class="mt-8">
<%= f.submit "Create account", class: 'btn-md btn-blue' %>
</p>
<% end %>
<% end %>
<% end %>