shift-org / shift-docs

Shift2Bikes: website and calendar for shift and pedalpalooza
https://shift2bikes.org
Other
22 stars 17 forks source link

Only show Terms section on initial submission #753

Open carrythebanner opened 3 months ago

carrythebanner commented 3 months ago

When you create an event listing, the organizer must agree to the code of conduct and affirm that they've read the ride leader comic. On subsequent requests those terms checkboxes are still shown on the front end, but an organizer can't un-read the comic or revoke their acceptance of the terms.

This changes the add/edit form to only show the Terms section for initial submission. After that (if an id is present, i.e. the event exists), the Terms section is hidden. The fields are still present under the hood as hidden inputs (similar to id and secret fields) so that backend validation can stay the same.

Also, the error messages for the two terms fields were swapped; fixed those as well.