-
Notifications
You must be signed in to change notification settings - Fork 13
Added a Location field for every single event listing #1546
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
base: development
Are you sure you want to change the base?
Conversation
…Team/celts into locationFieldChange
…Team/celts into locationFieldChange
…he user selects multimodal offer.
…Team/celts into locationFieldChange
…Team/celts into locationFieldChange
|
When we save an occurrence without inputting a location, it still saves, although there is that red star that indicates that the location input is compulsory. The user should not be able to save when the location field is empty |
|
When we save an event that repeats weekly for 1 month for instance, the location fields remain undefined even though we inputted a location while creating the weekly event. We should have that location appearing on each of the weekly events (or have the option to select different locations too, I guess?) |
… in the table and not as undefined.
app/controllers/admin/routes.py
Outdated
| @admin_bp.route('/eventTemplates') | ||
| def templateSelect(): | ||
| if g.current_user.isCeltsAdmin or g.current_user.isCeltsStudentStaff: | ||
| if g.current_user.isCeltsAdmin or g.current_user.isCeltsStudentStaff or g.current_user.isStudent: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we should let students access this page to create new events? Just checking because I don't know if that's a new thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. We actually spoke with Dr. Heggen and confirmed that it should remain this way. The reasoning is that if it's the same session occurring at the same time and on the same date, but in different locations, while possible, it defeats the purpose of having a single, coherent event. At that point, users likely wouldn’t be going to the website to look up which location to attend, especially in a worst-case scenario.
app/static/js/createEvents.js
Outdated
| function setViewForSingleOffering(){ | ||
| $(".startDatePicker").prop('required', true); | ||
| $("#multipleOfferingTableDiv").addClass('d-none'); | ||
| $("#eventLocation-main").removeClass('d-none'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it was initially my idea to use removeClass() and addClass(), but Brian later said that we should try to use .hide() and .show(). So I would recommend using them here if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! We updated the code to use .show() and .hide() instead of .addClass('d-none') / .removeClass('d-none') as recommended. However, we noticed that in some cases, especially with elements like #multipleOfferingTableDiv, replacing class toggling with .show()/.hide() caused the table to not appear and broke the expected functionality.
To resolve this, we’re now using a combination of .hide()/.show() and .addClass('d-none')/.removeClass('d-none') where necessary to ensure everything works as intended.
app/static/js/createEvents.js
Outdated
| $(".startDatePicker").prop('required', false); | ||
| $("#multipleOfferingTableDiv").removeClass('d-none'); | ||
| $("#eventLocation-main").addClass('d-none'); | ||
| $("#inputEventLocation-main").prop('required', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!!
…removeClass() and addClass(), and changed the message for flash
39e2505 to
a23aa23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
…Team/celts into locationFieldChange
…Team/celts into locationFieldChange
…twareDevTeam/celts into locationFieldChange
…twareDevTeam/celts into locationFieldChange
…twareDevTeam/celts into locationFieldChange
…Team/celts into locationFieldChange
…twareDevTeam/celts into locationFieldChange




Issue Description
Fixes #1540
Changes
Testing
-Try entering different locations for each event and save.
BEFORE
In the modal when we click on 'Add Occurrence', we don't see a textbox for Event Location and then the Location textbox still appears outside the modal.
There's no Event Location in this modal too when we click on 'This series repeats weekly'
There's no session name like session 1, session 2..... when we click on 'Add Occurrence'
AFTER