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.
This commit is contained in:
Ian Dunn 2019-10-24 07:30:27 -07:00
parent 6b33c4dbd0
commit 33d8ed54b1
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
2 changed files with 6 additions and 2 deletions

View file

@ -67,6 +67,8 @@ function process_form_new() {
Pledge\CPT_ID Pledge\CPT_ID
); );
// todo make this validation DRY w/ process_form_manage().
if ( has_existing_pledge( $email, 'email' ) ) { if ( has_existing_pledge( $email, 'email' ) ) {
return new WP_Error( return new WP_Error(
'existing_pledge_email', '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'] ); $domain = PledgeMeta\get_normalized_domain_from_url( $submission['org-url'] );
if ( has_existing_pledge( $domain, 'domain' ) ) { if ( has_existing_pledge( $domain, 'domain' ) ) {

View file

@ -7,7 +7,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
<div class="form-field"> <div class="form-field">
<label for="5ftf-pledge-email"> <label for="5ftf-pledge-email">
<?php esc_html_e( 'Administrator Email', 'wordpressorg' ); ?> <?php esc_html_e( 'Administrator Email Address', 'wordpressorg' ); ?>
</label> </label>
<input <input
type="email" type="email"
@ -19,7 +19,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
<?php echo $readonly ? 'readonly' : ''; ?> <?php echo $readonly ? 'readonly' : ''; ?>
/> />
<p id="5ftf-pledge-email-help"> <p id="5ftf-pledge-email-help">
<?php esc_html_e( 'This email will be used to verify your organizations contribution profile, and later manage any changes.', 'wordpressorg' ); ?> <?php esc_html_e( "This address will be used to confirm your organizations contribution profile, and later manage any changes. Please make sure that it's a group address (e.g., wp-contributors@example.com) so that it persists across employee transitions.", 'wordpressorg' ); ?>
</p> </p>
<?php if ( is_admin() ) : ?> <?php if ( is_admin() ) : ?>