Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GDPR checkbox to finish_sign_up form if necessary #24997

Merged
merged 1 commit into from Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -7,7 +7,7 @@ import getScriptData from '@cdo/apps/util/getScriptData';

const TEACHER_ONLY_FIELDS = ["#teacher-name-label", "#school-info-inputs", "#email-preference-dropdown", "#printable-terms-of-service"];
const STUDENT_ONLY_FIELDS = ["#student-name-label", "#age-dropdown", "#student-consent"];
const SHARED_FIELDS = ["#name-field", "#gender-dropdown", "#terms-of-service", "#submit"];
const SHARED_FIELDS = ["#name-field", "#gender-dropdown", "#terms-of-service", "#data_transfer_agreement_accepted", "#submit"];
const ALL_FIELDS = [...TEACHER_ONLY_FIELDS, ...STUDENT_ONLY_FIELDS, ...SHARED_FIELDS];

// Values loaded from scriptData are always initial values, not the latest
Expand Down
2 changes: 1 addition & 1 deletion dashboard/app/assets/stylesheets/application.scss
Expand Up @@ -1659,7 +1659,7 @@ a.download-video {
border: 1px solid $school-info-border-color;
}
}
#terms-of-service {
.checkbox {
display: flex;
padding-top: 20px;
padding-bottom: 20px;
Expand Down
Expand Up @@ -58,7 +58,7 @@
%h1.custom-h1= t('terms_interstitial.privacy_notice')
= render partial: 'home/privacy_notice'

#terms-of-service{style: "display: none;"}
#terms-of-service.checkbox{style: "display: none;"}
= f.check_box :terms_of_service_version, {}, User::TERMS_OF_SERVICE_VERSIONS.last
= f.label :terms_of_service_version do
= t('terms_interstitial.accept_label', tos_url: CDO.code_org_url('/tos'), privacy_url: CDO.code_org_url('/privacy')).html_safe
Expand All @@ -71,6 +71,14 @@
= link_to t('signup_form.email_preference_privacy'), CDO.code_org_url('/privacy'), target: '_blank'
= f.select :email_preference_opt_in, email_preference_options, include_blank: true

-# If GDPR applies, show an additional checkbox.
- if request.gdpr? || request.params['force_in_eu']
#data_transfer_agreement_accepted.checkbox
= f.check_box :data_transfer_agreement_accepted
= f.label :data_transfer_agreement_accepted do
= t('signup_form.agree_us_website')
= t('signup_form.my_data_to_us')

%button#submit{style: "display: none;"}
= t('signup_form.submit')

Expand Down