5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 19:26:22 +00:00
panel/app/views/devise/registrations/new.haml

62 lines
2.2 KiB
Text
Raw Normal View History

2019-09-11 19:29:05 +00:00
= content_for :body do
- 'black-bg'
2023-03-28 22:18:11 +00:00
= render 'devise/shared/error_messages', resource: resource
2019-07-04 00:11:33 +00:00
.row.align-items-center.justify-content-center.full-height
2023-03-28 20:31:35 +00:00
.col-md-6.align-self-center
2020-02-11 16:56:29 +00:00
%h2= t('.sign_up')
%p= t('.help')
2019-09-11 19:29:05 +00:00
= form_for(resource,
as: resource_name,
url: registration_path(resource_name, params: { locale: params[:locale] })) do |f|
2019-09-11 19:29:05 +00:00
2019-07-04 00:11:33 +00:00
.form-group
2019-09-11 19:29:05 +00:00
= f.label :email, class: 'sr-only'
2019-07-04 00:11:33 +00:00
= f.email_field :email, autofocus: true, autocomplete: 'email',
2019-09-11 19:29:05 +00:00
class: 'form-control',
placeholder: t('activerecord.attributes.usuarie.email')
- password = 'activerecord.attributes.usuarie.password'
2019-07-04 00:11:33 +00:00
.form-group
2019-09-11 19:29:05 +00:00
= f.label :password, class: 'sr-only'
2019-07-04 00:11:33 +00:00
= f.password_field :password, autocomplete: 'new-password',
2019-09-11 19:29:05 +00:00
class: 'form-control', min: @minimum_password_length,
aria: { describedby: 'minimum-password-length' },
placeholder: t(password)
- if @minimum_password_length
%small.text-muted.form-text#minimum-password-length
= t('devise.shared.minimum_password_length',
count: @minimum_password_length)
2019-07-04 00:11:33 +00:00
.form-group
2019-09-11 19:29:05 +00:00
= f.label :password_confirmation, class: 'sr-only'
2019-07-04 00:11:33 +00:00
= f.password_field :password_confirmation,
autocomplete: 'new-password',
2019-09-11 19:29:05 +00:00
class: 'form-control',
min: @minimum_password_length,
aria: { describedby: 'minimum-password-length' },
placeholder: t("#{password}_confirmation")
2023-03-28 20:31:35 +00:00
2023-03-29 18:51:10 +00:00
.form-group
- Usuarie::CONSENT_FIELDS.each do |field|
- required = t(".#{field}.required", default: '').present?
- id = "usuarie_#{field}"
- name = "usuarie[#{field}]"
- content = t(".#{field}.label")
- href = t(".#{field}.href", default: '')
- help_content = t(".#{field}.help")
= render 'bootstrap/custom_checkbox', id: id, name: name, content: content, required: required, value: "1" do
- if href.present?
= link_to help_content, href, target: '_blank', rel: 'noopener'
- else
= help_content
2023-03-28 20:31:35 +00:00
2019-07-04 00:11:33 +00:00
.actions
= f.submit t('.sign_up'),
2019-09-11 19:29:05 +00:00
class: 'btn btn-lg btn-block'
2019-07-04 00:11:33 +00:00
= render 'devise/shared/links'