Plugin Directory

Changeset 1918650


Ignore:
Timestamp:
08/02/2018 07:27:50 AM (8 years ago)
Author:
pradeepmakone07
Message:

version 9.1.0

Location:
wp-support-plus-responsive-ticket-system/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • wp-support-plus-responsive-ticket-system/trunk/asset/js/public.js

    r1912105 r1918650  
    790790
    791791/**
    792  * Validate logged-In user create ticket form
    793  */
    794 function validate_user_create_ticket(){
    795 
    796     var flag = false;
    797     var errorMsg = '';
    798     var empty_labels = new Array();
    799 
    800     wpspjq('.wpsp_require').each(function(){
    801 
    802         var cust_field = wpspjq(this);
    803         switch(cust_field.attr('data-field')){
    804             case 'text' :
    805             case 'url' :
    806             case 'date' :
    807             case 'email': if(cust_field.find('input').val().trim() == '') empty_labels.push(cust_field.find('label').text());
    808                 break;
    809             case 'drop-down': if(cust_field.find('select').val().trim() == '') empty_labels.push(cust_field.find('label').text());
    810                 break;
    811             case 'tinymce':
    812                 var editor_id = cust_field.find('textarea').attr('id');
    813                 if(tinyMCE.get(editor_id).getContent().trim() == '') empty_labels.push(cust_field.find('label').text());
    814                 break;
    815             case 'textarea':  if(cust_field.find('textarea').val().trim() == '') empty_labels.push(cust_field.find('label').text());
    816                 break;
    817             case 'checkbox':
    818             case 'radio-button':
    819                 var checked = false;
    820                 cust_field.find('input').each(function(){
    821                     if(wpspjq(this).is(':checked')){
    822                         checked = true;
    823                         return;
    824                     }
    825                 });
    826                 if(!checked) empty_labels.push(cust_field.find('label').text());
    827                 break;
    828             case 'attachment': if(cust_field.find('input').length == 0) empty_labels.push(cust_field.find('label').text());
    829                 break;
    830         }
    831 
    832     });
    833 
    834     if(empty_labels.length){
    835         flag = true;
    836         errorMsg  = wpsp_data.lbl_enter_required+'\n\n- ';
    837         errorMsg += empty_labels.join('\n- ');
    838     }
    839 
    840     if(!flag){
    841         var wrong_emails = new Array();
    842         wpspjq('div[data-field=email]').each(function(){
    843             var email = wpspjq(this).find('input').val().trim();
    844             if( email != '' && !validateEmail(email) ){
    845                 wrong_emails.push(wpspjq(this).find('label').text());
    846             }
    847         });
    848         if(wrong_emails.length){
    849             flag = true;
    850             errorMsg  = wpsp_data.lbl_wrong_email+'\n\n- ';
    851             errorMsg += wrong_emails.join('\n- ');
    852         }
    853     }
    854 
    855     if(!flag){
    856         var wrong_urls = new Array();
    857         wpspjq('div[data-field=url]').each(function(){
    858             var url = wpspjq(this).find('input').val().trim();
    859             if( url != '' && !validateURL(url) ){
    860                 wrong_urls.push(wpspjq(this).find('label').text());
    861             }
    862         });
    863         if(wrong_urls.length){
    864             flag = true;
    865             errorMsg  = wpsp_data.lbl_wrong_url+'\n\n- ';
    866             errorMsg += wrong_urls.join('\n- ');
    867         }
    868     }
    869    
    870     if(!flag){
    871       if (jQuery('#captcha_code').val().trim().length==0) {
    872             alert('Please confirm you are not a robot!');
    873         return false;
    874         }
    875     }
    876    
    877     if(!flag){
    878       wpspjq('#frm_create_ticket').hide();
    879       wpspjq('#wpsp-admin-popup-wait-load-thank').show();
    880         return true;
    881     } else {
    882         alert(errorMsg);
    883         return false;
    884     }
    885    
    886    
    887 
    888 }
    889 
    890 /**
    891792 * Submit ticket reply to DB
    892793 */
  • wp-support-plus-responsive-ticket-system/trunk/includes/admin/general/general-advanced-settings.php

    r1912105 r1918650  
    8686               
    8787                <tr>
    88                 <th scope="row"><?php _e('Reply to Closed Tickets','wp-support-plus-responsive-ticket-system'); ?></th>
    89                 <td>
    90                 <select name="general_advanced_settings[reply_closed_tickets]">
    91                    
    92                     <option <?php echo $wpsupportplus->functions-> toggle_button_reply_closed_tickets() ? 'selected="selected"' : '' ?>value="1"><?php _e('Allowed','wp-support-plus-responsive-ticket-system')?></option>
    93                     <option <?php echo $wpsupportplus->functions-> toggle_button_reply_closed_tickets() ? '' : 'selected="selected"' ?>value="0"><?php _e('Not Allowed','wp-support-plus-responsive-ticket-system')?></option>
     88                    <th scope="row"><?php _e('Reply to Closed Tickets','wp-support-plus-responsive-ticket-system'); ?></th>
     89                    <td>
     90                    <select name="general_advanced_settings[reply_closed_tickets]">
     91                       
     92                        <option <?php echo $wpsupportplus->functions-> toggle_button_reply_closed_tickets() ? 'selected="selected"' : '' ?>value="1"><?php _e('Allowed','wp-support-plus-responsive-ticket-system')?></option>
     93                        <option <?php echo $wpsupportplus->functions-> toggle_button_reply_closed_tickets() ? '' : 'selected="selected"' ?>value="0"><?php _e('Not Allowed','wp-support-plus-responsive-ticket-system')?></option>
    9494
    95               </select><br>
    96                 <small><i><?php _e('Applicable for Subscriber role only.','wp-support-plus-responsive-ticket-system');?></i></small>
    97             </td>
     95                  </select><br>
     96                    <small><i><?php _e('Applicable for Subscriber role only.','wp-support-plus-responsive-ticket-system');?></i></small>
     97                </td>
    9898                </tr>
    9999               
     100                <tr>
     101                    <th scope="row"><?php _e('Allow Captcha','wp-support-plus-responsive-ticket-system'); ?></th>
     102                    <td>
     103                        <?php
     104                        $cap=$wpsupportplus->functions-> toggle_button_disable_captcha();
     105                        ?>
     106                    <select name="general_advanced_settings[captcha_status]">
     107                         
     108                         <option <?php echo $cap=='all'? 'selected="selected"' : '' ?>value="all"><?php _e('All Users','wp-support-plus-responsive-ticket-system')?></option>
     109                         <option <?php echo $cap=='guest' ? 'selected="selected"' : '' ?>value="guest"><?php _e('Guest Users','wp-support-plus-responsive-ticket-system')?></option>
     110                         <option <?php echo $cap=='disable' ? 'selected="selected"':'' ?>value="disable"><?php _e('Disable','wp-support-plus-responsive-ticket-system')?></option>
     111
     112                  </select><br>
     113                    <small><i><?php _e('Enable/disable captcha on create ticket page.','wp-support-plus-responsive-ticket-system');?></i></small>
     114                </td>
     115                </tr>
    100116     </table>
    101117
  • wp-support-plus-responsive-ticket-system/trunk/includes/admin/ticket-form/custom-fields.php

    r1912105 r1918650  
    4040            ?>
    4141            <tr class="sectionsid">
    42                 <td><?php echo $field->label?></td>
     42                <td><?php echo htmlspecialchars_decode( stripslashes($field->label))?></td>
    4343                <td><?php echo $wpsupportplus->functions->get_custom_field_type_name( $field->field_type )?></td>
    4444                <td><?php echo $field->isVarFeild ? __('Yes', 'wp-support-plus-responsive-ticket-system') : __('No', 'wp-support-plus-responsive-ticket-system')?></td>
  • wp-support-plus-responsive-ticket-system/trunk/includes/admin/ticket-list/list-settings.php

    r1912105 r1918650  
    143143    function wpsp_save_form_management(obj){
    144144       
    145         wpspjq('#wpsp_setting_submit_btn').text('<?php _e('Please Wait ...','wp-support-plus-responsive-ticket-system')?>');
     145        wpspjq('#wpsp_setting_submit_btn').text("<?php _e('Please Wait ...','wp-support-plus-responsive-ticket-system')?>");
    146146       
    147147        var order = wpspjq("#wpsp_sortable").sortable("toArray");
  • wp-support-plus-responsive-ticket-system/trunk/includes/ajax/get_add_custom_field.php

    r1912105 r1918650  
    131131        wpspjq('input[name=field_label]').focus();
    132132        error_flag = true;
    133     }
    134        
    135         if( !error_flag && wpspjq('input[name=field_instructions]').val().trim() == '' ){
    136         wpspjq('#wpsp_popup_form_error p').text("<?php _e('Please enter Field Label!','wp-support-plus-responsive-ticket-system')?>");
    137         wpspjq('input[name=field_instructions]').val('');
    138         wpspjq('input[name=field_instructions]').focus();
    139         error_flag = true;
    140     }
    141    
     133    }   
    142134   
    143135    if( !error_flag && wpspjq('select[name=field_type]').val().trim() == '' ){
  • wp-support-plus-responsive-ticket-system/trunk/includes/ajax/get_edit_custom_field.php

    r1912105 r1918650  
    2929    <div class="wpsp_popup_form_element">
    3030        <b><?php _e('Field Label','wp-support-plus-responsive-ticket-system')?>:</b><br>
    31         <input class="wpsp_fullwidth" type="text" name="field_label" value="<?php echo $field->label;?>"/>
     31        <input class="wpsp_fullwidth" type="text" name="field_label" value="<?php echo htmlspecialchars_decode( stripslashes($field->label));?>"/>
    3232    </div>
    3333       
    3434        <div class="wpsp_popup_form_element">
    3535        <b><?php _e('Instructions','wp-support-plus-responsive-ticket-system')?>:</b><br>
    36           <input class="wpsp_fullwidth" type="text" name="field_instructions" value="<?php echo $field->instructions;?>"/>   
     36          <input class="wpsp_fullwidth" type="text" name="field_instructions" value="<?php echo htmlspecialchars_decode( stripslashes($field->instructions));?>"/>   
    3737     </div>
    3838   
     
    145145    }
    146146       
    147         if( !error_flag && wpspjq('input[name=field_instructions]').val().trim() == '' ){
    148         wpspjq('#wpsp_popup_form_error p').text("<?php _e('Please enter Field Label!','wp-support-plus-responsive-ticket-system')?>");
    149         wpspjq('input[name=field_instructions]').val('');
    150         wpspjq('input[name=field_instructions]').focus();
    151         error_flag = true;
    152     }
    153    
    154147    if( !error_flag && wpspjq('select[name=field_type]').val().trim() == '' ){
    155148        wpspjq('#wpsp_popup_form_error p').text('<?php _e('Please choose Field Type!','wp-support-plus-responsive-ticket-system')?>');
  • wp-support-plus-responsive-ticket-system/trunk/includes/ajax/submit_ticket.php

    r1912105 r1918650  
    2828     * Check nonce
    2929     */
    30          $captcha_key =  isset($_COOKIE) && isset($_COOKIE['wpsp_secure_code']) ? intval($_COOKIE['wpsp_secure_code']) : 0;
    31 
    32          if( !isset($_POST['captcha_code']) || !wp_verify_nonce($_POST['captcha_code'],$captcha_key) ){
    33              die(__('Cheating huh?', 'wp-support-plus-responsive-ticket-system'));
     30         $cap=$wpsupportplus->functions-> toggle_button_disable_captcha();
     31         $user_id = $current_user->ID;
     32         $captcha=false;
     33         if($cap=='all'){
     34            $captcha=true; 
     35         }else if( !$user_id && $cap=='guest'){
     36            $captcha=true;
    3437         }
    35          setcookie('wpsp_secure_code','123');
    36 
     38         
     39         if($captcha){
     40                 $captcha_key =  isset($_COOKIE) && isset($_COOKIE['wpsp_secure_code']) ? intval($_COOKIE['wpsp_secure_code']) : 0;
     41
     42                 if( !isset($_POST['captcha_code']) || !wp_verify_nonce($_POST['captcha_code'],$captcha_key) ){
     43                     die(__('Cheating huh?', 'wp-support-plus-responsive-ticket-system'));
     44                 }
     45                 setcookie('wpsp_secure_code','123');
     46         }
    3747    /**
    3848     * If agent created is other than current user, don't allow
  • wp-support-plus-responsive-ticket-system/trunk/includes/class-wpsp-functions.php

    r1912105 r1918650  
    938938            if(is_numeric($key)){
    939939                $custom_fields_localize = get_option('wpsp_custom_fields_localize');
    940                                 return $custom_fields_localize['label_'.$key];
     940                                return htmlspecialchars_decode( stripslashes($custom_fields_localize['label_'.$key]));
    941941            } else {
    942942                $default_labels = array(
     
    15931593                        }
    15941594                }
     1595               
     1596                /**
     1597         * Enable/disable captcha
     1598         */
     1599                public function toggle_button_disable_captcha(){
     1600                   
     1601                     if( $this->general_settings_advanced && isset($this->general_settings_advanced['captcha_status']) )
     1602                        {
     1603                                return $this->general_settings_advanced['captcha_status'];
     1604                        }
     1605                        else
     1606                        {
     1607                             return 'all';
     1608                        }
     1609                }
    15951610        }
    15961611
  • wp-support-plus-responsive-ticket-system/trunk/readme.txt

    r1912105 r1918650  
    55Requires at least: 4.0
    66Tested up to: 4.9
    7 Stable tag: 9.0.9
     7Stable tag: 9.1.0
    88
    99== Description ==
     
    9595== Changelog ==
    9696
     97= V 9.1.0 =
     98* New Setting : Enable/Disable captcha
     99* Fix      : Unable reply bug for Russian language
     100
    97101= V 9.0.9 =
    98102* Enhahcement : Recapta for create ticket page
  • wp-support-plus-responsive-ticket-system/trunk/template/tickets/class-ticket-form.php

    r1912105 r1918650  
    138138                                                                if (!flag && wpspjq.inArray(file_extension, allowedExtension) == -1){
    139139                                                                        flag = true;
    140                                                                         alert("<?php _e("Only '.jpeg','.jpg', '.png', '.gif', '.bmp' formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
     140                                                                        alert("<?php _e("Only jpeg, jpg, png, gif, bmp formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
    141141                                                                }
    142142
     
    255255            <div data-field ="text" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    256256                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    257                                 <div class="wpsp_ct_custom_instruction"><small><?php echo $custom_field->instructions;?></small></div>
     257                                <div class="wpsp_ct_custom_instruction"><small><?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    258258                <input type="text" class="form-control" name="cust_<?php echo $field->field_key?>"/>
    259259            </div>
     
    275275            <div data-field ="drop-down" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    276276                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    277                                 <div class="wpsp_ct_custom_instruction"> <small> <?php echo $custom_field->instructions;?></small></div>
     277                                <div class="wpsp_ct_custom_instruction"> <small> <?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    278278                <select class="form-control" name="cust_<?php echo $field->field_key?>">
    279279                    <option value=""></option>
     
    304304            <div data-field ="checkbox" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    305305                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    306                 <div class="wpsp_ct_custom_instruction"> <small><?php echo $custom_field->instructions;?></small></div>
     306                <div class="wpsp_ct_custom_instruction"> <small><?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    307307               
    308308                                <?php
     
    336336            <div data-field ="radio-button" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    337337                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    338                 <div class="wpsp_ct_custom_instruction"> <small><?php echo $custom_field->instructions;?></small></div>
     338                <div class="wpsp_ct_custom_instruction"> <small><?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    339339                                               
    340340                                <?php
     
    385385            <div data-field ="date" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    386386                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    387                 <div class="wpsp_ct_custom_instruction"> <small><?php echo $custom_field->instructions;?></small></div>
     387                <div class="wpsp_ct_custom_instruction"> <small><?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    388388                                <input type="text" class="form-control wpsp_date" name="cust_<?php echo $field->field_key?>"/>
    389389            </div>
     
    404404            <div data-field ="url" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    405405                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    406                 <div class="wpsp_ct_custom_instruction"><small><?php echo $custom_field->instructions;?></small></div>
     406                <div class="wpsp_ct_custom_instruction"><small><?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small></div>
    407407                                <input type="text" class="form-control" name="cust_<?php echo $field->field_key?>"/>
    408408            </div>
     
    423423            <div data-field="attachment" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    424424                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    425                                 <div class="wpsp_ct_custom_instruction"><small> <?php echo $custom_field->instructions;?></small> </div>
     425                                <div class="wpsp_ct_custom_instruction"><small> <?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small> </div>
    426426                <fieldset id="cust_attachment_<?php echo $field->field_key?>" class="scheduler-border cust_attachment">
    427427                    <legend class="scheduler-border"> <?php _e('Attach Files', 'wp-support-plus-responsive-ticket-system')?> (<span onclick="cust_attach(this,<?php echo $field->field_key?>);" class="glyphicon glyphicon-plus attach_plus"></span>) </legend>
     
    445445            <div data-field ="email" id="cust_<?php echo $field->field_key?>" data-required="<?php echo $custom_field->required?>" class="form-group col-md-<?php echo ($field->full_width)?'12':'6'?> <?php echo $class?> ">
    446446                <label class="label label-default"><?php echo $wpsupportplus->functions->get_ticket_form_label($field->field_key)?></label>  <span style="<?php echo $custom_field->required ? '' : 'display:none;'?>" class="fa fa-snowflake-o"></span><br>
    447                                 <div class="wpsp_ct_custom_instruction"><small> <?php echo $custom_field->instructions;?></small> </div>                               
     447                                <div class="wpsp_ct_custom_instruction"><small> <?php echo htmlspecialchars_decode( stripslashes($custom_field->instructions));?></small> </div>                               
    448448                                <input type="text" class="form-control" name="cust_<?php echo $field->field_key?>"/>
    449449            </div>
  • wp-support-plus-responsive-ticket-system/trunk/template/tickets/create-ticket.php

    r1912105 r1918650  
    22if ( ! defined( 'ABSPATH' ) ) {
    33    exit; // Exit if accessed directly
     4}
     5
     6$cap=$wpsupportplus->functions-> toggle_button_disable_captcha();
     7$user_id = $current_user->ID;
     8$captcha=false;
     9if($cap=='all'){
     10    $captcha=true; 
     11}else if( !$user_id && $cap=='guest'){
     12    $captcha=true;
    413}
    514
     
    98107                        <?php
    99108                      }?>
    100                        
     109                        <?php if($captcha){?>
    101110                        <div class="col-sm-2 captcha_container" style="margin-bottom:10px; display:flex;clear:both;">
    102111                            <div style="width:25px;">
     
    106115                            <div><?php _e("I'm not a robot",'wp-support-plus-responsive-ticket-system')?></div>
    107116                        </div>
    108                        
     117                    <?php }?>
    109118            <input type="hidden" id="user_id" name="user_id" value="<?php echo $user_id?>" />
    110119            <input type="hidden" name="agent_created" value="<?php echo $current_user->ID?>" />
     
    180189    <?php
    181190}
     191?>
     192<script>
     193/**
     194 * Validate logged-In user create ticket form
     195 */
     196function validate_user_create_ticket(){
     197
     198    var flag = false;
     199    var errorMsg = '';
     200    var empty_labels = new Array();
     201
     202    wpspjq('.wpsp_require').each(function(){
     203
     204        var cust_field = wpspjq(this);
     205        switch(cust_field.attr('data-field')){
     206            case 'text' :
     207            case 'url' :
     208            case 'date' :
     209            case 'email': if(cust_field.find('input').val().trim() == '') empty_labels.push(cust_field.find('label').text());
     210                break;
     211            case 'drop-down': if(cust_field.find('select').val().trim() == '') empty_labels.push(cust_field.find('label').text());
     212                break;
     213            case 'tinymce':
     214                var editor_id = cust_field.find('textarea').attr('id');
     215                if(tinyMCE.get(editor_id).getContent().trim() == '') empty_labels.push(cust_field.find('label').text());
     216                break;
     217            case 'textarea':  if(cust_field.find('textarea').val().trim() == '') empty_labels.push(cust_field.find('label').text());
     218                break;
     219            case 'checkbox':
     220            case 'radio-button':
     221                var checked = false;
     222                cust_field.find('input').each(function(){
     223                    if(wpspjq(this).is(':checked')){
     224                        checked = true;
     225                        return;
     226                    }
     227                });
     228                if(!checked) empty_labels.push(cust_field.find('label').text());
     229                break;
     230            case 'attachment': if(cust_field.find('input').length == 0) empty_labels.push(cust_field.find('label').text());
     231                break;
     232        }
     233
     234    });
     235
     236    if(empty_labels.length){
     237        flag = true;
     238        errorMsg  = wpsp_data.lbl_enter_required+'\n\n- ';
     239        errorMsg += empty_labels.join('\n- ');
     240    }
     241
     242    if(!flag){
     243        var wrong_emails = new Array();
     244        wpspjq('div[data-field=email]').each(function(){
     245            var email = wpspjq(this).find('input').val().trim();
     246            if( email != '' && !validateEmail(email) ){
     247                wrong_emails.push(wpspjq(this).find('label').text());
     248            }
     249        });
     250        if(wrong_emails.length){
     251            flag = true;
     252            errorMsg  = wpsp_data.lbl_wrong_email+'\n\n- ';
     253            errorMsg += wrong_emails.join('\n- ');
     254        }
     255    }
     256
     257    if(!flag){
     258        var wrong_urls = new Array();
     259        wpspjq('div[data-field=url]').each(function(){
     260            var url = wpspjq(this).find('input').val().trim();
     261            if( url != '' && !validateURL(url) ){
     262                wrong_urls.push(wpspjq(this).find('label').text());
     263            }
     264        });
     265        if(wrong_urls.length){
     266            flag = true;
     267            errorMsg  = wpsp_data.lbl_wrong_url+'\n\n- ';
     268            errorMsg += wrong_urls.join('\n- ');
     269        }
     270    }
     271       
     272    <?php if($captcha){?>
     273    if(!flag){
     274      if (jQuery('#captcha_code').val().trim().length==0) {
     275            alert('Please confirm you are not a robot!');
     276        return false;
     277        }
     278    }
     279    <?php }?>
     280       
     281    if(!flag){
     282      wpspjq('#frm_create_ticket').hide();
     283      wpspjq('#wpsp-admin-popup-wait-load-thank').show();
     284        return true;
     285    } else {
     286        alert(errorMsg);
     287        return false;
     288    }
     289   
     290   
     291
     292}
     293</script>
  • wp-support-plus-responsive-ticket-system/trunk/template/tickets/open-ticket/class-threads-formatting.php

    r1912105 r1918650  
    584584                                                            if (!flag && wpspjq.inArray(file_extension, allowedExtension) == -1){
    585585                                                                    flag = true;
    586                                                                     alert("<?php _e("Only '.jpeg','.jpg', '.png', '.gif', '.bmp' formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
     586                                                                    alert("<?php _e("Only jpeg, jpg, png, gif, bmp formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
    587587                                                            }
    588588
     
    682682                                                            if (!flag && wpspjq.inArray(file_extension, allowedExtension) == -1){
    683683                                                                    flag = true;
    684                                                                     alert("<?php _e("Only '.jpeg','.jpg', '.png', '.gif', '.bmp' formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
     684                                                                    alert("<?php _e("Only jpeg, jpg, png, gif, bmp formats are allowed.",'wp-support-plus-responsive-ticket-system')?>");
    685685                                                            }
    686686
  • wp-support-plus-responsive-ticket-system/trunk/template/tickets/open-ticket/sidebar.php

    r1912105 r1918650  
    2424if($key=='ticket-status'){
    2525?>
    26 <div class="sidebar-module">
     26<div class="sidebar-module" id="tic_status_sidebar">
    2727
    2828    <h4>
     
    6060<?php if( $wpsupportplus->functions->cu_has_cap_ticket( $ticket, 'view_raised_by' ) ):?>
    6161
    62     <div class="sidebar-module">
     62    <div class="sidebar-module" id="tic_raisedby_sidebar">
    6363        <h4>
    6464            <?php _e('Raised By','wp-support-plus-responsive-ticket-system');?>
     
    138138<?php if( $wpsupportplus->functions->cu_has_cap_ticket( $ticket, 'view_assign_agent' ) ):?>
    139139
    140     <div class="sidebar-module">
     140    <div class="sidebar-module" id="tic_assign_agent_sidebar">
    141141        <h4>
    142142            <?php _e('Assigned Agents','wp-support-plus-responsive-ticket-system');?>
     
    243243<?php do_action( 'wpsp_after_agent_fields_sidebar_module', $ticket ,$key);?>
    244244 <?php if($key=='ticket-fields'){ ?>
    245 <div class="sidebar-module">
     245<div class="sidebar-module" id="tic_fields_sidebar">
    246246
    247247    <h4>
  • wp-support-plus-responsive-ticket-system/trunk/wp-support-plus.php

    r1912105 r1918650  
    44 * Plugin URI: https://wordpress.org/plugins/wp-support-plus-responsive-ticket-system
    55 * Description: Exceptional customer support solution for WordPress!
    6  * Version: 9.0.9
     6 * Version: 9.1.0
    77 * Author: Pradeep Makone
    88 * Author URI: https://www.wpsupportplus.com/
     
    2828         * WPSP version.
    2929         */
    30         public $version = '9.0.9';
     30        public $version = '9.1.0';
    3131
    3232        /**
Note: See TracChangeset for help on using the changeset viewer.