Commit graph

59 commits

Author SHA1 Message Date
Kelly Dwan fd86d4bbe5
Pledge form: Fix spacing on confirmation email message 2024-09-02 12:09:12 -04:00
Kelly Dwan cbabdbb33e
Theme: Add blocks and block binding for pledge details
See #276
2024-08-28 17:34:34 -04:00
Kelly Dwan 4ef41983af
Theme: Prevent button block styles from bleeding into pledge form
This fixes an issue where adding the button block classes to the pledge form was creating double-button styles. This also fixes a mistakenly removed class on the remove contributor button.

Follow up to 5d76b97557
2024-08-28 10:44:39 -04:00
Kelly Dwan 5d76b97557
Pledge form: Style the form 2024-08-27 21:30:10 -04:00
Ian Dunn 967718263f
Stats: Store in MC instead of post type
Fixes #200
Fixes #198
2022-08-03 09:29:49 -07:00
Ian Dunn 53ae291a53
Apply coding standards 2022-04-28 06:51:16 -07:00
Ian Dunn 7464a9e585
Stats: Display snapshot times as dates for readability.
Eventually should be charts, etc. In the meantime, though, dates are more useful than timestamps.
2020-11-10 08:34:59 -08:00
Kelly Dwan a91c2733d2
Pledge Management: Add "request link" form to the manage pledge (#126)
When a pledge is selected but the auth token is missing/incorrect, show the email form. Like on the pledge page, submitting the correct email will trigger a new auth token + link to be emailed to the pledge manager. This makes for a clearer path for re-requesting a valid link.

Fixes #114
2019-12-11 16:12:23 -05:00
Kelly Dwan a5d4228c6d
My Pledges: Add an edit link to take you to your profile (#128) 2019-12-11 16:11:41 -05:00
Kelly Dwan 636753bb00
My Pledges: Require profile to be filled out before confirming a pledge (#127)
This will disable the "join organization" button until the profile is complete, and add a second warning message to explicitly tell the user why the button is disabled.
2019-12-11 16:11:13 -05:00
Kelly Dwan bdbf6d573e
Pledge Management: Allow pledge admins to remove the pledge (#123)
* Rename generic "frontend" file to dialog

* Add a "remove pledge" action

* Process pledge deactivation

* Trigger an email on user-initiated pledge deactivation

* Show an error when trying to manage a deactivated pledge

* Add a label for "deactivated" pledges
2019-12-10 14:07:48 -05:00
Kelly Dwan 619af97bd1
Forms: Use button class directly on buttons for consistent display
Adding the `button` mixin into `input[type="submit"] caused conflicts with the other button classes (`.button-primary`) due to specificity. The button classes should be used on all buttons instead. This also updates which button on the Manage Pledge form is the "primary" action, since it's easy to skip the Update button when it's not primary.
2019-12-09 11:15:39 -05:00
Ian Dunn fda5842e86
Regularly store stats snapshots to track historical trends.
Fixes #37
2019-12-06 08:03:54 -08:00
Kelly Dwan 8807efb96d
Pledges: Add UI for setting "deactivated" status (#115)
This adds the ability to deactivate/reactivate pledges from the wp-admin list table. Once deactivated, the pledge is removed from the "published" list, as if it were trashed. It is not rendered in the frontend pledge list either. You can still access the edit screen, but no edits can be made (saving the pledge is disabled by JS, as otherwise it would reactivate itself). This way we can remove a pledge, but still see the activity log.

Fixes #112
2019-12-05 13:20:11 -05:00
Kelly Dwan 80b88399ae
Manage Pledge: Allow pledge admins to change email (#113)
* Add the admin email field to the manage form
* Fix admin email processing: When the email is changed, the pledge needs to be set back to pending, until the email is re-confirmed
* Send confirmation emails for existing pledges to the "Manage Pledge" page
* Process the email confirmation & resending emails actions on both shortcodes
* Add a message for unconfirmed pledges
2019-11-26 15:37:19 -05:00
Kelly Dwan 544fe39199 Manage Pledge: Enable pledge admins to edit contributors from manage form (#108)
* Add contributor management to manage form
* Check `pledge_id` to prevent returning all contributors
* Return a plain text error string – this is used in an alert box, so it can't contain HTML
* Hide confirmation when pledge is a draft
* Only enqueue script if the user is authorized
2019-11-26 13:08:42 -05:00
Kelly Dwan 60b5ca5d2a Manage Pledge: Enable Manage Form functionality
* Fix issue with fetching data in `get_pledge_meta` when no submission has been POST'd
* Rename to `subset`, since `context` is also used elsewhere
* Show form content when there are form errors
* Fix warnings on new pledge form
* Skip wpautop before save, so editors don’t need to edit HTML unless they want to
2019-11-26 13:08:42 -05:00
Jb Audras 0754ae0b28 Use a unique text-domain, wporg-5ftf (#110)
* Use a unique text-domain, wporg-5ftf

* Fix plugin i18n strings

* Remove unwanted text-domains from WPCS checks and fix missed old text-domains

* Remove type=array from phpcs

* Re-add type=array

* Small WPCS fix

* WPCS: replace  var with
2019-11-23 13:24:37 -05:00
Kelly Dwan a11e3c5fa5
Manage Pledge: Update email dialog to use JS submission (#104)
Use the proper dialog behavior for submitting an email to generate a manage link.

Fixes #98.
2019-11-21 15:31:29 -05:00
Kelly Dwan 82192eea4c
Manage a Pledge: Enable adding/removing contributors from wp-admin. (#99)
This updates the display of contributors into a table view, and adds the ability to add and remove contributors to existing pledges.

The display has been refactored to use JS templates & JSON contributor data– the data is output onto the page when loaded from the server, and rendered when the page finishes loading. Adding & removing contributors now submits to an admin-ajax.php endpoint, which, if successful, return the new list of contributors. This ensures the display is always up to date.

Fixes #3
2019-11-20 11:01:00 -05:00
Kelly Dwan 5c2041442a
Remove unused file 2019-11-14 13:48:22 -05:00
Kelly Dwan 42d44f7dc9
Plugin: Fix all phpcs errors
This includes autofixes, along with some manual fixes; mostly syntax-related. Some `phpcs:ignore` comments were added for overzealous rules that don't apply.
2019-11-14 13:48:17 -05:00
Ian Dunn 2e8912e9d5 Manage Pledge: Add shortcode to email link for updating.
See #5
2019-11-12 08:35:06 -08:00
Ian Dunn 963dbd41e3
Views: Modularize success/error notices for DRYness. 2019-11-07 16:14:26 -08:00
Ian Dunn 18228d367c
Pledge Log: Log user of CLI actions. 2019-11-07 11:31:00 -08:00
Caleb Burks 8e3ba2db96
My Pledges: Append ID to nonce action to make it more unique.
Fixes #87
2019-11-06 09:02:29 -08:00
Ian Dunn bac15d21fc
Pledge Form: Improve placeholders for clarity.
* Make the usernames look more like realistic usernames.
* Add placeholders where specific formats are needed.
2019-11-02 08:14:22 -05:00
Kelly Dwan f55054f56c
My Pledge List: Add the My Pledges header to logged out views 2019-11-01 16:09:29 -05:00
Corey McKrill dd4c08d87b
Pledge form: Add ID to form messages and hash to form action
This way when the form is submitted, the page loads at the location
where the success or error message will be shown, skipping the content
above the form.

Fixes #67
2019-10-31 12:49:47 -05:00
Ian Dunn 5c50b1fcc6
My Pledges: Prompt to fill out profile data if haven't already. 2019-10-31 11:08:04 -05:00
Ian Dunn 782a40bcda
Pledge Form: Improve contributor username field UX. 2019-10-30 13:10:21 -07:00
Kelly Dwan 0b26fad482
My Pledges: Update styles and format to match design
- Add a single-pledge view so we can separate out the pending from published
- Update layout and styles of my pledges list
- Adds link and danger button styles
2019-10-30 13:24:48 -05:00
Corey McKrill 83125dd8b2
Update pledge UI and email copy (#64)
Fixes #61
2019-10-29 16:37:14 -07:00
Ian Dunn 858d70b045
My Pledges: Mark up page with live data.
See #56
2019-10-29 12:54:13 -07:00
Corey McKrill 5c5ae83287
Plugin: Add a system for logging events related to pledges and contributors (#54)
Uses action hooks to capture relevant events as log entries on a per-pledge basis. This provides a running history of a pledge and can be used as an audit log if questions arise about changes to a pledge or there are weird bugs.

Fixes #39
2019-10-29 12:46:13 -07:00
Kelly Dwan 310a6876de
Pledge Form: Use slightly more screen reader friendly link text 2019-10-28 20:10:53 -04:00
Kelly Dwan aa8b1838cd
Pledge Form: Use agreement text as label content
This calls more attention to the agreement text, and correctly associates it with the input for screen reader users.
2019-10-28 20:09:38 -04:00
Ian Dunn 67958d9a1a
Contributors: Create functionality for My Pledges page.
This don't add the styling yet, just the functionality.

See #56
Fixes #51
Fixes #30
2019-10-28 12:08:21 -07:00
Kelly Dwan 2ec665bcbb
Pledge Form: Don't show logo upload field in wp-admin
In wp-admin, the logo should be managed with the featured image UI.
2019-10-28 13:33:44 -04:00
Kelly Dwan f9d4a0bd59
Create a Pledge: Upload a logo (#45)
* Allow image uploads

* Add the logo as "generated" meta

This will be attached after we've processed the `$_FILES` object into an upload.

* Load image into media library, attach to the submitted pledge as a featured image.

* Move where image handling happens so we can pass back errors

* Pass back error if upload fails

* Create a validation function to do basic checking of form data

* Move logo uploading to a separate function, and rely on core checks for mime & filesize checking

* Tweak function name to be more clear

* Remove bmp, tiff, and ico file types
2019-10-28 11:47:56 -04:00
Ian Dunn 3f774fdb78
Pledge Form: Add ability to resend pledge confirmation email.
Fixes #49.
2019-10-26 22:18:28 -07:00
Ian Dunn c10699f97c
Contributors: Add ability to resend confirmation email.
Fixes: #50.
2019-10-26 10:59:06 -07:00
Corey McKrill 838a490776
Pledge: Count number of confirmed contributors instead of using arbitrary number input (#52)
This will be more accurate and avoid confusion that could arise if the self-reported "Number of Employees Being Sponsored" didn't match the number of confirmed contributors listed on the pledge.

Having that counted number stored in post meta is still useful, though, so this also adds/updates that number for a pledge whenever a Contributor post changes its status.

Fixes #48
2019-10-25 13:39:13 -07:00
Ian Dunn 5ffca9420f
Email: Send pledge confirmation with authentication token. (#46)
Email: Send pledge confirmation with authentication token.

Fixes #34.
Fixes #10.
2019-10-25 12:07:09 -07:00
Ian Dunn 284e616c84
Pledge Form: Clarify that we're asking for WordPress.org usernames. 2019-10-25 07:57:33 -07:00
Corey McKrill 847e99f44e
Pledge Form: Hide 'manage existing pledge' link for the time being 2019-10-24 21:04:44 -07:00
Corey McKrill 59713ca0f1
Pledges: Move contributor management UI to separate file (#47)
Having both the input for adding a comma separated list of contributors
to a new pledge and the UI for managing the contributors on an existing
pledge in the same file was confusing and it conflated two different
pieces of functionality. It also caused `undefined index` errors in some
views  because `'pledge-contributors'` only exists when submitting the
new pledge form.
2019-10-24 20:06:47 -07:00
Ian Dunn f888fd85c8
Apply coding standards. 2019-10-24 08:12:55 -07:00
Ian Dunn 33d8ed54b1
Pledge Form: Encourge group email addresses for perennial access.
Also, clarfy that the field is referring to an address, rather than a piece of email.
2019-10-24 08:12:55 -07:00
Ian Dunn 6b33c4dbd0
Pledge Form: Update string to reflect latest flows.
The link that they're emailed is to confirm their address, rather than to manage the pledge.

Their pledge will be published once the address is confirmed and contributors have confirmed their participation, rather than after moderation.
2019-10-24 08:12:55 -07:00