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

Volunteer forms: add 18+ declarations & make various fixes #13643

Merged
merged 3 commits into from Mar 9, 2017

Conversation

breville
Copy link
Member

@breville breville commented Mar 7, 2017

  • Emailing a volunteer after finding them at /volunteer/local now asks the teacher to declare they're 18+.
  • Signing up as a volunteer at /volunteer now asks the volunteer to declare they're 18+.
  • Server-side verification is done on each of these, since Safari doesn't support the required attribute. (See https://www.w3schools.com/tags/att_input_required.asp. It seems that other browsers' support for this feature was masking some logic we needed to implement.)
  • Server-side verification also added for the checkbox for /volunteer/local before sending an email.
  • Changed some instances of checkboxes followed by labels so that the entire label is clickable too.
  • Changed a couple places to make clickable links show appropriate link cursor.
  • Fixed field naming on /volunteer/local so that missing teacher name/email now highlight when not entered.
  • Adjusted auto-scrolling in /volunteer so to scroll to form so that error message stays in view.
  • Adjusted error display in /volunteer/local to fade in error fresh each time submission is attempted. (Otherwise it wasn't clear anything had happened.)

For volunteers

screenshot 2017-03-08 16 35 22

For contacting a volunteer

screenshot 2017-03-08 16 43 14

@@ -19,6 +19,7 @@ def self.normalize(data)
result[:skype_s] = nil_if_empty stripped data[:skype_s]
result[:helpouts_s] = nil_if_empty stripped data[:helpouts_s]

result[:age_18_plus_b] = required data[:age_18_plus_b]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added for completeness although this code does not appear to be called, due to the override in volunteer_engineer_submission_2015.rb

%label{style: 'font-weight: normal;', for: 'volunteer-age-18-plus'}
%input#volunteer-age-18-plus{name: 'age_18_plus_b', type: 'checkbox', value: '1', required: true, checked: true}
= "I certify that I am at least 18 years old." # I18n.t(:volunteer_engineer_submission_checkbox_age_18_plus)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the plan to put this in the en.yml so it can be translated later?

Copy link
Member Author

@breville breville Mar 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops yes, updating now. It will come from the i18n gsheet.

.help-choice {
font-family: 'Gotham 4r', sans-serif;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this CSS outside of this file, especially as it contains none yet.

@ashercodeorg
Copy link
Contributor

Do we have any concerns about making the 18+ a required choice (from a UX perspective)? Might it be better to allow the user to submit with or without it, taking them to a "thanks but no thanks" page if unselected?

@tanyaparker
Copy link
Contributor

I would prefer that we make it required. I think it's misleading if they're able to submit the form and go to another page. There's no guarantee they'll read what's on the next page and they may believe that they successfully signed up.

@ashercodeorg
Copy link
Contributor

And I think it is bad UX if we require a checkbox that the user may not be able to (honestly) check. That said, since most of volunteers should be 18+, I won't block this.

Copy link
Contributor

@tanyaparker tanyaparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📷 ?

@breville breville merged commit 4476f2c into staging Mar 9, 2017
@breville breville deleted the volunteer-form-age-and-fixes branch March 9, 2017 01:02
breville added a commit that referenced this pull request Apr 24, 2017
Change #13643 added support for a new field that declares that the volunteer is 18+.  This caused an issue for the user experience in which a volunteer would attempt to unsubscribe at /volunteer/engineer/edit/[secret].  Attempting to unsubscribe would give an error, internally this was because the form wanted to know that the user was 18+.

This solution detects users who have not yet declared themselves as 18+ when showing the unsubscribe UI, and shows a checkbox for them.  If they attempt to submit the unsubscribe form without this checked, they will get a specific error message.

The unsubscribe form itself continue to not require an unsubscribe radio button to be checked, at least on the server-side processing of the form, and if no item is selected, then we write null to the database for their unsubscribe choice.  This has an odd side effect of allowing users to submit their 18+ status via the unbsubscribe form without actually unsubscribing, but we've deemed this okay.

The regular error message for this form now has a clickable link to open a support ticket.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants