ensl.org/app/views/users/new.html.erb

75 lines
3 KiB
Text
Raw Normal View History

<div id="registration">
<h1>Registration</h1>
<% if session[:verified_steamid] %>
<div class="horizontal fields">
Your SteamID (<strong><%= session[:verified_steamid] %></strong>) does not have an existing account. You can easily finish creating Steam-linked account here.
Before doing so, please check you do not already have an account. If you do, click here and type username and password below. You can look
look for your account <%= link_to "here", users_path, target: "_blank" %>.
</div>
<%= form_tag(users_login_path(), { class: 'square' }) do %>
<div class="horizontal fields ">
<%= text_field "login", "username", placeholder: "Username" %>
<%= password_field "login", "password", placeholder: "Password" %>
2020-04-10 15:32:18 +00:00
</div>
<div class="buttons">
<%= submit_tag t('helpers.submit.user.login'), class: "button" %>
</div>
<% end %>
<% end %>
<%= form_for @user, html: { class: "square" } do |f| %>
<%= render 'shared/errors', messages: @user.errors.full_messages %>
<% unless session[:verified_steamid] %>
<div class="horizontal fields">
<%= link_to "Create your account via Steam", "/auth/steam", method: :POST %>
2020-04-10 15:32:18 +00:00
</div>
<% end %>
<div class="horizontal fields">
<%= f.label :username %>
<%= f.text_field :username %>
</div>
<div class="horizontal fields">
Pick unique nickname for yourself.
</div>
<% unless session[:verified_steamid] %>
<div class="horizontal fields">
<%= f.label :raw_password, "Password" %>
<%= f.password_field :raw_password %>
</div>
<div class="horizontal fields">
2020-04-10 15:32:18 +00:00
Please don't use same password as any important place.
</div>
<% end %>
<div class="horizontal fields">
<%= f.label :email %>
<%= f.text_field :email %>
</div>
<div class="horizontal fields">
The email is needed to reset password, verify identity and send account related emails. We don't send spam or give your email to third parties. By default the email is private and only seen by admins.
</div>
<div class="horizontal fields">
<%= f.label :steamid %>
<%= f.text_field :steamid, placeholder: "0:1:23456789" %>
</div>
<% unless session[:verified_steamid] %>
<div class="horizontal fields">
2020-04-10 15:32:18 +00:00
You can use <%= link_to "this tool", steamid_tool %> or
<%= link_to "this web page", 'https://steamidfinder.com/' %>
to find your SteamID. We need the steam id to identify unique players. If you use fake one, some things on website might be broken.
</div>
<% end %>
<div class="horizontal fields">
<%= f.label :birthdate %>
<%= date_select :user, :birthdate, order: [:year, :month, :day], start_year: 1950, include_blank: true, default: nil %>
</div>
<div class="horizontal fields">
Only needed for fun stats (age etc.). Leave blank if you don't want to give one.
</div>
<div class="controls submit-field">
<%= f.submit "Register" %>
</div>
<% end %>
</div>