-
Notifications
You must be signed in to change notification settings - Fork 102
Centralize event settings in eventyay-common #716
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
Reviewer's GuideThis PR consolidates general event settings into the eventyay_common component by migrating fields from the Tickets component’s EventSettingsForm to EventCommonSettingsForm, cleaning up duplicate form fields in templates, and improving form safety and error handling. Sequence Diagram: Saving Event Settings via eventyay_commonsequenceDiagram
title Sequence Diagram: Saving Centralized Event Settings
actor User
participant Browser
participant WebServer
participant EventyayCommonView as "eventyay_common.EventSettingsView"
participant EventCommonSettingsForm as "forms.EventCommonSettingsForm"
participant SettingsDB as "Settings Database"
User->>Browser: Modifies settings (e.g., contact_mail, region) and clicks Save
Browser->>WebServer: POST /event/settings (eventyay_common path)
WebServer->>EventyayCommonView: handle_post_request(request)
EventyayCommonView->>EventCommonSettingsForm: __init__(data=request.POST, instance=event_settings)
EventyayCommonView->>EventCommonSettingsForm: is_valid()
alt Form is valid
EventCommonSettingsForm->>EventyayCommonView: True
EventyayCommonView->>EventCommonSettingsForm: save()
EventCommonSettingsForm->>SettingsDB: UPDATE event_settings SET contact_mail, region, etc.
SettingsDB-->>EventCommonSettingsForm: Success
EventCommonSettingsForm-->>EventyayCommonView: Saved settings object
EventyayCommonView-->>Browser: HTTP 302 Redirect / Success Page
Browser-->>User: Displays success message / updated settings
else Form is invalid
EventCommonSettingsForm->>EventyayCommonView: False (with errors)
EventyayCommonView-->>Browser: HTTP 200 Render form with errors
Browser-->>User: Displays form with error messages
end
Class Diagram: Updates to Event Settings FormsclassDiagram
title Class Diagram: Changes to Event Settings Forms
class EventSettingsForm {
-timezone : ChoiceField (removed)
-imprint_url (removed from auto_fields)
-locales (removed from auto_fields)
-locale (removed from auto_fields)
-region (removed from auto_fields)
-contact_mail (removed from auto_fields)
+name_scheme : ChoiceField
+checkout_email_helptext : String
+presale_has_ended_text : String
+show_items_outside_presale_period : Boolean
+display_net_prices : Boolean
+presale_start_show_date : Boolean
+show_quota_left : Boolean
+waiting_list_enabled : Boolean
+max_items_per_order : Integer
+reservation_time : Integer
+show_variations_expanded : Boolean
+hide_sold_out : Boolean
+meta_noindex : Boolean
# ... (other remaining fields and methods)
}
class EventCommonSettingsForm {
+locales : List (existing)
+locale : String (existing)
+region : String (added to auto_fields)
+contact_mail : String (added to auto_fields)
+imprint_url : String (added to auto_fields)
+timezone : ChoiceField (added)
# ... (other existing fields and methods)
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @SxxAq - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@SxxAq thank you for the PR. It works :) however could you please 1) move "Show in List" and "Restrict to specific sales chanels" below the Imprint? and 2) resolve the conflicts here |
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.
@mariobehling show in list moved below imprint URL as requested also restrict to channels removed from common settings which is now only accessible through ticket settings. |
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.
Ok, thanks!
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.
LGTM
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.
-
The UI looks clean. However, for the Geo-coordinates section, please revert to the previous layout where latitude and longitude are displayed on the same line.
-
When I attempt to modify or add new data in any field within the entire Settings menu of eventyay-common or in Settings > General of eventyay-tickets, the changes are not being saved. Instead, I receive a form error stating, "We could not save your changes. See below for details."
@SxxAq Please follow up on this when available:
|
@mariobehling the issue related to changes not being saved is resolved now. also geo-lat changed to previous layout. 2025-06-19.21-11-33.mp4 |
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.
716_pr_error.webm
@SxxAq Could you clarify why I am facing this issue?
this is the default behaviour as of now and the reason is below. its for autocompletion i think. it is making a backend request with the provided string to fetch location suggestions but the url is not being resolved. but the location can be saved after closing the error message. @mariobehling please have a look. i think this should need a separate issue. |
@SxxAq Thanks for pointing this out. Could you help please to remove autocompletion? Will that be sufficient to avoid this? Thank you! |
Fixed. I commented out the particular geo.js file which was making the AJAX request. commented out instead of deleting incase it can be fixed later. |
ref: #699
This PR centralizes general event settings by ensuring they are managed and displayed primarily through the
eventyay_common
component's settings page. It moves the management of certain event settings (likecontact_mail
,imprint_url
,region
) toEventCommonSettingsForm
and cleans up the Tickets component's general settings form (EventSettingsForm
) to avoid duplication.