impress-org / give-double-the-donation

Integration with Double-the-Donation
GNU General Public License v3.0
0 stars 0 forks source link

Form setting removes the feature when disabled #8

Closed lindseymacmillan closed 3 years ago

lindseymacmillan commented 3 years ago

Resolves #4

Description

This PR fixes a bug which prevented changes in the DtD "Enabled/Disabled" form setting from being reflected on the frontend. Previously, the logic used to render the DtD fields was checking for a boolean, when the meta field is instead stored as a string (enabled or disabled).

Affects

This PR affects logic in the DonationForm class, used to determine whether or not the DtD field should be rendered on the frontend.

Pre-review Checklist

Testing Instructions

  1. Enable the feature on a form and save it. Confirm it shows on the form as intended.
  2. Disable the feature on that same form and save.
  3. View the form and confirm that the Company Matching field no longer appears on the form.