Plugin Directory

Changeset 864949


Ignore:
Timestamp:
02/25/2014 09:23:14 PM (12 years ago)
Author:
buildcreate
Message:

Pushed version 0.2.3 including misc fixes per support requests

Location:
agreeable
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • agreeable/trunk/agreeable.php

    r859423 r864949  
    44Plugin URI: http://wordpress.org/extend/plugins/agreeable
    55Description: Add a required "Agree to terms" checkbox to login and/or register forms.  Based on the I-Agree plugin by Michael Stursberg.
    6 Version: 0.2.2
     6Version: 0.2.3
    77Author: buildcreate
    88Author URI: http://buildcreate.com
     
    1414    $dbregister = get_option('ag_register');
    1515    $dbfail = get_option('ag_fail');
    16    
     16
    1717    global $bp;
    1818   
     
    5959    echo '<div style="clear: both; padding: .25em 0;" id="terms-accept" class="terms-form">';
    6060        if(isset($bp)){do_action( 'bp_login_accept_errors' );}
    61     echo '<label style="text-align: left;"><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a title="'.get_post($dburl)->post_title.'" class="thickbox" target="_BLANK" href="#TB_inline?width=600&height=550&inlineId=terms">'.$dbtermm.'</a></label></div>';
    62     echo '<input type="hidden" value="'.$type.'" name="ag_type" />';
     61    echo '<label style="text-align: left;"><input type="checkbox" name="login_accept" id="login_accept" />&nbsp;<a title="'.get_post($dburl)->post_title.'" class="thickbox" target="_BLANK" href="#TB_inline?width=600&height=550&inlineId=terms">'.$dbtermm.'</a></label>';
     62    echo '<input type="hidden" value="'.$type.'" name="ag_type" /></div>';
    6363    echo '<div id="terms"><div>'.$terms.'</div></div>';
    6464}
     
    7979        display_terms_form('register');
    8080    }
     81   
     82    echo '<script>';
     83        echo '
     84            jQuery(document).ready(function($){
     85                if($("#theme-my-login")) {
     86                    $("#theme-my-login #terms-accept").insertBefore("#theme-my-login .submit");
     87                }
     88            });
     89        ';
     90    echo '</script>';
     91   
    8192}
    8293
    8394// As part of WP login form construction, call our function
    84 add_filter ( 'login_form', 'login_terms_accept' );
    85 add_filter ( 'register_form', 'register_terms_accept' );
     95add_filter( 'login_form', 'login_terms_accept' );
     96add_filter( 'register_form', 'register_terms_accept');
    8697add_action('bp_before_registration_submit_buttons', 'register_terms_accept');
    8798
     99
     100add_action( 'plugins_loaded', 'bcrm_form_hooks');
    88101
    89102function ag_widget_terms_accept() {
     
    98111        echo '
    99112            jQuery(document).ready(function($){
    100                 $(".widget_bp_core_login_widget #terms-accept").insertBefore("#bp-login-widget-rememberme");
    101                 $(".widget_bp_core_login_widget #bp-login-widget-form").nextAll(".terms-form").hide();
     113                $(".widget_bp_core_login_widget #terms-accept").insertBefore("#bp-login-widget-form .forgetmenot");
     114                $(".widget_bp_core_login_widget #bp-login-widget-form").nextAll(".terms-form").remove();
    102115            });
    103116        ';
  • agreeable/trunk/readme.txt

    r859423 r864949  
    3232
    3333== Changelog ==
     34
     35= 0.2.3 =
     36* Fixed issue with BuddyPress login widget no validating
     37* Fixed issue with Theme My Login additional fields coming AFTER the checkbox
    3438
    3539= 0.2.2 =
Note: See TracChangeset for help on using the changeset viewer.