From 33d8ed54b11c6f7f53b304df3975060dd9c7bc8f Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Thu, 24 Oct 2019 07:30:27 -0700 Subject: [PATCH] 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. --- plugins/wporg-5ftf/includes/pledge-form.php | 4 ++++ plugins/wporg-5ftf/views/inputs-pledge-org-email.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/wporg-5ftf/includes/pledge-form.php b/plugins/wporg-5ftf/includes/pledge-form.php index ab4e3ba..6f7fe03 100755 --- a/plugins/wporg-5ftf/includes/pledge-form.php +++ b/plugins/wporg-5ftf/includes/pledge-form.php @@ -67,6 +67,8 @@ function process_form_new() { Pledge\CPT_ID ); + // todo make this validation DRY w/ process_form_manage(). + if ( has_existing_pledge( $email, 'email' ) ) { return new WP_Error( 'existing_pledge_email', @@ -74,6 +76,8 @@ function process_form_new() { ); } + // todo should probably verify that email address is for the same domain as URL. do here and for manage. + $domain = PledgeMeta\get_normalized_domain_from_url( $submission['org-url'] ); if ( has_existing_pledge( $domain, 'domain' ) ) { diff --git a/plugins/wporg-5ftf/views/inputs-pledge-org-email.php b/plugins/wporg-5ftf/views/inputs-pledge-org-email.php index 8838e56..25c6688 100644 --- a/plugins/wporg-5ftf/views/inputs-pledge-org-email.php +++ b/plugins/wporg-5ftf/views/inputs-pledge-org-email.php @@ -7,7 +7,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
/>

- +