-
-
Notifications
You must be signed in to change notification settings - Fork 3
Add checkbox for showing Trip IDs in operator edit form #220
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3856,6 +3856,7 @@ def operator_edit(request, operator_slug): | |
| operator.region.set(region_ids) | ||
|
|
||
| operator.show_livery_border = request.POST.get('show_livery_border') == 'on' | ||
| operator.show_trip_id = request.POST.get('show_trip_id') == 'on' | ||
|
Comment on lines
3858
to
+3859
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include You now update 🤖 Prompt for AI Agents |
||
|
|
||
| if request.POST.get('group', None) == "": | ||
| group_instance = None | ||
|
|
@@ -7249,4 +7250,4 @@ def boards_api(request, operator_slug): | |
| 'type': board.board_type | ||
| }) | ||
|
|
||
| return JsonResponse({'results': results}) | ||
| return JsonResponse({'results': results}) | ||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 3693
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 593
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 49
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 86
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 297
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 81
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 85
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 15873
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 49
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 2559
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 800
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 148
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 4641
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 4423
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 49
🏁 Script executed:
Repository: NextStopLabs/MyBusTimes
Length of output: 135
Add missing POST handler and fix label association for the checkbox.
The checkbox field won't persist because the view's POST handler is missing the line to save
show_trip_idfrom the form submission. Theshow_livery_bordercheckbox (line 91) has the same missingidattribute issue and is correctly saved withoperator.show_livery_border = request.POST.get('show_livery_border') == 'on', but no equivalent code exists forshow_trip_id.Required fixes
In the template (fleet/templates/edit_operator.html, lines 95-99), add the missing
idattribute:In the POST handler (fleet/views.py, near where
show_livery_borderis set), add:📝 Committable suggestion
🤖 Prompt for AI Agents