Commit graph

171 commits

Author SHA1 Message Date
Ian Dunn 6fe5a92c7b
Composer: Document why PHPUnit 7 is used instead of 8. 2019-10-24 16:22:55 -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
Ian Dunn 8020e43fb9
Pledge Form: Use relative link for cross-environment compatibility. 2019-10-24 08:12:55 -07:00
Ian Dunn c527b5f8a0
Composer: Warn about bug in test watcher interactive mode. 2019-10-24 08:12:48 -07:00
Ian Dunn eec9f5cb61
Tests: Setup PHPUnit and PHPUnit Watcher. 2019-10-23 14:27:26 -07:00
Corey McKrill 65bd3ad5af
Pledge form: Add a blurb for the "Agree" checkbox (#44)
When submitting the form for a new pledge, the submitter must check a box to acknowledge that they understand and agree with the program expectations. The agreement blurb links to a separate page on the 5ftF site outlining what those expectations are.

Fixes #40
2019-10-23 13:47:15 -07:00
Ian Dunn 427cacc87c
Directory: Rename to refect current file structure. 2019-10-22 13:44:15 -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
Ian Dunn 2927532544
Pledges: Rename input field to match handler expectation.
Previously the field wasn't being saved when a new pledge was created.
2019-10-21 13:34:14 -07:00
Ian Dunn fff279aa34
Pledge: Temporarily disable capability checks to enable development. 2019-10-21 13:34:14 -07:00
Ian Dunn cc5303fa11
Pledges: URL encode JSON data to avoid i18n character issues. 2019-10-21 13:34:14 -07:00
Corey McKrill 609ff42620
Pledge form: Add todo list on manage form 2019-10-21 11:10:55 -07:00
Corey McKrill 9c08692d5d
New Pledge: Validate submitted form values and generate a draft pledge post (#35)
Ensures that a submission to the new pledge form has:

* A unique email address compared to existing pledges
* A unique domain in the URL, compared to existing pledges
* Has at least one valid contributor listed

Error messages when one or more of these conditions isn't met are descriptive so that the submitter can correct the issue.

Fixes #15
2019-10-18 16:56:21 -07:00
Kelly Dwan 0f675ae6c3
Create Pledge: Make form functional (#31)
This broadly enables & styles the pledge forms across the frontend and wp-admin.

- Switches field `readonly` control to a variable called `$readonly`
- Create `PledgeMeta\get_pledge_meta()` which will fetch data from `$_POST`, a pledge post, or defaults.
- Add Number of Employees field
- Update form content to match mockup:
  - fields now have help text
  - success message uses content from mockup
  - logo field is moved to the "org info" section
- Style form in theme, add some similar styles to the admin

Fixes #7, fixes #28
2019-10-08 18:29:35 -04: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
Corey McKrill 697a4b2329
Add 5ftf plugin from https://github.com/coreymckrill/5ftf 2019-09-27 17:41:19 -07:00