DemocracyClub / UK-Polling-Stations

:earth_africa: A website to help people find their UK polling station
https://wheredoivote.co.uk/
BSD 3-Clause "New" or "Revised" License
33 stars 30 forks source link

stops file upload template from showing form if there are no upcoming… #8132

Closed awdem closed 1 month ago

awdem commented 1 month ago

This PR addresses the following issue:

Council users could navigate directly to the file upload form even if there are no upcoming elections according to WDIV by using the upload form url. Admin users could also do this by clicking the upload links on the council list view at /uploads

This PR makes it so the upload form won't appear unless there are upcoming elections, and adds a short message telling the user to get in touch with us if they have data to upload.

Example of new message at uploads/upload_files/ADU: image

coveralls commented 1 month ago

Coverage Status

coverage: 70.912%. remained the same when pulling d630b7ebef6677f53d5a1fcf9ef1e0c2583e2f14 on awdem:fix/no-upcoming-elections-url-hack into 30e60a50939058f43ae57ff0154b0ec8dbb54fe1 on DemocracyClub:master.

chris48s commented 1 month ago

I think this repo actually does run the tests properly for PRs submitted from a fork, but just as a note for next time, can you submit PRs from a branch off the main repo. Ta