MathSoc / mathsoc-website

A 2022-24 redevelopment of the University of Waterloo Math Society's website.
11 stars 3 forks source link

volunteer apps emails and validation 2 #195

Closed alexandrawang1 closed 1 year ago

alexandrawang1 commented 1 year ago

Issue 161

This PR sends an email to the appropriate MathSoc executive when someone submits a volunteer application, using all of the information in the form. It also validates all of the form fields and email sender. Typos in the volunteer.json were fixed.

alexandrawang1 commented 1 year ago

The built-in form validation allows whitespace to be sent, which causes the controller to fail. There is also not currently much protection against a user modifying the query parameters and potentially sending emails to non-execs. These issues will be handled in a future PR.

Currently, the way for a dev to turn off applications to a certain role is only to comment out the link in the JSON file. It may be easier to have another boolean property for each role in the JSON called "open", for example, and modify the collapsible to check for it.