mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 10:41:41 +00:00
feat: pedir consentimiento #12795
This commit is contained in:
parent
69c5d8d7bb
commit
87d51e8856
4 changed files with 60 additions and 1 deletions
6
app/views/bootstrap/_custom_checkbox.haml
Normal file
6
app/views/bootstrap/_custom_checkbox.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- help_id = "#{id}_help"
|
||||
|
||||
.custom-control.custom-checkbox
|
||||
%input.custom-control-input{ id: id, type: 'checkbox', name: name, value: value, required: required }
|
||||
%label.custom-control-label{ for: id, aria: { describedby: help_id } }= content
|
||||
%small.form-text.text-muted{ id: help_id }= yield
|
|
@ -4,7 +4,7 @@
|
|||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
.col-md-6.align-self-center
|
||||
%h2= t('.sign_up')
|
||||
%p= t('.help')
|
||||
|
||||
|
@ -39,6 +39,22 @@
|
|||
min: @minimum_password_length,
|
||||
aria: { describedby: 'minimum-password-length' },
|
||||
placeholder: t("#{password}_confirmation")
|
||||
|
||||
- if params[:consent]
|
||||
.form-group
|
||||
- %i[privacy_policy_accepted terms_of_service_accepted code_of_conduct_accepted available_for_feedback_accepted].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
|
||||
|
||||
.actions
|
||||
= f.submit t('.sign_up'),
|
||||
class: 'btn btn-lg btn-block'
|
||||
|
|
|
@ -104,6 +104,25 @@ en:
|
|||
new:
|
||||
sign_up: Sign up
|
||||
help: We only ask for an e-mail address and a password. The password is safely stored, no one else besides you knows it! You'll also receive an e-mail to confirm your account.
|
||||
privacy_policy_accepted:
|
||||
label: "I know about Sutty's privacy policy"
|
||||
help: "Read privacy policy"
|
||||
href: "https://sutty.nl/en/privacy-policy/"
|
||||
required: true
|
||||
terms_of_service_accepted:
|
||||
label: "My sites won't promote hate towards minorities"
|
||||
help: "Read terms of service"
|
||||
href: "https://sutty.nl/en/terms-of-service/"
|
||||
required: true
|
||||
code_of_conduct_accepted:
|
||||
label: "My sites are inclusive spaces"
|
||||
help: "Read codes for sharing"
|
||||
href: "https://sutty.nl/en/code-of-conduct/"
|
||||
required: true
|
||||
available_for_feedback_accepted:
|
||||
label: "I'm available to provide feedback"
|
||||
help: "We may contact you occasionaly"
|
||||
required: false
|
||||
signed_up: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
||||
signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated.
|
||||
signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked.
|
||||
|
|
|
@ -104,6 +104,24 @@ es:
|
|||
new:
|
||||
sign_up: Registrarme
|
||||
help: Para registrarte solo pedimos una dirección de correo y una contraseña. La contraseña se almacena de forma segura, ¡nadie más que vos la sabe! Recibirás un correo de confirmación de cuenta.
|
||||
privacy_policy_accepted:
|
||||
label: "Conozco la política de privacidad de Sutty"
|
||||
help: "Leer política de privacidad"
|
||||
href: "https://sutty.nl/politica-de-privacidad/"
|
||||
required: "true"
|
||||
terms_of_service_accepted:
|
||||
label: "Mis sitios no promueven el odio a minorías"
|
||||
help: "Leer términos de servicio"
|
||||
href: "https://sutty.nl/terminos-de-servicio/"
|
||||
required: "true"
|
||||
code_of_conduct_accepted:
|
||||
label: "Mis sitios son espacios inclusivos"
|
||||
help: "Leer códigos para compartir"
|
||||
href: "https://sutty.nl/codigo-de-convivencia/"
|
||||
required: "true"
|
||||
available_for_feedback_accepted:
|
||||
label: "Estoy disponible para ofrecer retroalimentación"
|
||||
help: "Te contactaremos ocasionalmente"
|
||||
signed_up: "Hemos enviado un mensaje con un enlace de confirmación a tu correo electrónico. Por favor, abrí el enlace para terminar de activar tu cuenta."
|
||||
signed_up_but_inactive: Tu cuenta ha sido creada correctamente. Sin embargo, no hemos podido iniciar la sesión porque tu cuenta aún no está activada.
|
||||
signed_up_but_locked: Tu cuenta ha sido creada correctamente. Sin embargo, no hemos podido iniciar la sesión porque que tu cuenta está bloqueada.
|
||||
|
|
Loading…
Reference in a new issue