Skip to content

Commit

Permalink
Merge pull request #742 from Benunc/patch-5
Browse files Browse the repository at this point in the history
adds form id to terms link class
  • Loading branch information
Devin Walker committed Jul 18, 2016
2 parents e6ffb7b + dda05a8 commit bb93665
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions includes/forms/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ function give_get_login_fields( $form_id ) {
<a href="<?php echo wp_lostpassword_url( $redirect )?>"> <?php _e( 'Forgot password?' ) ?> </a>
</span>
</div>

<div id="give-user-login-submit-<?php echo $form_id; ?>" class="give-clearfix">
<input type="submit" class="give-submit give-btn button" name="give_login_submit" value="<?php _e( 'Login', 'give' ); ?>"/>
<?php if ( $show_register_form !== 'login' ) { ?>
Expand Down Expand Up @@ -1055,16 +1055,16 @@ function give_terms_agreement( $form_id ) {

if ( $form_option === 'yes' && ! empty( $terms ) ) { ?>
<fieldset id="give_terms_agreement">
<div id="give_terms" style="display:none;">
<div id="give_terms" class= "give_terms-<?php echo $form_id;?>" style="display:none;">
<?php
do_action( 'give_before_terms' );
echo wpautop( stripslashes( $terms ) );
do_action( 'give_after_terms' );
?>
</div>
<div id="give_show_terms">
<a href="#" class="give_terms_links"><?php _e( 'Show Terms', 'give' ); ?></a>
<a href="#" class="give_terms_links" style="display:none;"><?php _e( 'Hide Terms', 'give' ); ?></a>
<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id;?>"><?php _e( 'Show Terms', 'give' ); ?></a>
<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id;?>" style="display:none;"><?php _e( 'Hide Terms', 'give' ); ?></a>
</div>

<input name="give_agree_to_terms" class="required" type="checkbox" id="give_agree_to_terms" value="1"/>
Expand Down Expand Up @@ -1179,10 +1179,10 @@ function give_agree_to_terms_js( $form_id ) {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('body').on('click', '.give_terms_links', function (e) {
$('body').on('click', '.give_terms_links-<?php echo $form_id;?>', function (e) {
e.preventDefault();
$('#give_terms').slideToggle();
$('.give_terms_links').toggle();
$('.give_terms-<?php echo $form_id;?>').slideToggle();
$('.give_terms_links-<?php echo $form_id;?>').toggle();
return false;
});
});
Expand Down

0 comments on commit bb93665

Please sign in to comment.