2016-10-21 11:34:19 -04:00
|
|
|
<h1><%= t 'finish_installation.register.title' %></h1>
|
2016-10-18 11:44:25 -04:00
|
|
|
|
|
|
|
<%- if @allowed_emails.present? %>
|
2022-08-03 21:49:21 -04:00
|
|
|
<%= form_tag(finish_installation_register_path, class:"wizard-container__fields") do %>
|
2016-10-18 11:44:25 -04:00
|
|
|
|
2022-08-03 21:49:21 -04:00
|
|
|
<div class='wizard-container__input wizard-container__field text-field'>
|
2016-10-18 11:44:25 -04:00
|
|
|
<label for="email">
|
2022-08-03 21:49:21 -04:00
|
|
|
<span class="wizard-container__label"><%= t 'js.user.email.title' %></span>
|
2016-10-18 11:44:25 -04:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class='input-area'>
|
2017-08-03 05:36:13 -04:00
|
|
|
<!--email_off-->
|
2022-08-03 21:49:21 -04:00
|
|
|
<%= select_tag :email, options_for_select(@allowed_emails, selected: params[:email]), class: 'combobox wizard-container__combobox' %>
|
2017-08-03 05:36:13 -04:00
|
|
|
<!--/email_off-->
|
2016-10-18 11:44:25 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-08-03 21:49:21 -04:00
|
|
|
<div class='wizard-container__input wizard-container__field text-field <% if @user.errors[:username].present? %>invalid<% end %>'>
|
2016-10-18 11:44:25 -04:00
|
|
|
<label for="username">
|
2022-08-03 21:49:21 -04:00
|
|
|
<span class="wizard-container__label"><%= t 'js.user.username.title' %></span>
|
2016-10-18 11:44:25 -04:00
|
|
|
</label>
|
|
|
|
|
2022-07-26 21:23:01 -04:00
|
|
|
<div class='wizard-container__description'><%= t 'js.user.username.instructions' %></div>
|
2016-10-18 11:44:25 -04:00
|
|
|
|
|
|
|
<div class='input-area'>
|
2022-08-03 21:49:21 -04:00
|
|
|
<%= text_field_tag(:username, params[:username], class:"wizard-container__text-input") %>
|
2016-10-18 11:44:25 -04:00
|
|
|
</div>
|
|
|
|
<%- @user.errors[:username].each do |e| %>
|
|
|
|
<div class='field-error-description'><%= e.to_s %></div>
|
|
|
|
<%- end %>
|
|
|
|
</div>
|
|
|
|
|
2022-08-03 21:49:21 -04:00
|
|
|
<div class='wizard-container__input wizard-container__field text-field <% if @user.errors[:username].present? %>invalid<% end %>'>
|
2016-10-18 11:44:25 -04:00
|
|
|
<label for="password">
|
2022-08-03 21:49:21 -04:00
|
|
|
<span class="wizard-container__label"><%= t 'js.user.password.title' %></span>
|
2016-10-18 11:44:25 -04:00
|
|
|
</label>
|
|
|
|
|
2022-07-26 21:23:01 -04:00
|
|
|
<div class='wizard-container__description'><%= t 'js.user.password.instructions', count: SiteSetting.min_admin_password_length %></div>
|
2016-10-18 11:44:25 -04:00
|
|
|
|
|
|
|
<div class='input-area'>
|
2022-08-03 21:49:21 -04:00
|
|
|
<%= password_field_tag(:password, params[:password], class:"wizard-container__text-input") %>
|
2016-10-18 11:44:25 -04:00
|
|
|
</div>
|
|
|
|
<% @user.errors[:password].each do |e| %>
|
|
|
|
<div class='field-error-description'><%= e.to_s %></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2022-07-26 21:23:01 -04:00
|
|
|
<%= submit_tag(t('finish_installation.register.button'), class: 'wizard-container__button primary') %>
|
2016-10-18 11:44:25 -04:00
|
|
|
|
|
|
|
<%- end %>
|
|
|
|
<%- else -%>
|
2016-10-21 11:34:19 -04:00
|
|
|
<p><%= raw(t 'finish_installation.register.no_emails') %></p>
|
2016-10-18 11:44:25 -04:00
|
|
|
<%- end %>
|