Plugin Directory

Changeset 2788951


Ignore:
Timestamp:
09/22/2022 07:44:05 PM (4 years ago)
Author:
lddwebdesign
Message:

3.5 update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ldd-directory-lite/trunk/templates/global/contact-sidebar.php

    r2359251 r2788951  
    6464</div>
    6565
    66 <?php if(ldl()->get_option('google_recaptcha_site')):?>
    67 <script>
    68             jQuery( '#contact-form-submit' ).click(function(event){
    69    
    70 var $captcha = jQuery( '#recaptcha' ),
    71   response = grecaptcha.getResponse();
    72 
    73 if (response.length === 0) {
    74   event.preventDefault();
    75 jQuery( '.msg-error').text( "reCAPTCHA is mandatory" );
    76 if( !$captcha.hasClass( "unhappyMessage" ) ){
    77   $captcha.addClass( "unhappyMessage" );
    78 }
    79 } else {
    80 jQuery( '.msg-error' ).text('');
    81 $captcha.removeClass( "unhappyMessage" );
    82 
    83 }
    84 })
    85 
    86         </script>
    87 <?php endif;?>
    8866
    8967
    90 <script>
    91 
    92 
    93 jQuery(document).ready( function($) {
    94     $("#contact-form").isHappy({
    95         fields: {
    96             '#senders_name': {
    97                 required: true,
    98                 message: '<?php _e('Please enter a valid name.', 'ldd-directory-lite'); ?>',
    99                 test: happy.minLength,
    100                 arg: 3
    101             },
    102             '#email': {
    103                 required: true,
    104                 message: '<?php _e('Please enter a valid email address.', 'ldd-directory-lite'); ?>',
    105                 test: happy.email
    106             },
    107             '#subject': {
    108                 required: true,
    109                 message: '<?php _e('Please enter a valid subject.', 'ldd-directory-lite'); ?>',
    110                 test: happy.minLength,
    111                 arg: 6
    112             },
    113             '#message': {
    114                 required: true,
    115                 message: '<?php _e('Please enter a longer message..', 'ldd-directory-lite'); ?>',
    116                 test: happy.minLength,
    117                 arg: 10
    118             },
    119            
    120            
    121            
    122         }
    123     })
    124 })
    125 
    126 
    127 
    128 
    129 </script>
Note: See TracChangeset for help on using the changeset viewer.