Radio Buttons merge requestshttps://lab.civicrm.org/extensions/radiobuttons/-/merge_requests2024-02-29T21:54:05Zhttps://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/10Fix amounts and visibility2024-02-29T21:54:05ZbgmFix amounts and visibilityOn a Contribution page without a PriceSet, the selector changes in !8 seemed to break that use-case.
Also calls the "pricefieldvisibility" init function, because since dom elements were created, the two extensions kind of step on each o...On a Contribution page without a PriceSet, the selector changes in !8 seemed to break that use-case.
Also calls the "pricefieldvisibility" init function, because since dom elements were created, the two extensions kind of step on each other's feet. It's a hack of a solution, but mostly harmless (requires an update of the pricefieldvisiblity ext).
Main patch by @mmyriam
cc @brienne could you check at a glance if this seems OK to you? We weren't sure where the selector is from, and there are so many combos of CiviCRM contribution forms to support, so we figured may as well support both classes.https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/8Add membership functionality to radiobuttons2024-02-29T21:53:33ZbrienneAdd membership functionality to radiobuttonsOverview
----------------------------------------
Currently, this extension does not allow for styling the amounts options for Membership Price Sets.
Reproduction steps
----------------------------------------
1. install and enable th...Overview
----------------------------------------
Currently, this extension does not allow for styling the amounts options for Membership Price Sets.
Reproduction steps
----------------------------------------
1. install and enable the radiobuttons extension
1. go to **Administer > Custom Data and Screens > Radiobuttons Settings**
1. select **Yes** for the *Enhance the Contribution Page and Event amounts?* field
1. create two Contribution pages, one with a Contribution Price Set (*Amounts* tab), and the other using a Membership Price Set (*Membership* tab).
1. open either the ‘Test-drive’ or ‘Live’ of both Contribution pages and note the difference in the amounts buttons
Before
----------------------------------------
If using a Membership Price Set, the radio button styling is not available for the amounts options.
After
----------------------------------------
Now Membership or Contribution Price Sets can be styled with this extension.
Environment information
----------------------------------------
* __Radiobuttons__: 1.5
* __CiviCRM:__ _Master/5.66.alpha1https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/9Display total amount setting2023-10-24T19:52:02ZbrienneDisplay total amount setting**Overview**
This PR adds functionality by creating a 'Display Total Amount' setting that allows the user to choose if they want that field hidden or not.
**Before**
Radiobuttons hides the 'Total Amount' field by default, without the ...**Overview**
This PR adds functionality by creating a 'Display Total Amount' setting that allows the user to choose if they want that field hidden or not.
**Before**
Radiobuttons hides the 'Total Amount' field by default, without the option of users choosing to show/hide the field.
**After**
Now, users will be able to select 'Yes' or 'No' for whether or not the total amount is displayed.
**Considerations**
* This setting is created with a default of 'No', so as not to break existing users' experience. Instead it is something that they can opt in to displaying.
* The condition that currently hides the total amount field is maintained, this setting is an additional check for hiding the field.
* Since Pricesetvisibility also hides the Total Amount field, I've created a [PR](https://lab.civicrm.org/extensions/pricesetvisibility/-/merge_requests/5) that does the same thing as this one on that extension. However, this new setting on Radiobuttons overrides the same setting on Pricesetvisibility if both extensions are enabled.
* As such, does it makes sense to have the same functionality in two different extensions, or should determining whether the 'Total Amount' field is displayed be handled by only one of the two?https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/5Remove (some) important flags2023-09-21T19:20:22ZbrienneRemove (some) important flagsOverview
----------------------------------------
There are many `!important` flags within radiobuttons.css that were necessary when using the Shoreditch CiviCRM theme, however, with the advent
of the [Island](https://lab.civicrm.org/ex...Overview
----------------------------------------
There are many `!important` flags within radiobuttons.css that were necessary when using the Shoreditch CiviCRM theme, however, with the advent
of the [Island](https://lab.civicrm.org/extensions/theisland) theme, which is a forked version of Shoreditch, these `!important` flags are no longer needed to provide the same styling.
Before
----------------------------------------
Prior to the Island extension, the `!important` flags were needed for the desired default styling of this extension, however, the use of these flags made it nearly impossible to customize this styling in another extension if desired by a client/user.
After
----------------------------------------
With the removal of `!important` flags, these default styles are still applied, however, developers can also more easily change the styling with more specific selectors if the client desires.https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/4Convert elements later, fixes CRM.radiobuttonsFormRadiosAsButtons is not a fu...2022-12-03T12:59:41ZJonGoldConvert elements later, fixes CRM.radiobuttonsFormRadiosAsButtons is not a functionThis extension stopped working for me recently-ish but I'm not sure when. On both my sites I use this, I now get:
```
Uncaught TypeError: CRM.radiobuttonsFormRadiosAsButtons is not a function
```
I'm guessing something's changed and th...This extension stopped working for me recently-ish but I'm not sure when. On both my sites I use this, I now get:
```
Uncaught TypeError: CRM.radiobuttonsFormRadiosAsButtons is not a function
```
I'm guessing something's changed and the order that `Civi::resource()` resources load has changed, or at least is non-deterministic - and we're running the function before it's loaded.
By explicitly running the function later, this problem goes away for me.https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/2update radiobuttons.civix.php file2022-11-10T20:44:10Zjamieupdate radiobuttons.civix.php fileTo avoid php 7.4 deprecation warnings.To avoid php 7.4 deprecation warnings.https://lab.civicrm.org/extensions/radiobuttons/-/merge_requests/1more flexible class selection2022-11-10T20:41:07Zjamiemore flexible class selectionCurrently `radiobuttons_convert_element` only works if the radio element
being replaced has only the class "content" assigned to it, because that
value is hard-coded into the javascript file. By adding a new option, we
can enable other r...Currently `radiobuttons_convert_element` only works if the radio element
being replaced has only the class "content" assigned to it, because that
value is hard-coded into the javascript file. By adding a new option, we
can enable other radio elements (such as pricesets, which have
"contribution_amount-content" specified as an additional class). Without
this change, the extension can still replace the radio element with
buttons but the feature that indicates that an option is selected (and
changes the background color) never matches.