mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
60 lines
2.1 KiB
Plaintext
60 lines
2.1 KiB
Plaintext
<div class="new_user">
|
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "new_user_form" }) do |f| %>
|
|
<h2><%= t('common.forms.auth.sign_up') %></h2>
|
|
|
|
<%= render "devise/shared/error_messages", resource: resource %>
|
|
|
|
<% if Current.tenant.tenant_setting.email_registration_policy != "none_allowed" || (params[:email].present? && params[:invitation_token].present?) %>
|
|
<div class="form-group">
|
|
<%= f.label :full_name, class: "sr-only" %>
|
|
<%= f.text_field :full_name,
|
|
placeholder: t('common.forms.auth.full_name'),
|
|
required: true,
|
|
class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.label :email, class: "sr-only" %>
|
|
<%= f.email_field :email,
|
|
autocomplete: "email",
|
|
placeholder: t('common.forms.auth.email'),
|
|
required: true,
|
|
class: "form-control",
|
|
value: params[:email],
|
|
readonly: params[:email].present?,
|
|
tabindex: (params[:email].present? ? -1 : nil) %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.label :password, class: "sr-only" %>
|
|
<%= f.password_field :password,
|
|
placeholder: t('common.forms.auth.password'),
|
|
required: true,
|
|
class: "form-control" %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= f.label :password_confirmation, class: "sr-only" %>
|
|
<%= f.password_field :password_confirmation,
|
|
placeholder: t('common.forms.auth.password_confirmation'),
|
|
required: true,
|
|
class: "form-control" %>
|
|
</div>
|
|
|
|
<% if params[:invitation_token].present? %>
|
|
<%= f.hidden_field :invitation_token, value: params[:invitation_token] %>
|
|
<% end %>
|
|
|
|
<div class="actions">
|
|
<%= f.submit t('common.forms.auth.sign_up'), class: "btnPrimary btn-block" %>
|
|
</div>
|
|
<% else %>
|
|
<p><%= t('common.forms.auth.email_registration_not_allowed') %></p>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= render "devise/shared/o_auths", is_sign_up: true %>
|
|
</div>
|
|
|
|
<%= render "devise/shared/links" %>
|