Commit graph

40 commits

Author SHA1 Message Date
Kelly Dwan bb25e0c78b
Tools: Add formatting command, run to fix minor phpcs issues 2024-08-27 13:43:27 -04:00
Paul Kevan c04421f980
Fix pledge activation URL (#245)
* Fix pledge activation URL

The post id being sent by email contained the pledge ID instead of the ID for form page, this fixes that are restores the ability to confirm email address.

* Fix unrelated PHPCS
2024-02-05 13:57:51 +00:00
Ian Dunn 574ab7fd4e
Pledges: Email companies every 6 months to update pledges.
Fixes #211
2022-08-16 14:25:44 -07:00
Ian Dunn c6d7bbb7c1
Contributors: Reset profile hours when pledge deactivated.
See https://github.com/WordPress/five-for-the-future/issues/169
2022-05-02 14:22:26 -07:00
Ian Dunn 834c62c0d0
Plugin: Minor cleanup 2022-04-28 09:34:14 -07:00
Ian Dunn 53ae291a53
Apply coding standards 2022-04-28 06:51:16 -07:00
Ian Dunn d22f13f2c1
Pledge: Log the reason why a pledge was deactivated. 2022-03-18 12:42:05 -07:00
Ian Dunn 13a417ce8e
Apply coding standards. 2020-11-13 12:24:03 -08:00
Kelly Dwan a70212bc22
Pledge List: Add sorting by total contributor count (#133)
Add a "Total Contributors" option to the sorting menu on the pledge list. This will sort the list from most confirmed contributors to least.

Fixes #94
2019-12-16 17:48:33 -05:00
Kelly Dwan 3b97459b15
Pledge List: Change list order hourly (#132)
Using a seed for the RAND function, based on the date & time, will randomize the list every hour, while keeping the order consistent across any pagination. This also removes the increase to posts_per_page, since pagination is functional again.

Fixes #70
2019-12-13 15:41:00 -05: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 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 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 089b458032
Remove feature gate 2019-11-26 17:35:51 -05:00
Kelly Dwan a99b3b478e Pledges: Move has_existing_pledge function 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 f32d26ef47
Organize email & authentication code (#101)
* Split Auth functionality out to new file

* Move email-related code into the email file

* Use `assertFalse` for boolean assertions

* Add `can_manage_pledge` to check user or token against a given pledge

Pulled out of e9763f6678

* Remove duplicate test
2019-11-20 10:40:45 -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
Caleb Burks 1576a18d24 Disallow create_posts for the Pledges and Contributors (#78)
Pledges and contributors should not be creatable from the normal WP UI "Add New".

Fixes #77 
Props icaleb
2019-11-03 14:21:16 -06:00
Ian Dunn 11b9bf3604
Pledge List: Sort randomly by default for fairness.
See #70
2019-11-02 13:26:22 -05:00
Ian Dunn 87eb8ec43a
Pledge Log: Capture email events. 2019-10-31 20:39:57 -05:00
Ian Dunn 33d3bc1933
Pledge List: Show hours because it's a more meaningful statistic. 2019-10-31 16:27:27 -05:00
Corey McKrill 7273057950
Pledge: Update wording of pledge confirmation email 2019-10-31 14:39:17 -05:00
Corey McKrill 14109a1b3e
Pledges: Add columns to pledge list table
It's useful to have some at-a-glance info about pledges when scrolling
the list table.
2019-10-29 17:18:52 -07:00
Corey McKrill 83125dd8b2
Update pledge UI and email copy (#64)
Fixes #61
2019-10-29 16:37:14 -07:00
Kelly Dwan 9f47f83ef4
Pledge CPT: Remove "has contributors" check from the single pledge view 2019-10-29 18:09:44 -05:00
Ian Dunn 6209060eb2
Pledge List: Re-enable condition to only show staffed pledges.
Closes #43
2019-10-29 11:20:08 -07:00
Corey McKrill dbdcf26bd9 Theme: Single pledge view (#43)
* Theme: Create template part for single pledge

* Plugin: Add functions for handling xprofile data

* Plugin: Add helper function for getting contributor user objects

* Theme: Display aggregated contributor data on single pledge view

* Theme: Add functions, markup, and styles to show team badges

* Theme: Add badge for Test team

* Theme: Add tentative URL for report a pledge link

* Theme: Add support for post thumbnails

* Theme: Add org logo to single pledge view

* Theme: Update `$content_width` to 960

This matches the width of the content in the global header and
the About page.

* Move pledge template to a file used by the template heirarchy

* Clean up some PHPCS errors

* Move pledge structure out to just the list items

* Create file for single pledge styles

* style badge grid into a grid.

* Add a custom image size for the logo

* Update styles

* Un-hide pledges with no confirmed contributors

* Fix content width
2019-10-28 13:38:49 -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 63f718bd9a
Pledge Form: Apply coding standards. 2019-10-26 11:00:03 -07:00
Ian Dunn c4f2fe58ab
Pledge Form: Make email naming consistent.
This helps distinguish between _pledge_ and _contributor_ emails, and _verifying_ auth tokens and _confirming_ pledges.
2019-10-26 08:23:41 -07:00
Kelly Dwan 553247cbf7
Pledge List: Display pledges in list with sort and search ability (#33)
* Use the post-type when choosing template partial
* Add pledge archive templates
* Style pledge list page
* Style individual pledge
* Use pledge featured image for the logo
* Fix aspect ratio of image
* Add real contributors to the pledges
* Enable sorting and searching of pledges
* Add pledge sorting markup
* Style the page header
* Restrict any pledges with no contributors from being shown on the frontend
* Update contributor count key name
2019-10-25 16:34:46 -04: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 f888fd85c8
Apply coding standards. 2019-10-24 08:12:55 -07:00
Corey McKrill 266ba447b4
Add a Contributor custom post type (#42)
Contributors associated with pledges have a state: they can be confirmed or unconfirmed. They also have some important meta data, namely when they were confirmed. Thus, managing contributor data for pledges is more robust if we treat them as their own post type instead of as a multidimensional array of post meta data.

This also reorganizes some of the functions related to pledges so that things are more consistent between the pledge CPT and the contributior CPT.

Fixes #11
2019-10-21 15:43:20 -07:00
Kelly Dwan 0111c36db4
Move comments to issues 2019-10-08 12:16:17 -04:00
Kelly Dwan bd9019556b
Auto-fix some PHPCS errors 2019-10-08 11:21:50 -04:00
Corey McKrill ded645fabc
Plugin: Refactor to use as foundation for planned pledge workflows (#23)
This starts to address several items in the roadmap, but probably doesn't fully address any of them. It takes the plugin code that was written several months ago, before the scope of this project was fully sorted out, and refactors it to be a starting point for the roadmap.

* Adds template files for form inputs that can be used to both create new pledges and manage existing pledges
* Does some validation and sanitization work on form submissions
* Adds a custom post status for deactivated pledges
2019-10-04 12:35:02 -07:00
Corey McKrill 9bf2f9dd1a
Update company to pledge, some code cleanup 2019-09-30 17:04:49 -07:00