UoaWDCC / ASPA-EnrollmentForm

6 stars 1 forks source link

Aspa 017/integration of email validation #13

Closed MartinTiangco closed 4 years ago

MartinTiangco commented 4 years ago

Issue: Needed to integrate UI code with email validation from [ASPA-007] Check if they are on the membership list prior to registration.

As a result of the email validation, the behaviour of the UI will need to act differently based on the results.

Solution: The process is as follows:

  1. A JQuery AJAX call is made from to JS to the EnrollmentForm controller method validate().
  2. The controller calls the Verification Model from [ASPA-007] and performs validation of email.
  3. Then, the controller will receive the result and construct a json object.
  4. Depending on the json object message, few UI behaviours will occur:
    • If the user has signed up and paid for membership, show a green tick and allow them to go to the Payment section
    • If the user has signed up but not paid, show a warning telling to pay for the membership first
    • If the user has neither signed up or paid, show a warning telling them to sign up for membership

Additionally, refactoring of code in the enrollmentForm.js file was done as well to improve readability.

Risk area: In the G_Sheet_Interface model, there is a line of code that only works for Windows, and another line that only works for Mac/Linux users.

Reviewed by: Lucas, Will, Jiaru

Sidenote: The Trello task is now identified as [ASPA 018].

lin8231 commented 4 years ago

is it possible to change the loading icon to a png? so that there isn't a slight colour difference between the icon and the background: image