Commit graph

84 commits

Author SHA1 Message Date
Ian Dunn 414c4809e3 Email: Allow tokens to be reused when necessary. 2019-11-12 08:35:06 -08:00
Ian Dunn 521ce58de7
Contributors: Return default array when posts empty to avoid notices.
Previously there were `undefined index` notices on `wp-admin/edit.php?post_type=5ftf_pledge` when a pledge had `0` posts in either status.
2019-11-07 16:14:27 -08:00
Ian Dunn 93d2bafd34
Pledge Form: Generate correct URL for the directory.
It's no longer a page, and instead uses the post type archive with a rewrite rule.
2019-11-07 16:14:27 -08:00
Ian Dunn 963dbd41e3
Views: Modularize success/error notices for DRYness. 2019-11-07 16:14:26 -08:00
Ian Dunn 7e89d1794a
Email: Send no-cache headers when auth token present for security. 2019-11-07 16:07:51 -08:00
Ian Dunn 18228d367c
Pledge Log: Log user of CLI actions. 2019-11-07 11:31:00 -08:00
Ian Dunn c524d1b21b
Tests: Disable logger to avoid errors. 2019-11-07 11:16:12 -08:00
Ian Dunn ffebacb42a
My Pledges: Rename status variable for clarity. 2019-11-07 10:08:18 -08:00
Caleb Burks 7cbe722202
My Pledges: Only trigger status changes when needed. 2019-11-07 10:08:18 -08:00
Caleb Burks 1023fdeb55
My Pledges: Verify current user is authorized to edit contribution.
Closes #90
2019-11-07 10:08:06 -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
Caleb Burks 8230963ea4
My Pledges: Ensure the submitted contributor_post_id is valid.
See #87
2019-11-06 08:58:50 -08:00
Caleb Burks c47679a5cc
My Pledges: Return early if contributor_post_id is missing.
`process_my_pledges_form()` is actually called on page load in `render_my_pledges()`.

So to prevent the unnecessary get_post() queries, let’s just return early if the form wasn’t really submitted.

See #87
2019-11-06 08:58:07 -08:00
Ian Dunn dc8ef43ebd
Remove links to non-existent locale variants.
Fixes #76
2019-11-04 13:04:17 -06:00
Melissa Ashforth c7e329ec32
Pledge List: Remove unused prototype.
Fixes #62
Closes #79
2019-11-03 15:14:03 -06: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 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
Ian Dunn fe437cc880
My Pledges: Hide menu item when logged out. 2019-11-01 15:37:49 -05:00
Ian Dunn b3d52c8719
Pledge Meta: Clarify function/job names. 2019-11-01 04:24:11 -05:00
Ian Dunn 2686c9873b
Pledge Meta: Add cron to update all cached pledge data.
Fixes #71
2019-10-31 21:41:35 -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 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 069dcc8c20
Pledge Form: Ask for updates to w.org profiles to get needed data. 2019-10-31 07:27:58 -05:00
Ian Dunn 00e88cc2de
Pledge Form: Always insert user_login for consistency.
df78e3de80 started allowing `user_nicename`s in the form field, but we need to always create the contributor posts with the `user_login`, because there are many other places in the code that expect the `post_title` to be the `user_login` and not the `user_nicename`.

See #57
2019-10-30 23:30:34 -05:00
Ian Dunn e61ce467cb
Pledge Form: Allow HTML within descriptions.
Fixes #63
2019-10-30 13:32:32 -07:00
Ian Dunn 782a40bcda
Pledge Form: Improve contributor username field UX. 2019-10-30 13:10:21 -07:00
Ian Dunn df78e3de80
Pledge Form: Also allow user_nicename to improve UX.
Fixes #57
2019-10-30 13:10:20 -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 454962522d
Re-enable logo validation
It was disabled for testing, and I forgot and committed it. 🤦
2019-10-29 17:22:11 -07: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 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
Ian Dunn 6209060eb2
Pledge List: Re-enable condition to only show staffed pledges.
Closes #43
2019-10-29 11:20:08 -07:00
Ian Dunn 189c61bfe8
Flip placeholder pending status to publish now that testing done. 2019-10-29 10:15:22 -07:00
Ian Dunn f409dbd3a6
XProfile: Return early when no contributors to avoid error. 2019-10-29 10:08:26 -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
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
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 63f718bd9a
Pledge Form: Apply coding standards. 2019-10-26 11:00:03 -07:00