-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/events#56 Allow backend (de)registration changes for sold out price set items, refactor #24639
Closed
larssandergreen
wants to merge
1
commit into
civicrm:master
from
larssandergreen:allow-deregistration
Closed
dev/events#56 Allow backend (de)registration changes for sold out price set items, refactor #24639
larssandergreen
wants to merge
1
commit into
civicrm:master
from
larssandergreen:allow-deregistration
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Standard links)
|
larssandergreen
changed the title
dev/events#56 Allow backend (de)registration changes for sold out price set items
WIP: /events#56 Allow backend (de)registration changes for sold out price set items
Oct 18, 2022
larssandergreen
force-pushed
the
allow-deregistration
branch
4 times, most recently
from
October 28, 2022 03:59
1c2933c
to
d787073
Compare
test this please |
1 similar comment
test this please |
Jenkins re test this please |
@seamuslee001 Looks like it's still giving the same error. |
larssandergreen
force-pushed
the
allow-deregistration
branch
from
October 28, 2022 23:38
d787073
to
8a193ec
Compare
larssandergreen
changed the title
WIP: /events#56 Allow backend (de)registration changes for sold out price set items
dev/events#56 Allow backend (de)registration changes for sold out price set items, refactor
Oct 28, 2022
larssandergreen
force-pushed
the
allow-deregistration
branch
from
October 29, 2022 00:38
977e771
to
8a193ec
Compare
Jenkins re test this please (investigating) |
Thanks @seamuslee001 for whatever you did to get this working. |
larssandergreen
force-pushed
the
allow-deregistration
branch
2 times, most recently
from
December 17, 2022 21:20
6fc5743
to
25ed19c
Compare
larssandergreen
force-pushed
the
allow-deregistration
branch
from
December 17, 2022 21:33
25ed19c
to
e1d996a
Compare
Can one of the admins verify this patch? |
jenkins test this please |
Closing, replaced with #26112 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This replaces #20252, which I cannot re-open — but it now includes some refactoring and even more clean up of styles.
Currently, when editing price set selections for an event registrant, you cannot add or remove sold out items. This PR makes it possible for backend users to add or remove price set selections that are sold out from registrations. It also ensures that all full selections show (Sold out) text, both on the Register Participant form and the Change Selections and Edit Event Registration forms.
It also fixes some inconsistent fonts, margins, spacing, etc in price sets.
Perhaps most importantly, it refactors some of the very repetitive Quickform code for price sets to hopefully make that a little more maintainable (though there still a lot more that could be done).
Before
If a price set selection is sold out, back-end users can add this selection on Events - Register Event Participant, but if they edit a existing registration they cannot either add or subtract from sold out selections as these are disabled/frozen (except for removing select fields, which was possible). Back-end users may add registrants to sold out selections unintentionally, as there is no warning that selections are sold out on the Register Participant Form. Backend users cannot remove registrants from sold out selections, which should clearly be possible. They cannot override price set limits if required to add participants to sold out selections.
Register Participant: Backend user can register participant for sold out selections, they are unmarked
Change Selections: Participant cannot be added or removed from sold out selections
Front end registration, lots of odd styling
After
Backend users can register and deregister participants for any price set selection. All price set selections that are sold out are now marked as sold out.
Register participant: Sold out selections are now marked
Change Selections: Participant can be added to or removed from all selections.
Front end registration, a little more readable and consistent
I've also removed the italics, font size and weight from sold out items so the form is less busy and more consistent, enclosed the none option in a span to match other radio options, and added the light sold out grey colour to all sold out options (except the select options). I removed the double 'Sold out' for text fields and added the missing 'Sold out' on select options. Added space between frozen checkbox and radios and text. Fixed inconsistent font size and spacing for pre and post field help.
Comments
I've moved the great concatenate fest that was building the labels for price set options into a separate function so it isn't repeated four times. I've also aligned the process for Text fields with the process for all the other types by moving this from the tpl to the Price Field BAO, so it can use the same function rather than implementing the same logic in Smarty. This required a small change that is a bit odd to get the label for the text field to the tpl, introducing an auxiliary form element that holds the label that goes after the text field, since the text field has two labels. This is all working around the unfortunate situation where text fields are both price fields and price options at the same time.
I've removed some now unneeded code that set form rules for selects and some other repeated code.
The warning found in the previous PR by @BettyDolfing and @jaapjansma has been fixed in the refactoring (thanks for testing and sorry to have been unable to respond at the time). I'm unable to reproduce the blank preview issue.