mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-22 11:03:43 +03:00
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
This commit is contained in:
parent
5c50b1fcc6
commit
dd4c08d87b
|
@ -19,7 +19,7 @@ use WP_Post;
|
|||
|
||||
<?php if ( ! empty( $messages ) ) : ?>
|
||||
|
||||
<div class="notice notice-error notice-alt">
|
||||
<div id="form-message" class="notice notice-error notice-alt">
|
||||
<?php foreach ( $messages as $message ) : ?>
|
||||
<p><?php echo wp_kses_post( $message ); ?></p>
|
||||
<?php endforeach; ?>
|
||||
|
@ -29,7 +29,7 @@ use WP_Post;
|
|||
|
||||
<?php if ( true === $complete ) : ?>
|
||||
|
||||
<div class="notice notice-success notice-alt">
|
||||
<div id="form-message" class="notice notice-success notice-alt">
|
||||
<p>
|
||||
<?php esc_html_e( "Thanks for pledging to Five for the Future! Your new pledge profile has been created, and we've emailed you a link to confirm your address. Once that's done, we'll also email confirmation links to the contributors you named in your pledge.", 'wporg' ); ?>
|
||||
</p>
|
||||
|
@ -53,7 +53,7 @@ use WP_Post;
|
|||
|
||||
<?php else : ?>
|
||||
|
||||
<form class="pledge-form" id="5ftf-form-pledge-new" action="" method="post" enctype="multipart/form-data">
|
||||
<form class="pledge-form" id="5ftf-form-pledge-new" action="#form-message" method="post" enctype="multipart/form-data">
|
||||
<?php
|
||||
require get_views_path() . 'inputs-pledge-org-info.php';
|
||||
require get_views_path() . 'inputs-pledge-contributors.php';
|
||||
|
|
Loading…
Reference in a new issue