diff --git a/app/assets/stylesheets/nvra.scss b/app/assets/stylesheets/nvra.scss index 206c09a06..e5bac405c 100644 --- a/app/assets/stylesheets/nvra.scss +++ b/app/assets/stylesheets/nvra.scss @@ -196,6 +196,7 @@ span.smaller_prompt { h4 { text-transform:uppercase; font-size:.7 * $fs; + line-height: 1.8; a { text-transform:none; } diff --git a/app/controllers/abrs_controller.rb b/app/controllers/abrs_controller.rb index ec697e4e5..dffe4e806 100644 --- a/app/controllers/abrs_controller.rb +++ b/app/controllers/abrs_controller.rb @@ -76,7 +76,7 @@ def state_online_redirect @abr.update_attributes(:finish_with_state=>true) render :html => "".html_safe end - + def update @abr = Abr.find_by_uid(params[:id]) set_up_locale diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index 9afd72426..da37f896e 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -31,7 +31,7 @@ def partner_terms_of_use(partner) @privacy_url = "https://www.rockthevote.org/about-rock-the-vote/privacy-policy/" @partner_signup_url = "https://docs.google.com/forms/d/e/1FAIpQLSck6XJO2SQeSIenDpuHgNBUop9ENtvsGhMWLFYQDsy-VgO8pg/viewform" @partner_tool_faqs = "https://www.rockthevote.org/programs-and-partner-resources/tech-for-civic-engagement/partner-ovr-tool-faqs/partner-ovr-tool-faqs/" - mail(subject: "Rock the Vote Terms of Use", + mail(subject: "Welcome to Rock the Vote", from: RockyConf.from_address, to: partner.email, date: Time.now.to_s(:db)) diff --git a/app/services/v5/state_requirements.rb b/app/services/v5/state_requirements.rb index e6ef40ffc..b058298f5 100644 --- a/app/services/v5/state_requirements.rb +++ b/app/services/v5/state_requirements.rb @@ -35,6 +35,9 @@ def self.find(query) state = find_state(query) locale = get_locale(state, query[:lang]) + # Instantiate StateCustomization with the state object + state_customization = StateCustomization.new(state) + validate_participation(state, locale) validate_age(state, query[:date_of_birth], locale) @@ -51,6 +54,8 @@ def self.find(query) :sos_address => state.registrar_address, :sos_phone => state.registrar_phone, :sos_url => state.registrar_url, + :online_registration_url => state_customization.online_reg_url(nil), + :online_registration_enabled => state_customization.redirect_to_online_reg_url(nil), :sub_18_msg => locale.sub_18 } end diff --git a/app/validators/mi_registrant_validator.rb b/app/validators/mi_registrant_validator.rb index 409e3dcff..ecdd8807b 100644 --- a/app/validators/mi_registrant_validator.rb +++ b/app/validators/mi_registrant_validator.rb @@ -145,7 +145,7 @@ def validate(reg) def validate_age(reg) return if reg.date_of_birth.blank? - earliest_date = Date.today - 17.years - 6.months + earliest_date = Date.today - 16.years if reg.date_of_birth > earliest_date reg.errors.add(:date_of_birth, :too_young) end diff --git a/app/views/abrs/step_2_abr_deadline_passed_general.html.haml b/app/views/abrs/step_2_abr_deadline_passed_general.html.haml index 5755ca95a..b04af1667 100644 --- a/app/views/abrs/step_2_abr_deadline_passed_general.html.haml +++ b/app/views/abrs/step_2_abr_deadline_passed_general.html.haml @@ -19,7 +19,7 @@ - existing_locale = src_url.match(/(\?|&)locale=([^&]*)/)&.captures&.last || I18n.locale - src_url = src_url.gsub(/(\?|&)locale=[^&]*/, '') # Remove any existing locale parameter - src_url += src_url.include?('?') ? "&locale=#{existing_locale}" : "?locale=#{existing_locale}" # Append the new locale - %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:0; padding:0; width:100%;', src: src_url } + %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:40px 0 0 0; padding:0; width:100%;', src: src_url } :javascript document.addEventListener('DOMContentLoaded', function () { diff --git a/app/views/abrs/step_2_abr_everyone_gets_ballot.html.haml b/app/views/abrs/step_2_abr_everyone_gets_ballot.html.haml index 5de765756..dda9d0087 100644 --- a/app/views/abrs/step_2_abr_everyone_gets_ballot.html.haml +++ b/app/views/abrs/step_2_abr_everyone_gets_ballot.html.haml @@ -1,16 +1,22 @@ +-# STATENAME Automatically mails all registered voters a ballot - abbrev = @abr.i18n_key %h2{role: "heading", "aria-level": 2}= t("states.custom.#{abbrev}.abr.everyone_gets_ballot.header_1", state_name: @abr.home_state_name, default:t("txt.abr.everyone_gets_ballot.header_1", state_name: @abr.home_state_name)).html_safe +-# If you are registered to vote in STATE NAME you do not need to request... .state-instructions = t("states.custom.#{abbrev}.abr.everyone_gets_ballot.instructions_1", state_name: @abr.home_state_name, url: new_catalist_lookup_path(partner: @abr.partner_id, email: @abr.email, zip: @abr.zip), default: t("txt.abr.everyone_gets_ballot.instructions_1", state_name: @abr.home_state_name, url: new_catalist_lookup_path(partner: @abr.partner_id, email: @abr.email, zip: @abr.zip))).html_safe -%h2{role: "heading", "aria-level": 2}= t("txt.abr.everyone_gets_ballot.header_2").html_safe +-# questions and next steps +-#%h2{role: "heading", "aria-level": 2}= t("txt.abr.everyone_gets_ballot.header_2").html_safe -.state-instructions - = t("states.custom.#{abbrev}.abr.everyone_gets_ballot.instructions_2", registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)).html_safe +-# custom from state instructions_2 +-#.state-instructions +-# = t("states.custom.#{abbrev}.abr.everyone_gets_ballot.instructions_2", registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)).html_safe -%h2{role: "heading", "aria-level": 2}= t("txt.abr.everyone_gets_ballot.header_3").html_safe +-# Don't Forget to Vote! +-#%h2{role: "heading", "aria-level": 2}= t("txt.abr.everyone_gets_ballot.header_3").html_safe +-# custom from state instructions 3 (deadlines for delivering your ballot) .state-instructions = t("states.custom.#{abbrev}.abr.everyone_gets_ballot.instructions_3").html_safe @@ -20,7 +26,7 @@ #finish_page_iframe - src_url = @abr_finish_iframe_url - src_url = src_url.split('?')[0] # Remove all existing query parameters - %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:0; padding:0; width:100%;', src: src_url } + %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:40px 0 0 0; padding:0; width:100%;', src: src_url } :javascript document.addEventListener('DOMContentLoaded', function () { diff --git a/app/views/abrs/step_2_abr_splash_page_general.html.haml b/app/views/abrs/step_2_abr_splash_page_general.html.haml index 01fe05480..0563d3e4d 100644 --- a/app/views/abrs/step_2_abr_splash_page_general.html.haml +++ b/app/views/abrs/step_2_abr_splash_page_general.html.haml @@ -1,18 +1,43 @@ - abbrev = @abr.i18n_key + %h2{role: "heading", "aria-level": 2, id: "abr_splash_header_1"}= t("txt.abr.splash.header_1", state_name: @abr.home_state_name).html_safe +-# The following header is coming from: +-# = t("txt.abr.splash.header_1", state_name: @abr.home_state_name) .state-instructions - = t("states.custom.#{abbrev}.abr.splash.instructions_1", state_name: @abr.home_state_name, lookup_url: new_catalist_lookup_path(partner: @abr.partner_id, email: @abr.email, zip: @abr.zip), registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)).html_safe + - instructions_1 = t("txt.abr.splash.instructions_1", state_name: @abr.home_state_name, lookup_url: new_catalist_lookup_path(partner: @abr.partner_id, email: @abr.email, zip: @abr.zip), registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) + = instructions_1.html_safe + +- if @abr.home_state_oabr_url.present? + %a{ href: @abr.home_state_oabr_url, style: "word-wrap: break-word; overflow-wrap: break-word; display: inline-block;" }= @abr.home_state_oabr_url +- else + %p No URL available at this time. -%h2{role: "heading", "aria-level": 2, id: "abr_splash_header_2"}= t("txt.abr.splash.header_2").html_safe + +-# The following instructions are coming from: +-# = t("states.custom.#{abbrev}.abr.splash.instructions_1", state_name: @abr.home_state_name, lookup_url: new_catalist_lookup_path(partner: @abr.partner_id, email: @abr.email, zip: @abr.zip), registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) + +-#%h2{role: "heading", "aria-level": 2, id: "abr_splash_header_2"}= t("txt.abr.splash.header_2").html_safe +-# The following header is coming from: +-# = t("txt.abr.splash.header_2") .state-instructions - = t("states.custom.#{abbrev}.abr.splash.instructions_2", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)).html_safe + - instructions_2 = t("states.custom.#{abbrev}.abr.splash.instructions_2", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) + = instructions_2.html_safe +-# The following instructions are coming from: +-# = t("states.custom.#{abbrev}.abr.splash.instructions_2", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) -%h2{role: "heading", "aria-level": 2, id: "abr_splash_header_3"}= t("txt.abr.splash.header_3").html_safe +-# Don't Forget to Vote! +-#%h2{role: "heading", "aria-level": 2, id: "abr_splash_header_3"}= t("txt.abr.splash.header_3").html_safe +-# The following header is coming from: +-# = t("txt.abr.splash.header_3") .state-instructions - = t("states.custom.#{abbrev}.abr.splash.instructions_3", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)).html_safe + - instructions_3 = t("states.custom.#{abbrev}.abr.splash.instructions_3", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) + = instructions_3.html_safe +-# The following instructions are coming from: +-# = t("states.custom.#{abbrev}.abr.splash.instructions_3", state_name: @abr.home_state_name, registration_url: new_registrant_path(partner: @abr.partner, email_address: @abr.email, home_zip_code: @abr.zip)) + -# #finish_page_iframe -# %iframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:0; padding:0; width:100%;', src: @abr_finish_iframe_url } @@ -22,7 +47,7 @@ - existing_locale = src_url.match(/(\?|&)locale=([^&]*)/)&.captures&.last || I18n.locale - src_url = src_url.gsub(/(\?|&)locale=[^&]*/, '') # Remove any existing locale parameter - src_url += src_url.include?('?') ? "&locale=#{existing_locale}" : "?locale=#{existing_locale}" # Append the new locale - %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:0; padding:0; width:100%;', src: src_url } + %iframe#dynamicLocaleIframe{border: '0', height: "575px", "ALLOWTRANSPARENCY": true, frameborder: "no", style: 'border:none !important; margin:40px 0 0 0; padding:0; width:100%;', src: src_url } :javascript document.addEventListener('DOMContentLoaded', function () { diff --git a/app/views/notifier/chaser.html.erb b/app/views/notifier/chaser.html.erb index 7b6703b6f..4f9e7f5b7 100644 --- a/app/views/notifier/chaser.html.erb +++ b/app/views/notifier/chaser.html.erb @@ -10,6 +10,8 @@ :cancel_reminders_url =>@cancel_reminders_url, :registrar_phone=> @registrar_phone, :registrar_url=>@registrar_url, - :rtv_link=>@rtv_link, :locale => @locale + :rtv_link=>@rtv_link, + :rtv_url=>Nokogiri::HTML(@rtv_link).css('a').first['href'], + :locale => @locale ).html_safe %> diff --git a/app/views/notifier/partner_terms_of_use.html.erb b/app/views/notifier/partner_terms_of_use.html.erb index b26e2dfaa..9b0a4e789 100644 --- a/app/views/notifier/partner_terms_of_use.html.erb +++ b/app/views/notifier/partner_terms_of_use.html.erb @@ -1,16 +1,16 @@

Hi <%= @name %>,

-Thank you for signing up for a Rock the Vote civic technology tool! We're so glad to have you join our community of companies, nonprofits, and activists nationwide who use Rock the Vote's platform to register voters. +Thank you for signing up for Rock the Vote's civic technology tools! We're so glad to have you join our community of companies, nonprofits, and activists nationwide who use Rock the Vote's platform to register and mobilize voters.

-Please read Rock the Vote's Terms of Use which outlines important information about our Privacy Policy, restrictions on digital advertising, custom branding, and more. Rock the Vote reserves the right to discontinue access to your tool if there is a breach to our Terms of Use. -

-

-To learn more about how to use your civic technology tools, please read our Partner FAQs. Thank you for your partnership in this important work! If you have any questions, please don't hesitate to reach out. +Our team will reach out soon with information on how to access your tools and Partner Portal. Thank you for your partnership in this important work!

- Rock the Vote

+

+Note: Your civic technology partnership agreement contains important information about our Terms of Use. Rock the Vote reserves the right to discontinue access to your tool if there is a breach to the terms of your agreement. +

\ No newline at end of file diff --git a/app/views/registrants/_race_and_party.html.erb b/app/views/registrants/_race_and_party.html.erb index e4570a2dc..aceba76da 100644 --- a/app/views/registrants/_race_and_party.html.erb +++ b/app/views/registrants/_race_and_party.html.erb @@ -8,7 +8,8 @@ <% end %> -<% if @state_parties && @state_parties.any? %> + +<% if @registrant.home_state_abbrev != "NC" && @state_parties && @state_parties.any? %>