Skip to content

Commit

Permalink
form ID added for a11y #379
Browse files Browse the repository at this point in the history
  • Loading branch information
devin committed Feb 29, 2016
1 parent 1f0ef08 commit ab9d45d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/js/frontend/give-ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jQuery( document ).ready( function ( $ ) {
register_loading_img.show();

$.post( give_scripts.ajaxurl, data, function ( checkout_response ) {
$( this_form ).find( '#give_checkout_login_register' ).html( '' ).html( checkout_response );
$( this_form ).find( '[id^=give-checkout-login-register]' ).html( '' ).html( checkout_response );

} ).done( function () {
// Hide the ajax loader
Expand Down
4 changes: 2 additions & 2 deletions includes/forms/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ function give_show_purchase_form( $form_id ) {
$show_register_form = apply_filters( 'give_show_register_form', get_post_meta( $form_id, '_give_show_register_form', true ) );

if ( ( $show_register_form === 'registration' || ( $show_register_form === 'both' && ! isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : ?>
<div id="give_checkout_login_register">
<div id="give-checkout-login-register-<?php echo $form_id; ?>">
<?php do_action( 'give_purchase_form_register_fields', $form_id ); ?>
</div>
<?php elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : ?>
<div id="give_checkout_login_register">
<div id="give-checkout-login-register-<?php echo $form_id; ?>">
<?php do_action( 'give_purchase_form_login_fields', $form_id ); ?>
</div>
<?php endif; ?>
Expand Down

0 comments on commit ab9d45d

Please sign in to comment.