Contact Bank: WordPress Form Builder for Contact Forms - Version 1.6

Version Description

  • Widget Added
  • Database Bugs Fixed
  • Code Opimized
  • Css Issues Fixed
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 Contact Bank: WordPress Form Builder for Contact Forms
Version 1.6
Comparing to
See all releases

Code changes from version 1.5 to 1.6

contact-bank.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://wordpress.org/plugins/contact-bank/
5
  Description: Contact Bank allows you to add a feedback form easilly and simply to a post or a page.
6
  Author: contact-banker
7
- Version: 1.5
8
  Author URI: http://wordpress.org/plugins/contact-bank/
9
  */
10
 
@@ -623,4 +623,78 @@ register_activation_hook(__FILE__,'plugin_install_script_for_contact_bank');
623
  add_shortcode('contact_bank', 'contact_bank_short_code' );
624
  // Uninstall Hook called for function plugin_install_script_for_contact_bank
625
  register_uninstall_hook(__FILE__,'plugin_uninstall_script_for_contact_bank');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
  ?>
4
  Plugin URI: http://wordpress.org/plugins/contact-bank/
5
  Description: Contact Bank allows you to add a feedback form easilly and simply to a post or a page.
6
  Author: contact-banker
7
+ Version: 1.6
8
  Author URI: http://wordpress.org/plugins/contact-bank/
9
  */
10
 
623
  add_shortcode('contact_bank', 'contact_bank_short_code' );
624
  // Uninstall Hook called for function plugin_install_script_for_contact_bank
625
  register_uninstall_hook(__FILE__,'plugin_uninstall_script_for_contact_bank');
626
+ add_filter('widget_text', 'do_shortcode');
627
+ class Contact_Bank_Widget extends WP_Widget
628
+ {
629
+ function Contact_Bank_Widget()
630
+ {
631
+ $widget_ops = array('classname' => 'Contact_Bank_Widget', 'description' => 'Uses Contact Form' );
632
+ $this->WP_Widget('Contact_Bank_Widget', 'Contact Bank', $widget_ops);
633
+ }
634
+ function form($instance)
635
+ {
636
+ $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'form_id' => '0' ) );
637
+ $title = $instance['title'];
638
+ global $wpdb;
639
+ $form_data = $wpdb->get_results
640
+ (
641
+ $wpdb->prepare
642
+ (
643
+ "SELECT * FROM " .contact_bank_contact_form(),""
644
+ )
645
+ );
646
+ ?>
647
+ <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
648
+ <p><label for="<?php echo $this->get_field_id('form_id'); ?>"><?php _e('Select Form :', contact_bank); ?></label>
649
+ <select size="1" name="<?php echo $this->get_field_name('form_id'); ?>" id="<?php echo $this->get_field_id('form_id'); ?>" class="widefat">
650
+ <option value="0" ><?php _e('Select Form', contact_bank); ?></option>
651
+ <?php
652
+ if($form_data) {
653
+ foreach($form_data as $form) {
654
+ echo '<option value="'.$form->form_id.'" ';
655
+ if ($form->form_id == $instance['form_id']) echo "selected='selected' ";
656
+ echo '>'.stripslashes(html_entity_decode($form->form_name)).'</option>'."\n\t";
657
+ }
658
+ }
659
+ ?>
660
+ </select>
661
+ </p>
662
+ <?php
663
+ }
664
+ function update($new_instance, $old_instance)
665
+ {
666
+ $instance = $old_instance;
667
+ $instance['title'] = $new_instance['title'];
668
+ $instance['form_id'] = (int) $new_instance['form_id'];
669
+ return $instance;
670
+ }
671
+ function widget($args, $instance)
672
+ {
673
+ global $wpdb;
674
+ $form_data = $wpdb->get_var
675
+ (
676
+ $wpdb->prepare
677
+ (
678
+ "SELECT count(*) FROM " .contact_bank_contact_form() . " WHERE form_id = %d",
679
+ $instance['form_id']
680
+ )
681
+ );
682
+
683
+ extract($args, EXTR_SKIP);
684
+ echo $before_widget;
685
+ $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
686
+ if($form_data > 0)
687
+ {
688
+ if($instance['form_id'] != 0)
689
+ {
690
+ echo $before_title . $title . $after_title;
691
+ $shortcode_for_contact_bank_form = "[contact_bank form_id=" . $instance['form_id'] . "]";
692
+ echo do_shortcode( $shortcode_for_contact_bank_form );
693
+ echo $after_widget;
694
+ }
695
+ }
696
+ }
697
+ }
698
+ add_action( 'widgets_init', create_function('', 'return register_widget("Contact_Bank_Widget");') );
699
+
700
  ?>
includes/cb_checkbox.php CHANGED
@@ -120,12 +120,12 @@
120
  </div>
121
  </div>
122
  <div class="layout-control-group">
123
- <input type="button" class="btn btn-info layout-span2" onclick="save_checkbox_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
124
  </div>
125
  </div>
126
  <script type="text/javascript">
127
- array_option_id_chk["<?php echo $dynamicCount;?>"] = [];
128
- array_options_chk["<?php echo $dynamicCount;?>"] = [];
129
  jQuery(".hovertip").tooltip();
130
  function tabsFunc(control)
131
  {
@@ -160,25 +160,25 @@
160
  var count = <?php echo $count; ?>;
161
  if(count != 0)
162
  {
163
- var dynamicCount = "<?php echo $dynamicCount;?>";
164
  var dynamicId = <?php echo $dynamicId; ?>;
165
- if(array_controls[dynamicCount][5].cb_checkbox_option_id != "")
166
  {
167
- var optionId_str = array_controls[dynamicCount][5].cb_checkbox_option_id;
168
  var optionId = optionId_str.split(";");
169
- var option_value_str = array_controls[dynamicCount][6].cb_checkbox_option_val;
170
  var option_value = option_value_str.split(";");
171
  for(var flag = 0;flag <optionId.length ;flag++)
172
  {
173
  var options_dynamicId = optionId[flag];
174
  var add_chk_option = option_value[flag];
175
- array_option_id_chk[dynamicCount].push(parseInt(options_dynamicId));
176
- array_options_chk[dynamicCount].push(add_chk_option);
177
  jQuery("#append_chk_option_"+dynamicId).append('<div class="layout-control-group" id="selected_item_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" value="'+add_chk_option+'" id="input_type_'+options_dynamicId+'"><a style="padding-left:2px;" onclick="delete_chk('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
178
  }
179
  }
180
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
181
- if(array_controls[dynamicCount][3].cb_control_required == "1")
182
  {
183
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
184
  }
@@ -186,39 +186,39 @@
186
  {
187
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
188
  }
189
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][4].cb_tooltip_txt);
190
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][7].cb_admin_label);
191
- if(array_controls[dynamicCount][8].cb_show_email == "1")
192
  {
193
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
194
  }
195
- if(array_controls[dynamicCount][9].cb_button_set_outer_label != "")
196
  {
197
- jQuery("#button_set_outer_label_chk_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_outer_label);
198
  jQuery("#show_data_label_tr_chk_"+dynamicId).attr("style","display:block");
199
  jQuery("#show_data_label_tr_chk_"+dynamicId).attr("style","position:inherit");
200
  }
201
- if(array_controls[dynamicCount][10].cb_button_set_description != "")
202
  {
203
- jQuery("#ux_description_textarea_chk_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_description);
204
  jQuery("#show_data_description_tr_chk_"+dynamicId).attr("style","display:block");
205
  jQuery("#show_data_description_tr_chk_"+dynamicId).attr("style","position:inherit");
206
  }
207
- if(array_controls[dynamicCount][11].cb_button_set_options_outer_wrapper != "")
208
  {
209
- jQuery("#ux_button_options_outer_wrapper_chk_"+dynamicId).html(array_controls[dynamicCount][11].cb_button_set_options_outer_wrapper);
210
  jQuery("#show_data_option_outer_wrapper_tr_chk_"+dynamicId).attr("style","display:block");
211
  jQuery("#show_data_option_outer_wrapper_tr_chk_"+dynamicId).attr("style","position:inherit");
212
  }
213
- if(array_controls[dynamicCount][12].cb_button_set_options_wrapper != "")
214
  {
215
- jQuery("#ux_button_option_wrapper_chk_"+dynamicId).html(array_controls[dynamicCount][12].cb_button_set_options_wrapper);
216
  jQuery("#show_data_option_wrapper_tr_chk_"+dynamicId).attr("style","display:block");
217
  jQuery("#show_data_option_wrapper_tr_chk_"+dynamicId).attr("style","position:inherit");
218
  }
219
- if(array_controls[dynamicCount][13].cb_button_set_options_label != "")
220
  {
221
- jQuery("#ux_button_option_label_chk_"+dynamicId).html(array_controls[dynamicCount][13].cb_button_set_options_label);
222
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","display:block");
223
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","position:inherit");
224
  }
@@ -233,8 +233,8 @@
233
  else
234
  {
235
  var options_dynamicId = Math.floor((Math.random() * 10000)+1);
236
- array_options_chk[dynamicCount].push(add_chk_options);
237
- array_option_id_chk[dynamicCount].push(options_dynamicId);
238
  jQuery("#append_chk_option_"+dynamicId).append('<div class="layout-control-group" id="selected_item_'+options_dynamicId+'"><div class="layout-controls"><input type= "text" class="layout-span8" value="'+add_chk_options+'" id="input_type_'+options_dynamicId+'"><a style="padding-left:2px;" onclick="delete_chk('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
239
  jQuery("#chk_options_"+dynamicId).val("");
240
  }
@@ -243,12 +243,12 @@
243
  {
244
  var ux_value = jQuery("#input_type_"+options_dynamicId).val();
245
  jQuery("#selected_item_"+options_dynamicId).remove();
246
- var place_of_option_in_array_id = jQuery.inArray(parseInt(options_dynamicId),array_option_id_chk[dynamicCount]);
247
 
248
  if(place_of_option_in_array_id != -1)
249
  {
250
- array_option_id_chk[dynamicCount].splice(place_of_option_in_array_id,1);
251
- array_options_chk[dynamicCount].splice(place_of_option_in_array_id,1);
252
  }
253
  }
254
  function button_set_outer_label_chk(dynamicId)
@@ -301,9 +301,9 @@
301
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","display:none");
302
  jQuery("#ux_button_option_label_chk_"+dynamicId).val("");
303
  }
304
- function save_checkbox_control(dynamicId)
305
  {
306
- var dynamicCount = "<?php echo $dynamicCount;?>";
307
  array_controls[dynamicCount] = [];
308
  array_controls[dynamicCount].push({"control_type" : "5"});
309
  array_controls[dynamicCount].push({"checkbox_dynamicId" : dynamicId});
@@ -356,6 +356,8 @@
356
  {
357
  jQuery("#txt_required_"+dynamicId).css("display","none");
358
  }
 
 
359
  CloseLightbox();
360
  }
361
  function enter_admin_label(dynamicId)
120
  </div>
121
  </div>
122
  <div class="layout-control-group">
123
+ <input type="button" class="btn btn-info layout-span2" onclick="save_checkbox_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
124
  </div>
125
  </div>
126
  <script type="text/javascript">
127
+ array_option_id_chk[<?php echo $dynamicCount;?>] = [];
128
+ array_options_chk[<?php echo $dynamicCount;?>] = [];
129
  jQuery(".hovertip").tooltip();
130
  function tabsFunc(control)
131
  {
160
  var count = <?php echo $count; ?>;
161
  if(count != 0)
162
  {
163
+
164
  var dynamicId = <?php echo $dynamicId; ?>;
165
+ if(array_controls[<?php echo $dynamicCount;?>][5].cb_checkbox_option_id != "")
166
  {
167
+ var optionId_str = array_controls[<?php echo $dynamicCount;?>][5].cb_checkbox_option_id;
168
  var optionId = optionId_str.split(";");
169
+ var option_value_str = array_controls[<?php echo $dynamicCount;?>][6].cb_checkbox_option_val;
170
  var option_value = option_value_str.split(";");
171
  for(var flag = 0;flag <optionId.length ;flag++)
172
  {
173
  var options_dynamicId = optionId[flag];
174
  var add_chk_option = option_value[flag];
175
+ array_option_id_chk[<?php echo $dynamicCount;?>].push(parseInt(options_dynamicId));
176
+ array_options_chk[<?php echo $dynamicCount;?>].push(add_chk_option);
177
  jQuery("#append_chk_option_"+dynamicId).append('<div class="layout-control-group" id="selected_item_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" value="'+add_chk_option+'" id="input_type_'+options_dynamicId+'"><a style="padding-left:2px;" onclick="delete_chk('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
178
  }
179
  }
180
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
181
+ if(array_controls[<?php echo $dynamicCount;?>][3].cb_control_required == "1")
182
  {
183
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
184
  }
186
  {
187
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
188
  }
189
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][4].cb_tooltip_txt);
190
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][7].cb_admin_label);
191
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_show_email == "1")
192
  {
193
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
194
  }
195
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label != "")
196
  {
197
+ jQuery("#button_set_outer_label_chk_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label);
198
  jQuery("#show_data_label_tr_chk_"+dynamicId).attr("style","display:block");
199
  jQuery("#show_data_label_tr_chk_"+dynamicId).attr("style","position:inherit");
200
  }
201
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_description != "")
202
  {
203
+ jQuery("#ux_description_textarea_chk_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_description);
204
  jQuery("#show_data_description_tr_chk_"+dynamicId).attr("style","display:block");
205
  jQuery("#show_data_description_tr_chk_"+dynamicId).attr("style","position:inherit");
206
  }
207
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_options_outer_wrapper != "")
208
  {
209
+ jQuery("#ux_button_options_outer_wrapper_chk_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_options_outer_wrapper);
210
  jQuery("#show_data_option_outer_wrapper_tr_chk_"+dynamicId).attr("style","display:block");
211
  jQuery("#show_data_option_outer_wrapper_tr_chk_"+dynamicId).attr("style","position:inherit");
212
  }
213
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_options_wrapper != "")
214
  {
215
+ jQuery("#ux_button_option_wrapper_chk_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_options_wrapper);
216
  jQuery("#show_data_option_wrapper_tr_chk_"+dynamicId).attr("style","display:block");
217
  jQuery("#show_data_option_wrapper_tr_chk_"+dynamicId).attr("style","position:inherit");
218
  }
219
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_options_label != "")
220
  {
221
+ jQuery("#ux_button_option_label_chk_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_options_label);
222
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","display:block");
223
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","position:inherit");
224
  }
233
  else
234
  {
235
  var options_dynamicId = Math.floor((Math.random() * 10000)+1);
236
+ array_options_chk[<?php echo $dynamicCount;?>].push(add_chk_options);
237
+ array_option_id_chk[<?php echo $dynamicCount;?>].push(options_dynamicId);
238
  jQuery("#append_chk_option_"+dynamicId).append('<div class="layout-control-group" id="selected_item_'+options_dynamicId+'"><div class="layout-controls"><input type= "text" class="layout-span8" value="'+add_chk_options+'" id="input_type_'+options_dynamicId+'"><a style="padding-left:2px;" onclick="delete_chk('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
239
  jQuery("#chk_options_"+dynamicId).val("");
240
  }
243
  {
244
  var ux_value = jQuery("#input_type_"+options_dynamicId).val();
245
  jQuery("#selected_item_"+options_dynamicId).remove();
246
+ var place_of_option_in_array_id = jQuery.inArray(parseInt(options_dynamicId),array_option_id_chk[<?php echo $dynamicCount;?>]);
247
 
248
  if(place_of_option_in_array_id != -1)
249
  {
250
+ array_option_id_chk[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
251
+ array_options_chk[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
252
  }
253
  }
254
  function button_set_outer_label_chk(dynamicId)
301
  jQuery("#show_data_option_label_tr_chk_"+dynamicId).attr("style","display:none");
302
  jQuery("#ux_button_option_label_chk_"+dynamicId).val("");
303
  }
304
+ function save_checkbox_control(dynamicId,dynamicCount)
305
  {
306
+
307
  array_controls[dynamicCount] = [];
308
  array_controls[dynamicCount].push({"control_type" : "5"});
309
  array_controls[dynamicCount].push({"checkbox_dynamicId" : dynamicId});
356
  {
357
  jQuery("#txt_required_"+dynamicId).css("display","none");
358
  }
359
+ //console.log("pushed control : 5, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
360
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
361
  CloseLightbox();
362
  }
363
  function enter_admin_label(dynamicId)
includes/cb_date.php CHANGED
@@ -175,7 +175,7 @@
175
  </div>
176
  </div>
177
  <div class="layout-control-group">
178
- <input type="button" class="btn btn-info layout-span2" onclick="save_date_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
179
  </div>
180
  </div>
181
  <script type="text/javascript">
@@ -365,11 +365,11 @@
365
  var count = <?php echo $count; ?>;
366
  if(count != 0)
367
  {
368
- var dynamicCount = "<?php echo $dynamicCount;?>";
369
  var dynamicId = <?php echo $dynamicId; ?>;
370
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
371
- jQuery("#ux_description_control_"+dynamicId).html(array_controls[dynamicCount][3].cb_description);
372
- if(array_controls[dynamicCount][4].cb_control_required == "1")
373
  {
374
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
375
  }
@@ -377,60 +377,60 @@
377
  {
378
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
379
  }
380
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
381
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][6].cb_admin_label);
382
 
383
- if(array_controls[dynamicCount][7].cb_show_email == "1")
384
  {
385
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
386
  }
387
- jQuery("#ux_start_year_label_"+dynamicId).val(array_controls[dynamicCount][8].cb_start_year);
388
- jQuery("#ux_last_year_label_"+dynamicId).val(array_controls[dynamicCount][9].cb_end_year);
389
- jQuery("#ux_default_day_type_"+dynamicId).val(array_controls[dynamicCount][10].cb_default_value_day);
390
- jQuery("#ux_default_month_type_"+dynamicId).val(array_controls[dynamicCount][11].cb_default_value_month);
391
- jQuery("#ux_default_year_type_"+dynamicId).val(array_controls[dynamicCount][12].cb_default_value_year);
392
- jQuery("#ux_last_"+dynamicId).val(array_controls[dynamicCount][13].cb_error_invalid);
393
- jQuery("#uxDefaultDateFormat_"+dynamicId).val(array_controls[dynamicCount][14].cb_date_format);
394
- if(array_controls[dynamicCount][15].cb_button_set_outer_label != "")
395
  {
396
- jQuery("#ux_date_set_outer_label_"+dynamicId).html(array_controls[dynamicCount][15].cb_button_set_outer_label);
397
  jQuery("#ux_advance_label_"+dynamicId).attr("style","display:block");
398
  jQuery("#ux_advance_label_"+dynamicId).attr("style","position:inherit");
399
  }
400
- if(array_controls[dynamicCount][16].cb_button_set_txt_input != "")
401
  {
402
- jQuery("#ux_date_txt_input_"+dynamicId).html(array_controls[dynamicCount][16].cb_button_set_txt_input);
403
  jQuery("#advance_text_input_"+dynamicId).attr("style","display:block");
404
  jQuery("#advance_text_input_"+dynamicId).attr("style","position:inherit");
405
  }
406
- if(array_controls[dynamicCount][17].cb_button_set_description != "")
407
  {
408
- jQuery("#ux_date_description_textarea_"+dynamicId).html(array_controls[dynamicCount][17].cb_button_set_description);
409
  jQuery("#advance_text_description_"+dynamicId).attr("style","display:block");
410
  jQuery("#advance_text_description_"+dynamicId).attr("style","position:inherit");
411
  }
412
- if(array_controls[dynamicCount][18].cb_date_day_dropdown != "")
413
  {
414
- jQuery("#ux_day_textarea_"+dynamicId).html(array_controls[dynamicCount][18].cb_date_day_dropdown);
415
  jQuery("#ux_advance_day_"+dynamicId).attr("style","display:block");
416
  jQuery("#ux_advance_day_"+dynamicId).attr("style","position:inherit");
417
  }
418
- if(array_controls[dynamicCount][19].cb_date_month_dropdown != "")
419
  {
420
- jQuery("#ux_month_textarea_"+dynamicId).html(array_controls[dynamicCount][19].cb_date_month_dropdown);
421
  jQuery("#advance_text_month_"+dynamicId).attr("style","display:block");
422
  jQuery("#advance_text_month_"+dynamicId).attr("style","position:inherit");
423
  }
424
- if(array_controls[dynamicCount][20].cb_date_year_dropdown != "")
425
  {
426
- jQuery("#ux_year_textarea_"+dynamicId).html(array_controls[dynamicCount][20].cb_date_year_dropdown);
427
  jQuery("#advance_text_year_"+dynamicId).attr("style","display:block");
428
  jQuery("#advance_text_year_"+dynamicId).attr("style","position:inherit");
429
  }
430
  }
431
- function save_date_control(dynamicId)
432
  {
433
- var dynamicCount = "<?php echo $dynamicCount;?>";
434
  array_controls[dynamicCount] = [];
435
  array_controls[dynamicCount].push({"control_type" : "12"});
436
  array_controls[dynamicCount].push({"date_dynamicId" : dynamicId});
@@ -467,6 +467,8 @@
467
  jQuery("#txt_required_"+dynamicId).css("display","none");
468
  }
469
  jQuery("#ux_ddl_select_year_"+dynamicId).val(jQuery("#ux_default_year_type_"+dynamicId).val());
 
 
470
  CloseLightbox();
471
  }
472
  function enter_admin_label(dynamicId)
175
  </div>
176
  </div>
177
  <div class="layout-control-group">
178
+ <input type="button" class="btn btn-info layout-span2" onclick="save_date_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
179
  </div>
180
  </div>
181
  <script type="text/javascript">
365
  var count = <?php echo $count; ?>;
366
  if(count != 0)
367
  {
368
+
369
  var dynamicId = <?php echo $dynamicId; ?>;
370
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
371
+ jQuery("#ux_description_control_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
372
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
373
  {
374
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
375
  }
377
  {
378
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
379
  }
380
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
381
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_admin_label);
382
 
383
+ if(array_controls[<?php echo $dynamicCount;?>][7].cb_show_email == "1")
384
  {
385
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
386
  }
387
+ jQuery("#ux_start_year_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][8].cb_start_year);
388
+ jQuery("#ux_last_year_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][9].cb_end_year);
389
+ jQuery("#ux_default_day_type_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][10].cb_default_value_day);
390
+ jQuery("#ux_default_month_type_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][11].cb_default_value_month);
391
+ jQuery("#ux_default_year_type_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][12].cb_default_value_year);
392
+ jQuery("#ux_last_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][13].cb_error_invalid);
393
+ jQuery("#uxDefaultDateFormat_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][14].cb_date_format);
394
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_button_set_outer_label != "")
395
  {
396
+ jQuery("#ux_date_set_outer_label_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][15].cb_button_set_outer_label);
397
  jQuery("#ux_advance_label_"+dynamicId).attr("style","display:block");
398
  jQuery("#ux_advance_label_"+dynamicId).attr("style","position:inherit");
399
  }
400
+ if(array_controls[<?php echo $dynamicCount;?>][16].cb_button_set_txt_input != "")
401
  {
402
+ jQuery("#ux_date_txt_input_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][16].cb_button_set_txt_input);
403
  jQuery("#advance_text_input_"+dynamicId).attr("style","display:block");
404
  jQuery("#advance_text_input_"+dynamicId).attr("style","position:inherit");
405
  }
406
+ if(array_controls[<?php echo $dynamicCount;?>][17].cb_button_set_description != "")
407
  {
408
+ jQuery("#ux_date_description_textarea_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][17].cb_button_set_description);
409
  jQuery("#advance_text_description_"+dynamicId).attr("style","display:block");
410
  jQuery("#advance_text_description_"+dynamicId).attr("style","position:inherit");
411
  }
412
+ if(array_controls[<?php echo $dynamicCount;?>][18].cb_date_day_dropdown != "")
413
  {
414
+ jQuery("#ux_day_textarea_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][18].cb_date_day_dropdown);
415
  jQuery("#ux_advance_day_"+dynamicId).attr("style","display:block");
416
  jQuery("#ux_advance_day_"+dynamicId).attr("style","position:inherit");
417
  }
418
+ if(array_controls[<?php echo $dynamicCount;?>][19].cb_date_month_dropdown != "")
419
  {
420
+ jQuery("#ux_month_textarea_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][19].cb_date_month_dropdown);
421
  jQuery("#advance_text_month_"+dynamicId).attr("style","display:block");
422
  jQuery("#advance_text_month_"+dynamicId).attr("style","position:inherit");
423
  }
424
+ if(array_controls[<?php echo $dynamicCount;?>][20].cb_date_year_dropdown != "")
425
  {
426
+ jQuery("#ux_year_textarea_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][20].cb_date_year_dropdown);
427
  jQuery("#advance_text_year_"+dynamicId).attr("style","display:block");
428
  jQuery("#advance_text_year_"+dynamicId).attr("style","position:inherit");
429
  }
430
  }
431
+ function save_date_control(dynamicId,dynamicCount)
432
  {
433
+
434
  array_controls[dynamicCount] = [];
435
  array_controls[dynamicCount].push({"control_type" : "12"});
436
  array_controls[dynamicCount].push({"date_dynamicId" : dynamicId});
467
  jQuery("#txt_required_"+dynamicId).css("display","none");
468
  }
469
  jQuery("#ux_ddl_select_year_"+dynamicId).val(jQuery("#ux_default_year_type_"+dynamicId).val());
470
+ //console.log("pushed control : 12, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
471
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
472
  CloseLightbox();
473
  }
474
  function enter_admin_label(dynamicId)
includes/cb_dropdown.php CHANGED
@@ -104,13 +104,13 @@
104
  </div>
105
  </div>
106
  <div class="layout-control-group">
107
- <input type="button" class="btn btn-info layout-span2" onclick="save_dropdownlist_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
108
  </div>
109
  </div>
110
  <script type="text/javascript">
111
 
112
- array_option_id_dropdown["<?php echo $dynamicCount;?>"] = [];
113
- array_options_dropdown["<?php echo $dynamicCount;?>"] = [];
114
  jQuery(".hovertip").tooltip();
115
  function tabsFunc(control)
116
  {
@@ -186,25 +186,25 @@
186
  var count = <?php echo $count; ?>;
187
  if(count != 0)
188
  {
189
- var dynamicCount = "<?php echo $dynamicCount;?>";
190
  var dynamicId = <?php echo $dynamicId; ?>;
191
- if(array_controls[dynamicCount][5].cb_dropdown_option_id != "")
192
  {
193
- var optionId_str = array_controls[dynamicCount][5].cb_dropdown_option_id;
194
  var optionId = optionId_str.split(";");
195
- var option_value_str = array_controls[dynamicCount][6].cb_dropdown_option_val;
196
  var option_value = option_value_str.split(";");
197
  for(var flag = 0;flag <optionId.length ;flag++)
198
  {
199
  var optionsId = optionId[flag];
200
  var ddl_options = option_value[flag];
201
- array_options_dropdown[dynamicCount].push(ddl_options);
202
- array_option_id_dropdown[dynamicCount].push(parseInt(optionsId));
203
  jQuery("#dropdown_ddl_option_"+dynamicId).append('<div class="layout-control-group" id="input_option_tr_'+optionsId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+optionsId+'" name="input_option_'+optionsId+'" value="'+ddl_options+'" /><a style="padding-left:2px;" onclick="delete_ddl_option('+optionsId+','+dynamicId+')" ><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
204
  }
205
  }
206
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
207
- if(array_controls[dynamicCount][3].cb_control_required == 1)
208
  {
209
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
210
  }
@@ -212,33 +212,34 @@
212
  {
213
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
214
  }
215
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][4].cb_tooltip_txt);
216
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][7].cb_admin_label);
217
- if(array_controls[dynamicCount][8].cb_show_email == true)
218
  {
219
  jQuery("#ux_email_"+dynamicId).attr("checked","checked");
220
  }
221
- if(array_controls[dynamicCount][9].cb_button_set_outer_label != "")
222
  {
223
- jQuery("#button_set_outer_label_ddl_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_outer_label);
224
  jQuery("#show_data_label_tr_ddl_"+dynamicId).attr("style","display:block");
225
  jQuery("#show_data_label_tr_ddl_"+dynamicId).attr("style","position:inherit");
226
  }
227
- if(array_controls[dynamicCount][10].cb_button_set_dropdown_menu != "")
228
  {
229
- jQuery("#ux_dropdown_menu_textarea_ddl_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_dropdown_menu);
230
  jQuery("#show_data_dropdown_menu_tr_ddl_"+dynamicId).attr("style","display:block");
231
  jQuery("#show_data_dropdown_menu_tr_ddl_"+dynamicId).attr("style","position:inherit");
232
  }
233
- if(array_controls[dynamicCount][11].cb_button_set_description != "")
234
  {
235
- jQuery("#ux_description_textarea_ddl_"+dynamicId).html(array_controls[dynamicCount][11].cb_button_set_description);
236
  jQuery("#show_data_description_tr_ddl_"+dynamicId).attr("style","display:block");
237
  jQuery("#show_data_description_tr_ddl_"+dynamicId).attr("style","position:inherit");
238
  }
239
  }
240
  function add_ddl_options(dynamicId)
241
  {
 
242
  var ddl_options = jQuery("#ddl_options_"+dynamicId).val();
243
  if(ddl_options=="")
244
  {
@@ -251,8 +252,8 @@
251
  jQuery("#dropdown_ddl_option_"+dynamicId).append('<div class="layout-control-group" id="input_option_tr_'+optionsId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+optionsId+'" name="input_option_'+optionsId+'" value="'+ddl_options+'"/><a style="padding-left:2px;" onclick="delete_ddl_option('+optionsId+','+dynamicId+')" ><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
252
  jQuery("#ddl_options_"+dynamicId).val("");
253
 
254
- array_option_id_dropdown[dynamicCount].push(optionsId);
255
- array_options_dropdown[dynamicCount].push(ddl_options);
256
  }
257
  }
258
  function delete_ddl_option(optionsId,dynamicId)
@@ -261,12 +262,12 @@
261
 
262
  jQuery("#input_option_tr_"+optionsId).remove("");
263
 
264
- var place_of_option_in_array_id = jQuery.inArray(parseInt(optionsId),array_option_id_dropdown[dynamicCount]);
265
 
266
  if(place_of_option_in_array_id != -1)
267
  {
268
- array_options_dropdown[dynamicCount].splice(place_of_option_in_array_id,1);
269
- array_option_id_dropdown[dynamicCount].splice(place_of_option_in_array_id,1);
270
  }
271
  }
272
  function change_label_drop(optionsId)
@@ -274,9 +275,9 @@
274
  var lable_value = jQuery("#input_option_"+optionsId).val();
275
  jQuery("#option_tr_"+optionsId).html(lable_value);
276
  }
277
- function save_dropdownlist_control(dynamicId)
278
  {
279
- var dynamicCount = "<?php echo $dynamicCount;?>";
280
  array_controls[dynamicCount] = [];
281
  array_controls[dynamicCount].push({"control_type" : "4"});
282
  array_controls[dynamicCount].push({"dropdown_dynamicId" : dynamicId});
@@ -323,6 +324,8 @@
323
  {
324
  jQuery("#txt_required_"+dynamicId).css("display","none");
325
  }
 
 
326
  CloseLightbox();
327
  }
328
  function enter_admin_label(dynamicId)
104
  </div>
105
  </div>
106
  <div class="layout-control-group">
107
+ <input type="button" class="btn btn-info layout-span2" onclick="save_dropdownlist_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
108
  </div>
109
  </div>
110
  <script type="text/javascript">
111
 
112
+ array_option_id_dropdown[<?php echo $dynamicCount;?>] = [];
113
+ array_options_dropdown[<?php echo $dynamicCount;?>] = [];
114
  jQuery(".hovertip").tooltip();
115
  function tabsFunc(control)
116
  {
186
  var count = <?php echo $count; ?>;
187
  if(count != 0)
188
  {
189
+
190
  var dynamicId = <?php echo $dynamicId; ?>;
191
+ if(array_controls[<?php echo $dynamicCount;?>][5].cb_dropdown_option_id != "")
192
  {
193
+ var optionId_str = array_controls[<?php echo $dynamicCount;?>][5].cb_dropdown_option_id;
194
  var optionId = optionId_str.split(";");
195
+ var option_value_str = array_controls[<?php echo $dynamicCount;?>][6].cb_dropdown_option_val;
196
  var option_value = option_value_str.split(";");
197
  for(var flag = 0;flag <optionId.length ;flag++)
198
  {
199
  var optionsId = optionId[flag];
200
  var ddl_options = option_value[flag];
201
+ array_options_dropdown[<?php echo $dynamicCount;?>].push(ddl_options);
202
+ array_option_id_dropdown[<?php echo $dynamicCount;?>].push(parseInt(optionsId));
203
  jQuery("#dropdown_ddl_option_"+dynamicId).append('<div class="layout-control-group" id="input_option_tr_'+optionsId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+optionsId+'" name="input_option_'+optionsId+'" value="'+ddl_options+'" /><a style="padding-left:2px;" onclick="delete_ddl_option('+optionsId+','+dynamicId+')" ><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
204
  }
205
  }
206
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
207
+ if(array_controls[<?php echo $dynamicCount;?>][3].cb_control_required == 1)
208
  {
209
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
210
  }
212
  {
213
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
214
  }
215
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][4].cb_tooltip_txt);
216
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][7].cb_admin_label);
217
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_show_email == "1")
218
  {
219
  jQuery("#ux_email_"+dynamicId).attr("checked","checked");
220
  }
221
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label != "")
222
  {
223
+ jQuery("#button_set_outer_label_ddl_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label);
224
  jQuery("#show_data_label_tr_ddl_"+dynamicId).attr("style","display:block");
225
  jQuery("#show_data_label_tr_ddl_"+dynamicId).attr("style","position:inherit");
226
  }
227
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_dropdown_menu != "")
228
  {
229
+ jQuery("#ux_dropdown_menu_textarea_ddl_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_dropdown_menu);
230
  jQuery("#show_data_dropdown_menu_tr_ddl_"+dynamicId).attr("style","display:block");
231
  jQuery("#show_data_dropdown_menu_tr_ddl_"+dynamicId).attr("style","position:inherit");
232
  }
233
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_description != "")
234
  {
235
+ jQuery("#ux_description_textarea_ddl_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_description);
236
  jQuery("#show_data_description_tr_ddl_"+dynamicId).attr("style","display:block");
237
  jQuery("#show_data_description_tr_ddl_"+dynamicId).attr("style","position:inherit");
238
  }
239
  }
240
  function add_ddl_options(dynamicId)
241
  {
242
+
243
  var ddl_options = jQuery("#ddl_options_"+dynamicId).val();
244
  if(ddl_options=="")
245
  {
252
  jQuery("#dropdown_ddl_option_"+dynamicId).append('<div class="layout-control-group" id="input_option_tr_'+optionsId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+optionsId+'" name="input_option_'+optionsId+'" value="'+ddl_options+'"/><a style="padding-left:2px;" onclick="delete_ddl_option('+optionsId+','+dynamicId+')" ><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
253
  jQuery("#ddl_options_"+dynamicId).val("");
254
 
255
+ array_option_id_dropdown[<?php echo $dynamicCount;?>].push(optionsId);
256
+ array_options_dropdown[<?php echo $dynamicCount;?>].push(ddl_options);
257
  }
258
  }
259
  function delete_ddl_option(optionsId,dynamicId)
262
 
263
  jQuery("#input_option_tr_"+optionsId).remove("");
264
 
265
+ var place_of_option_in_array_id = jQuery.inArray(parseInt(optionsId),array_option_id_dropdown[<?php echo $dynamicCount;?>]);
266
 
267
  if(place_of_option_in_array_id != -1)
268
  {
269
+ array_options_dropdown[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
270
+ array_option_id_dropdown[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
271
  }
272
  }
273
  function change_label_drop(optionsId)
275
  var lable_value = jQuery("#input_option_"+optionsId).val();
276
  jQuery("#option_tr_"+optionsId).html(lable_value);
277
  }
278
+ function save_dropdownlist_control(dynamicId,dynamicCount)
279
  {
280
+
281
  array_controls[dynamicCount] = [];
282
  array_controls[dynamicCount].push({"control_type" : "4"});
283
  array_controls[dynamicCount].push({"dropdown_dynamicId" : dynamicId});
324
  {
325
  jQuery("#txt_required_"+dynamicId).css("display","none");
326
  }
327
+ //console.log("pushed control : 4, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
328
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
329
  CloseLightbox();
330
  }
331
  function enter_admin_label(dynamicId)
includes/cb_email.php CHANGED
@@ -111,7 +111,7 @@
111
  </div>
112
  </div>
113
  <div class="layout-control-group">
114
- <input type="button" class="btn btn-info layout-span2" onclick="save_email_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
115
  </div>
116
  </div>
117
  <script type="text/javascript">
@@ -179,11 +179,11 @@
179
  var count = <?php echo $count; ?>;
180
  if(count != 0)
181
  {
182
- var dynamicCount = "<?php echo $dynamicCount;?>";
183
  var dynamicId = <?php echo $dynamicId; ?>;
184
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
185
- jQuery("#ux_description_control_"+dynamicId).html(array_controls[dynamicCount][3].cb_description);
186
- if(array_controls[dynamicCount][4].cb_control_required == "1")
187
  {
188
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
189
  }
@@ -191,54 +191,54 @@
191
  {
192
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
193
  }
194
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
195
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][6].cb_admin_label);
196
- if(array_controls[dynamicCount][7].cb_show_email == "1")
197
  {
198
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
199
  }
200
- if(array_controls[dynamicCount][8].cb_button_set_outer_label != "")
201
  {
202
- jQuery("#ux_email_set_outer_label_"+dynamicId).html(array_controls[dynamicCount][8].cb_button_set_outer_label);
203
  jQuery("#ux_advance_label_"+dynamicId).attr("style","display:block");
204
  jQuery("#ux_advance_label_"+dynamicId).attr("style","position:inherit");
205
  }
206
- if(array_controls[dynamicCount][9].cb_button_set_txt_input != "")
207
  {
208
- jQuery("#ux_email_txt_input_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_txt_input);
209
  jQuery("#advance_text_input_"+dynamicId).attr("style","display:block");
210
  jQuery("#advance_text_input_"+dynamicId).attr("style","position:inherit");
211
  }
212
- if(array_controls[dynamicCount][10].cb_button_set_txt_description != "")
213
  {
214
- jQuery("#ux_email_description_textarea_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_txt_description);
215
  jQuery("#advance_text_description_"+dynamicId).attr("style","display:block");
216
  jQuery("#advance_text_description_"+dynamicId).attr("style","position:inherit");
217
  }
218
- if(array_controls[dynamicCount][11].cb_checkbox_alpha_filter == "1")
219
  {
220
  jQuery("#ux_email_alpha_filter_"+dynamicId).attr("checked","checked");
221
  }
222
- if(array_controls[dynamicCount][12].cb_ux_checkbox_alpha_num_filter == "1")
223
  {
224
  jQuery("#ux_email_alpha_num_filter_"+dynamicId).attr("checked","checked");
225
  }
226
- if(array_controls[dynamicCount][13].cb_checkbox_digit_filter == "1")
227
  {
228
  jQuery("#ux_email_digit_filter_"+dynamicId).attr("checked","checked");
229
  }
230
- if(array_controls[dynamicCount][14].cb_checkbox_strip_tag_filter == "1")
231
  {
232
  jQuery("#ux_email_strip_tag_filter_"+dynamicId).attr("checked","checked");
233
  }
234
- if(array_controls[dynamicCount][15].cb_checkbox_trim_filter == "1")
235
  {
236
  jQuery("#ux_email_trim_filter_"+dynamicId).attr("checked","checked");
237
  }
238
  }
239
- function save_email_control(dynamicId)
240
  {
241
- var dynamicCount = "<?php echo $dynamicCount;?>";
242
  array_controls[dynamicCount] = [];
243
  array_controls[dynamicCount].push({"control_type" : 3});
244
  array_controls[dynamicCount].push({"email_dynamicId" : dynamicId});
@@ -267,6 +267,8 @@
267
  {
268
  jQuery("#txt_required_"+dynamicId).css("display","none");
269
  }
 
 
270
  CloseLightbox();
271
  }
272
  function enter_admin_label(dynamicId)
111
  </div>
112
  </div>
113
  <div class="layout-control-group">
114
+ <input type="button" class="btn btn-info layout-span2" onclick="save_email_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
115
  </div>
116
  </div>
117
  <script type="text/javascript">
179
  var count = <?php echo $count; ?>;
180
  if(count != 0)
181
  {
182
+
183
  var dynamicId = <?php echo $dynamicId; ?>;
184
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
185
+ jQuery("#ux_description_control_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
186
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
187
  {
188
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
189
  }
191
  {
192
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
193
  }
194
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
195
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_admin_label);
196
+ if(array_controls[<?php echo $dynamicCount;?>][7].cb_show_email == "1")
197
  {
198
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
199
  }
200
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_button_set_outer_label != "")
201
  {
202
+ jQuery("#ux_email_set_outer_label_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][8].cb_button_set_outer_label);
203
  jQuery("#ux_advance_label_"+dynamicId).attr("style","display:block");
204
  jQuery("#ux_advance_label_"+dynamicId).attr("style","position:inherit");
205
  }
206
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_txt_input != "")
207
  {
208
+ jQuery("#ux_email_txt_input_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_txt_input);
209
  jQuery("#advance_text_input_"+dynamicId).attr("style","display:block");
210
  jQuery("#advance_text_input_"+dynamicId).attr("style","position:inherit");
211
  }
212
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_description != "")
213
  {
214
+ jQuery("#ux_email_description_textarea_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_description);
215
  jQuery("#advance_text_description_"+dynamicId).attr("style","display:block");
216
  jQuery("#advance_text_description_"+dynamicId).attr("style","position:inherit");
217
  }
218
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_checkbox_alpha_filter == "1")
219
  {
220
  jQuery("#ux_email_alpha_filter_"+dynamicId).attr("checked","checked");
221
  }
222
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_ux_checkbox_alpha_num_filter == "1")
223
  {
224
  jQuery("#ux_email_alpha_num_filter_"+dynamicId).attr("checked","checked");
225
  }
226
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_checkbox_digit_filter == "1")
227
  {
228
  jQuery("#ux_email_digit_filter_"+dynamicId).attr("checked","checked");
229
  }
230
+ if(array_controls[<?php echo $dynamicCount;?>][14].cb_checkbox_strip_tag_filter == "1")
231
  {
232
  jQuery("#ux_email_strip_tag_filter_"+dynamicId).attr("checked","checked");
233
  }
234
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_checkbox_trim_filter == "1")
235
  {
236
  jQuery("#ux_email_trim_filter_"+dynamicId).attr("checked","checked");
237
  }
238
  }
239
+ function save_email_control(dynamicId,dynamicCount)
240
  {
241
+
242
  array_controls[dynamicCount] = [];
243
  array_controls[dynamicCount].push({"control_type" : 3});
244
  array_controls[dynamicCount].push({"email_dynamicId" : dynamicId});
267
  {
268
  jQuery("#txt_required_"+dynamicId).css("display","none");
269
  }
270
+ //console.log("pushed control : 3, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
271
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
272
  CloseLightbox();
273
  }
274
  function enter_admin_label(dynamicId)
includes/cb_file_upload.php CHANGED
@@ -125,7 +125,7 @@
125
  </div>
126
  </div>
127
  <div class="layout-control-group">
128
- <input type="button" class="btn btn-info layout-span2" onclick="save_file_uploader(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
129
  </div>
130
  </div>
131
  <script type="text/javascript">
@@ -163,11 +163,11 @@
163
  var count = <?php echo $count; ?>;
164
  if(count != 0)
165
  {
166
- var dynamicCount = "<?php echo $dynamicCount;?>";
167
  var dynamicId = <?php echo $dynamicId; ?>;
168
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
169
- jQuery("#ux_description_control_"+dynamicId).val(array_controls[dynamicCount][3].cb_description);
170
- if(array_controls[dynamicCount][4].cb_control_required == "1")
171
  {
172
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
173
  }
@@ -175,13 +175,13 @@
175
  {
176
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
177
  }
178
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
179
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][6].cb_admin_label);
180
- if(array_controls[dynamicCount][7].cb_show_email == "1")
181
  {
182
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
183
  }
184
- if(array_controls[dynamicCount][8].cb_allow_multiple_file == "1")
185
  {
186
  jQuery("#ux_allow_multiple_file_"+dynamicId).attr("checked","checked");
187
  }
@@ -189,26 +189,26 @@
189
  {
190
  jQuery("#ux_allow_multiple_file_"+dynamicId).removeAttr("checked");
191
  }
192
- jQuery("#ux_allowed_file_extensions_"+dynamicId).val(array_controls[dynamicCount][9].cb_allow_file_ext_upload);
193
- jQuery("#ux_maximum_file_allowed_"+dynamicId).val(array_controls[dynamicCount][10].cb_maximum_file_allowed);
194
- if(array_controls[dynamicCount][11].cb_uploaded_file_email_db == "1")
195
  {
196
  jQuery("#ux_uploaded_file_email_db_"+dynamicId).attr("checked","checked");
197
  }
198
- if(array_controls[dynamicCount][12].cb_button_set_outer_label_file != "")
199
  {
200
- jQuery("#button_set_outer_label_file"+dynamicId).html(array_controls[dynamicCount][12].cb_button_set_outer_label_file);
201
  jQuery("#ux_label_fileupload_"+dynamicId).attr("style","display:block");
202
  jQuery("#ux_label_fileupload_"+dynamicId).attr("style","position:inherit");
203
  }
204
- if(array_controls[dynamicCount][13].cb_button_set_outer_description_fileuplod != "")
205
  {
206
- jQuery("#button_set_outer_description_fileuplod"+dynamicId).html(array_controls[dynamicCount][13].cb_button_set_outer_description_fileuplod);
207
  jQuery("#ux_description_fileupload_"+dynamicId).attr("style","display:block");
208
  jQuery("#ux_description_fileupload_"+dynamicId).attr("style","position:inherit");
209
  }
210
  }
211
- function save_file_uploader(dynamicId)
212
  {
213
  jQuery("#file_upload_content").remove();
214
  var ux_allow_multiple_file = jQuery("#ux_allow_multiple_file_"+dynamicId).prop("checked");
@@ -222,7 +222,7 @@
222
  jQuery("#file_upload_content_postback").css('display','block')
223
  jQuery("#file_upload_content_postback").html(dat);
224
  });
225
- var dynamicCount = "<?php echo $dynamicCount;?>";
226
  array_controls[dynamicCount] = [];
227
  array_controls[dynamicCount].push({"control_type" : "9"});
228
  array_controls[dynamicCount].push({"file_upload_dynamicId" : dynamicId});
@@ -251,6 +251,8 @@
251
  }
252
  jQuery("#AjaxUploaderFilesButton").css('float','left');
253
  jQuery("#AjaxUploaderFilesButton").css('visibility','visible');
 
 
254
  CloseLightbox();
255
  }
256
  function enter_admin_label(dynamicId)
125
  </div>
126
  </div>
127
  <div class="layout-control-group">
128
+ <input type="button" class="btn btn-info layout-span2" onclick="save_file_uploader(<?php echo $dynamicId; ?>,<?php echo $dynamicCount; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
129
  </div>
130
  </div>
131
  <script type="text/javascript">
163
  var count = <?php echo $count; ?>;
164
  if(count != 0)
165
  {
166
+
167
  var dynamicId = <?php echo $dynamicId; ?>;
168
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
169
+ jQuery("#ux_description_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
170
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
171
  {
172
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
173
  }
175
  {
176
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
177
  }
178
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
179
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_admin_label);
180
+ if(array_controls[<?php echo $dynamicCount;?>][7].cb_show_email == "1")
181
  {
182
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
183
  }
184
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_allow_multiple_file == "1")
185
  {
186
  jQuery("#ux_allow_multiple_file_"+dynamicId).attr("checked","checked");
187
  }
189
  {
190
  jQuery("#ux_allow_multiple_file_"+dynamicId).removeAttr("checked");
191
  }
192
+ jQuery("#ux_allowed_file_extensions_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][9].cb_allow_file_ext_upload);
193
+ jQuery("#ux_maximum_file_allowed_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][10].cb_maximum_file_allowed);
194
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_uploaded_file_email_db == "1")
195
  {
196
  jQuery("#ux_uploaded_file_email_db_"+dynamicId).attr("checked","checked");
197
  }
198
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_outer_label_file != "")
199
  {
200
+ jQuery("#button_set_outer_label_file"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_outer_label_file);
201
  jQuery("#ux_label_fileupload_"+dynamicId).attr("style","display:block");
202
  jQuery("#ux_label_fileupload_"+dynamicId).attr("style","position:inherit");
203
  }
204
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_outer_description_fileuplod != "")
205
  {
206
+ jQuery("#button_set_outer_description_fileuplod"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_outer_description_fileuplod);
207
  jQuery("#ux_description_fileupload_"+dynamicId).attr("style","display:block");
208
  jQuery("#ux_description_fileupload_"+dynamicId).attr("style","position:inherit");
209
  }
210
  }
211
+ function save_file_uploader(dynamicId,dynamicCount)
212
  {
213
  jQuery("#file_upload_content").remove();
214
  var ux_allow_multiple_file = jQuery("#ux_allow_multiple_file_"+dynamicId).prop("checked");
222
  jQuery("#file_upload_content_postback").css('display','block')
223
  jQuery("#file_upload_content_postback").html(dat);
224
  });
225
+
226
  array_controls[dynamicCount] = [];
227
  array_controls[dynamicCount].push({"control_type" : "9"});
228
  array_controls[dynamicCount].push({"file_upload_dynamicId" : dynamicId});
251
  }
252
  jQuery("#AjaxUploaderFilesButton").css('float','left');
253
  jQuery("#AjaxUploaderFilesButton").css('visibility','visible');
254
+ //console.log("pushed control : 9, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
255
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
256
  CloseLightbox();
257
  }
258
  function enter_admin_label(dynamicId)
includes/cb_hidden.php CHANGED
@@ -44,7 +44,7 @@
44
  </div>
45
  </div>
46
  <div class="layout-control-group">
47
- <input type="button" class="btn btn-info layout-span2" onclick="save_hidden_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
48
  </div>
49
  </div>
50
  <script type="text/javascript">
@@ -53,19 +53,19 @@
53
  var count = <?php echo $count; ?>;
54
  if(count != 0)
55
  {
56
- var dynamicCount = "<?php echo $dynamicCount;?>";
57
  var dynamicId = <?php echo $dynamicId; ?>;
58
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
59
- jQuery("#ux_default_value_"+dynamicId).val(array_controls[dynamicCount][3].cb_default_txt_val);
60
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][4].cb_admin_label);
61
- if(array_controls[dynamicCount][5].cb_show_email == true)
62
  {
63
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
64
  }
65
  }
66
- function save_hidden_control(dynamicId)
67
  {
68
- var dynamicCount = "<?php echo $dynamicCount;?>";
69
  array_controls[dynamicCount] = [];
70
  array_controls[dynamicCount].push({"control_type" : "14"});
71
  array_controls[dynamicCount].push({"hidden_dynamicId" : dynamicId});
@@ -75,6 +75,8 @@
75
  jQuery("#ux_show_email_"+dynamicId).prop("checked") == true ? array_controls[dynamicCount].push({"cb_show_email": "1"}) : array_controls[dynamicCount].push({"cb_show_email": 0});
76
  jQuery("#ux_txt_hidden_control_"+dynamicId).val(jQuery("#ux_default_value_"+dynamicId).val());
77
  jQuery("#control_label_"+dynamicId).html(jQuery("#ux_label_text_"+dynamicId).val());
 
 
78
  CloseLightbox();
79
  }
80
  function enter_admin_label(dynamicId)
44
  </div>
45
  </div>
46
  <div class="layout-control-group">
47
+ <input type="button" class="btn btn-info layout-span2" onclick="save_hidden_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
48
  </div>
49
  </div>
50
  <script type="text/javascript">
53
  var count = <?php echo $count; ?>;
54
  if(count != 0)
55
  {
56
+
57
  var dynamicId = <?php echo $dynamicId; ?>;
58
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
59
+ jQuery("#ux_default_value_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_default_txt_val);
60
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][4].cb_admin_label);
61
+ if(array_controls[<?php echo $dynamicCount;?>][5].cb_show_email == "1")
62
  {
63
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
64
  }
65
  }
66
+ function save_hidden_control(dynamicId,dynamicCount)
67
  {
68
+
69
  array_controls[dynamicCount] = [];
70
  array_controls[dynamicCount].push({"control_type" : "14"});
71
  array_controls[dynamicCount].push({"hidden_dynamicId" : dynamicId});
75
  jQuery("#ux_show_email_"+dynamicId).prop("checked") == true ? array_controls[dynamicCount].push({"cb_show_email": "1"}) : array_controls[dynamicCount].push({"cb_show_email": 0});
76
  jQuery("#ux_txt_hidden_control_"+dynamicId).val(jQuery("#ux_default_value_"+dynamicId).val());
77
  jQuery("#control_label_"+dynamicId).html(jQuery("#ux_label_text_"+dynamicId).val());
78
+ //console.log("pushed control : 14, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
79
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
80
  CloseLightbox();
81
  }
82
  function enter_admin_label(dynamicId)
includes/cb_multiple.php CHANGED
@@ -120,12 +120,12 @@
120
  </div>
121
  </div>
122
  <div class="layout-control-group">
123
- <input type="button" class="btn btn-info layout-span2" onclick="save_multiple_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
124
  </div>
125
  </div>
126
  <script type="text/javascript">
127
- array_options_radio["<?php echo $dynamicCount;?>"] = [];
128
- array_option_id_radio["<?php echo $dynamicCount;?>"] = [];
129
  jQuery(".hovertip").tooltip();
130
  function tabsFunc(control)
131
  {
@@ -160,25 +160,24 @@
160
  var count = <?php echo $count; ?>;
161
  if(count != 0)
162
  {
163
- var dynamicCount = "<?php echo $dynamicCount;?>";
164
  var dynamicId = <?php echo $dynamicId; ?>;
165
- if(array_controls[dynamicCount][5].cb_radio_option_id != "")
166
  {
167
- var optionId_str = array_controls[dynamicCount][5].cb_radio_option_id;
168
  var optionId = optionId_str.split(";");
169
- var option_value_str = array_controls[dynamicCount][6].cb_radio_option_val;
170
  var option_value = option_value_str.split(";");
171
  for(var flag = 0;flag <optionId.length ;flag++)
172
  {
173
  var options_dynamicId = optionId[flag];
174
  var add_radio_option = option_value[flag];
175
- array_option_id_radio[dynamicCount].push(parseInt(options_dynamicId));
176
- array_options_radio[dynamicCount].push(add_radio_option);
177
  jQuery("#append_multiple_option_"+dynamicId).append('<div class="layout-control-group" id="input_tr_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+options_dynamicId+'" name="input_option_'+options_dynamicId+'" value="'+add_radio_option+'" /><a style="padding-left:2px;" onclick="delete_radio('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
178
  }
179
  }
180
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
181
- if(array_controls[dynamicCount][3].cb_control_required == "1")
182
  {
183
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
184
  }
@@ -186,45 +185,46 @@
186
  {
187
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
188
  }
189
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][4].cb_tooltip_txt);
190
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][7].cb_admin_label);
191
- if(array_controls[dynamicCount][8].cb_show_email == "1")
192
  {
193
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
194
  }
195
- if(array_controls[dynamicCount][9].cb_button_set_outer_label != "")
196
  {
197
- jQuery("#button_set_outer_label_radio_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_outer_label);
198
  jQuery("#show_data_label_tr_radio_"+dynamicId).attr("style","display:block");
199
  jQuery("#show_data_label_tr_radio_"+dynamicId).attr("style","position:inherit");
200
  }
201
- if(array_controls[dynamicCount][10].cb_button_set_description != "")
202
  {
203
- jQuery("#ux_description_textarea_radio_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_description);
204
  jQuery("#show_data_description_tr_radio_"+dynamicId).attr("style","display:block");
205
  jQuery("#show_data_description_tr_radio_"+dynamicId).attr("style","position:inherit");
206
  }
207
- if(array_controls[dynamicCount][11].cb_button_set_options_outer_wrapper != "")
208
  {
209
- jQuery("#ux_button_options_outer_wrapper_radio_"+dynamicId).html(array_controls[dynamicCount][11].cb_button_set_options_outer_wrapper);
210
  jQuery("#show_data_option_outer_wrapper_tr_radio_"+dynamicId).attr("style","display:block");
211
  jQuery("#show_data_option_outer_wrapper_tr_radio_"+dynamicId).attr("style","position:inherit");
212
  }
213
- if(array_controls[dynamicCount][12].cb_button_set_options_wrapper != "")
214
  {
215
- jQuery("#ux_button_option_wrapper_radio_"+dynamicId).html(array_controls[dynamicCount][12].cb_button_set_options_wrapper);
216
  jQuery("#show_data_option_wrapper_tr_radio_"+dynamicId).attr("style","display:block");
217
  jQuery("#show_data_option_wrapper_tr_radio_"+dynamicId).attr("style","position:inherit");
218
  }
219
- if(array_controls[dynamicCount][13].cb_button_set_options_label != "")
220
  {
221
- jQuery("#ux_button_option_label_radio_"+dynamicId).html(array_controls[dynamicCount][13].cb_button_set_options_label);
222
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","display:block");
223
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","position:inherit");
224
  }
225
  }
226
  function add_radio_options(dynamicId)
227
  {
 
228
  var add_radio_options = jQuery("#radio_options_"+dynamicId).val();
229
  if(add_radio_options=="")
230
  {
@@ -233,8 +233,8 @@
233
  else
234
  {
235
  var options_dynamicId = Math.floor((Math.random()*10000)+1);
236
- array_options_radio[dynamicCount].push(add_radio_options);
237
- array_option_id_radio[dynamicCount].push(options_dynamicId);
238
  jQuery("#append_multiple_option_"+dynamicId).append('<div class="layout-control-group" id="input_tr_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+options_dynamicId+'" name="input_option_'+options_dynamicId+'" value="'+add_radio_options+'" /><a style="padding-left:2px;" onclick="delete_radio('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
239
  jQuery("#radio_options_"+dynamicId).val("");
240
  }
@@ -243,11 +243,11 @@
243
  {
244
  var input_type_value = jQuery("#input_option_"+options_dynamicId).val();
245
  jQuery("#input_tr_"+options_dynamicId).remove();
246
- var place_of_option_in_array_id = jQuery.inArray(parseInt(options_dynamicId),array_option_id_radio[dynamicCount]);
247
  if(place_of_option_in_array_id != -1)
248
  {
249
- array_options_radio[dynamicCount].splice(place_of_option_in_array_id,1);
250
- array_option_id_radio[dynamicCount].splice(place_of_option_in_array_id,1);
251
  }
252
  }
253
 
@@ -301,9 +301,9 @@
301
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","display:none");
302
  jQuery("#ux_button_option_label_radio_"+dynamicId).val("");
303
  }
304
- function save_multiple_control(dynamicId)
305
  {
306
- var dynamicCount = "<?php echo $dynamicCount;?>";
307
  array_controls[dynamicCount] = [];
308
  array_controls[dynamicCount].push({"control_type" : "6"});
309
  array_controls[dynamicCount].push({"radio_dynamicId" : dynamicId});
@@ -356,6 +356,8 @@
356
  {
357
  jQuery("#txt_required_"+dynamicId).css("display","none");
358
  }
 
 
359
  CloseLightbox();
360
  }
361
  function enter_admin_label(dynamicId)
120
  </div>
121
  </div>
122
  <div class="layout-control-group">
123
+ <input type="button" class="btn btn-info layout-span2" onclick="save_multiple_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
124
  </div>
125
  </div>
126
  <script type="text/javascript">
127
+ array_options_radio[<?php echo $dynamicCount;?>] = [];
128
+ array_option_id_radio[<?php echo $dynamicCount;?>] = [];
129
  jQuery(".hovertip").tooltip();
130
  function tabsFunc(control)
131
  {
160
  var count = <?php echo $count; ?>;
161
  if(count != 0)
162
  {
 
163
  var dynamicId = <?php echo $dynamicId; ?>;
164
+ if(array_controls[<?php echo $dynamicCount;?>][5].cb_radio_option_id != "")
165
  {
166
+ var optionId_str = array_controls[<?php echo $dynamicCount;?>][5].cb_radio_option_id;
167
  var optionId = optionId_str.split(";");
168
+ var option_value_str = array_controls[<?php echo $dynamicCount;?>][6].cb_radio_option_val;
169
  var option_value = option_value_str.split(";");
170
  for(var flag = 0;flag <optionId.length ;flag++)
171
  {
172
  var options_dynamicId = optionId[flag];
173
  var add_radio_option = option_value[flag];
174
+ array_option_id_radio[<?php echo $dynamicCount;?>].push(parseInt(options_dynamicId));
175
+ array_options_radio[<?php echo $dynamicCount;?>].push(add_radio_option);
176
  jQuery("#append_multiple_option_"+dynamicId).append('<div class="layout-control-group" id="input_tr_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+options_dynamicId+'" name="input_option_'+options_dynamicId+'" value="'+add_radio_option+'" /><a style="padding-left:2px;" onclick="delete_radio('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
177
  }
178
  }
179
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
180
+ if(array_controls[<?php echo $dynamicCount;?>][3].cb_control_required == "1")
181
  {
182
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
183
  }
185
  {
186
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
187
  }
188
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][4].cb_tooltip_txt);
189
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][7].cb_admin_label);
190
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_show_email == "1")
191
  {
192
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
193
  }
194
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label != "")
195
  {
196
+ jQuery("#button_set_outer_label_radio_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label);
197
  jQuery("#show_data_label_tr_radio_"+dynamicId).attr("style","display:block");
198
  jQuery("#show_data_label_tr_radio_"+dynamicId).attr("style","position:inherit");
199
  }
200
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_description != "")
201
  {
202
+ jQuery("#ux_description_textarea_radio_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_description);
203
  jQuery("#show_data_description_tr_radio_"+dynamicId).attr("style","display:block");
204
  jQuery("#show_data_description_tr_radio_"+dynamicId).attr("style","position:inherit");
205
  }
206
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_options_outer_wrapper != "")
207
  {
208
+ jQuery("#ux_button_options_outer_wrapper_radio_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_options_outer_wrapper);
209
  jQuery("#show_data_option_outer_wrapper_tr_radio_"+dynamicId).attr("style","display:block");
210
  jQuery("#show_data_option_outer_wrapper_tr_radio_"+dynamicId).attr("style","position:inherit");
211
  }
212
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_options_wrapper != "")
213
  {
214
+ jQuery("#ux_button_option_wrapper_radio_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][12].cb_button_set_options_wrapper);
215
  jQuery("#show_data_option_wrapper_tr_radio_"+dynamicId).attr("style","display:block");
216
  jQuery("#show_data_option_wrapper_tr_radio_"+dynamicId).attr("style","position:inherit");
217
  }
218
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_options_label != "")
219
  {
220
+ jQuery("#ux_button_option_label_radio_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_options_label);
221
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","display:block");
222
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","position:inherit");
223
  }
224
  }
225
  function add_radio_options(dynamicId)
226
  {
227
+
228
  var add_radio_options = jQuery("#radio_options_"+dynamicId).val();
229
  if(add_radio_options=="")
230
  {
233
  else
234
  {
235
  var options_dynamicId = Math.floor((Math.random()*10000)+1);
236
+ array_options_radio[<?php echo $dynamicCount;?>].push(add_radio_options);
237
+ array_option_id_radio[<?php echo $dynamicCount;?>].push(options_dynamicId);
238
  jQuery("#append_multiple_option_"+dynamicId).append('<div class="layout-control-group" id="input_tr_'+options_dynamicId+'"><div class="layout-controls"><input type="text" class="layout-span8" id="input_option_'+options_dynamicId+'" name="input_option_'+options_dynamicId+'" value="'+add_radio_options+'" /><a style="padding-left:2px;" onclick="delete_radio('+options_dynamicId+','+dynamicId+')"><img style="vertical-align: top;margin-top: 2px;" src="<?php echo CONTACT_BK_PLUGIN_URL; ?>/assets/images/delete-bg.png" /></a></div></div>');
239
  jQuery("#radio_options_"+dynamicId).val("");
240
  }
243
  {
244
  var input_type_value = jQuery("#input_option_"+options_dynamicId).val();
245
  jQuery("#input_tr_"+options_dynamicId).remove();
246
+ var place_of_option_in_array_id = jQuery.inArray(parseInt(options_dynamicId),array_option_id_radio[<?php echo $dynamicCount;?>]);
247
  if(place_of_option_in_array_id != -1)
248
  {
249
+ array_options_radio[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
250
+ array_option_id_radio[<?php echo $dynamicCount;?>].splice(place_of_option_in_array_id,1);
251
  }
252
  }
253
 
301
  jQuery("#show_data_option_label_tr_radio_"+dynamicId).attr("style","display:none");
302
  jQuery("#ux_button_option_label_radio_"+dynamicId).val("");
303
  }
304
+ function save_multiple_control(dynamicId,dynamicCount)
305
  {
306
+
307
  array_controls[dynamicCount] = [];
308
  array_controls[dynamicCount].push({"control_type" : "6"});
309
  array_controls[dynamicCount].push({"radio_dynamicId" : dynamicId});
356
  {
357
  jQuery("#txt_required_"+dynamicId).css("display","none");
358
  }
359
+ //console.log("pushed control : 6, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
360
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
361
  CloseLightbox();
362
  }
363
  function enter_admin_label(dynamicId)
includes/cb_password.php CHANGED
@@ -111,7 +111,7 @@
111
  </div>
112
  </div>
113
  <div class="layout-control-group">
114
- <input type="button" class="btn btn-info layout-span2" onclick="save_password_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
115
  </div>
116
  </div>
117
  <script type="text/javascript">
@@ -177,11 +177,11 @@
177
  var count = <?php echo $count; ?>;
178
  if(count != 0)
179
  {
180
- var dynamicCount = "<?php echo $dynamicCount;?>";
181
  var dynamicId = <?php echo $dynamicId; ?>;
182
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
183
- jQuery("#ux_description_control_"+dynamicId).val(array_controls[dynamicCount][3].cb_description);
184
- if(array_controls[dynamicCount][4].cb_control_required == "1")
185
  {
186
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
187
  }
@@ -189,54 +189,54 @@
189
  {
190
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
191
  }
192
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
193
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][6].cb_admin_label);
194
- if(array_controls[dynamicCount][7].cb_show_email == "1")
195
  {
196
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
197
  }
198
- if(array_controls[dynamicCount][8].cb_button_set_outer_label != "")
199
  {
200
- jQuery("#ux_password_label_"+dynamicId).html(array_controls[dynamicCount][8].cb_button_set_outer_label);
201
  jQuery("#password_label_"+dynamicId).attr("style","display:block");
202
  jQuery("#password_label_"+dynamicId).attr("style","position:inherit");
203
  }
204
- if(array_controls[dynamicCount][9].cb_button_set_txt_input != "")
205
  {
206
- jQuery("#ux_password_text_input_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_txt_input);
207
  jQuery("#password_text_input_"+dynamicId).attr("style","display:block");
208
  jQuery("#password_text_input_"+dynamicId).attr("style","position:inherit");
209
  }
210
- if(array_controls[dynamicCount][10].cb_button_set_txt_description != "")
211
  {
212
- jQuery("#ux_password_description_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_txt_description);
213
  jQuery("#password_description_"+dynamicId).attr("style","display:block");
214
  jQuery("#password_description_"+dynamicId).attr("style","position:inherit");
215
  }
216
- if(array_controls[dynamicCount][11].cb_checkbox_alpha_filter == "1")
217
  {
218
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
219
  }
220
- if(array_controls[dynamicCount][12].cb_ux_checkbox_alpha_num_filter == "1")
221
  {
222
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
223
  }
224
- if(array_controls[dynamicCount][13].cb_checkbox_digit_filter == "1")
225
  {
226
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
227
  }
228
- if(array_controls[dynamicCount][14].cb_checkbox_strip_tag_filter == "1")
229
  {
230
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
231
  }
232
- if(array_controls[dynamicCount][15].cb_checkbox_trim_filter == "1")
233
  {
234
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
235
  }
236
  }
237
- function save_password_control(dynamicId)
238
  {
239
- var dynamicCount = "<?php echo $dynamicCount;?>";
240
  array_controls[dynamicCount] = [];
241
  array_controls[dynamicCount].push({"control_type" : "15"});
242
  array_controls[dynamicCount].push({"password_dynamicId" : dynamicId});
@@ -265,6 +265,8 @@
265
  {
266
  jQuery("#txt_required_"+dynamicId).css("display","none");
267
  }
 
 
268
  CloseLightbox();
269
  }
270
  function enter_admin_label(dynamicId)
111
  </div>
112
  </div>
113
  <div class="layout-control-group">
114
+ <input type="button" class="btn btn-info layout-span2" onclick="save_password_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
115
  </div>
116
  </div>
117
  <script type="text/javascript">
177
  var count = <?php echo $count; ?>;
178
  if(count != 0)
179
  {
180
+
181
  var dynamicId = <?php echo $dynamicId; ?>;
182
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
183
+ jQuery("#ux_description_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
184
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
185
  {
186
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
187
  }
189
  {
190
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
191
  }
192
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
193
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_admin_label);
194
+ if(array_controls[<?php echo $dynamicCount;?>][7].cb_show_email == "1")
195
  {
196
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
197
  }
198
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_button_set_outer_label != "")
199
  {
200
+ jQuery("#ux_password_label_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][8].cb_button_set_outer_label);
201
  jQuery("#password_label_"+dynamicId).attr("style","display:block");
202
  jQuery("#password_label_"+dynamicId).attr("style","position:inherit");
203
  }
204
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_txt_input != "")
205
  {
206
+ jQuery("#ux_password_text_input_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_txt_input);
207
  jQuery("#password_text_input_"+dynamicId).attr("style","display:block");
208
  jQuery("#password_text_input_"+dynamicId).attr("style","position:inherit");
209
  }
210
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_description != "")
211
  {
212
+ jQuery("#ux_password_description_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_description);
213
  jQuery("#password_description_"+dynamicId).attr("style","display:block");
214
  jQuery("#password_description_"+dynamicId).attr("style","position:inherit");
215
  }
216
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_checkbox_alpha_filter == "1")
217
  {
218
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
219
  }
220
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_ux_checkbox_alpha_num_filter == "1")
221
  {
222
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
223
  }
224
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_checkbox_digit_filter == "1")
225
  {
226
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
227
  }
228
+ if(array_controls[<?php echo $dynamicCount;?>][14].cb_checkbox_strip_tag_filter == "1")
229
  {
230
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
231
  }
232
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_checkbox_trim_filter == "1")
233
  {
234
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
235
  }
236
  }
237
+ function save_password_control(dynamicId,dynamicCount)
238
  {
239
+
240
  array_controls[dynamicCount] = [];
241
  array_controls[dynamicCount].push({"control_type" : "15"});
242
  array_controls[dynamicCount].push({"password_dynamicId" : dynamicId});
265
  {
266
  jQuery("#txt_required_"+dynamicId).css("display","none");
267
  }
268
+ //console.log("pushed control : 15, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
269
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
270
  CloseLightbox();
271
  }
272
  function enter_admin_label(dynamicId)
includes/cb_text.php CHANGED
@@ -116,7 +116,7 @@
116
  </div>
117
  </div>
118
  <div class="layout-control-group">
119
- <input type="button" class="btn btn-info layout-span2" onclick="save_text_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
120
  </div>
121
  </div>
122
  <script type="text/javascript">
@@ -154,11 +154,11 @@
154
  var count = <?php echo $count; ?>;
155
  if(count != 0)
156
  {
157
- var dynamicCount = "<?php echo $dynamicCount;?>";
158
  var dynamicId = <?php echo $dynamicId; ?>;
159
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
160
- jQuery("#ux_description_control_"+dynamicId).val(array_controls[dynamicCount][3].cb_description);
161
- if(array_controls[dynamicCount][4].cb_control_required == "1")
162
  {
163
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
164
  }
@@ -166,55 +166,55 @@
166
  {
167
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
168
  }
169
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
170
- jQuery("#ux_default_value_"+dynamicId).val(array_controls[dynamicCount][6].cb_default_txt_val);
171
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][7].cb_admin_label);
172
- if(array_controls[dynamicCount][8].cb_show_email == "1")
173
  {
174
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
175
  }
176
- if(array_controls[dynamicCount][9].cb_button_set_outer_label != "")
177
  {
178
- jQuery("#button_set_outer_label_textbox_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_outer_label);
179
  jQuery("#ux_label_textbox_"+dynamicId).attr("style","display:block");
180
  jQuery("#ux_label_textbox_"+dynamicId).attr("style","position:inherit");
181
  }
182
- if(array_controls[dynamicCount][10].cb_button_set_txt_input != "")
183
  {
184
- jQuery("#button_set_txt_input_textbox_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_txt_input);
185
  jQuery("#ux_textinput_textbox_"+dynamicId).attr("style","display:block");
186
  jQuery("#ux_textinput_textbox_"+dynamicId).attr("style","position:inherit");
187
  }
188
- if(array_controls[dynamicCount][11].cb_button_set_txt_description != "")
189
  {
190
- jQuery("#button_set_txt_description_textbox_"+dynamicId).html(array_controls[dynamicCount][11].cb_button_set_txt_description);
191
  jQuery("#ux_description_textbox_"+dynamicId).attr("style","display:block");
192
  jQuery("#ux_description_textbox_"+dynamicId).attr("style","position:inherit");
193
  }
194
- if(array_controls[dynamicCount][12].cb_checkbox_alpha_filter == "1")
195
  {
196
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
197
  }
198
- if(array_controls[dynamicCount][13].cb_ux_checkbox_alpha_num_filter == "1")
199
  {
200
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
201
  }
202
- if(array_controls[dynamicCount][14].cb_checkbox_digit_filter == "1")
203
  {
204
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
205
  }
206
- if(array_controls[dynamicCount][15].cb_checkbox_strip_tag_filter == "1")
207
  {
208
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
209
  }
210
- if(array_controls[dynamicCount][16].cb_checkbox_trim_filter == "1")
211
  {
212
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
213
  }
214
  }
215
- function save_text_control(dynamicId)
216
  {
217
- var dynamicCount = "<?php echo $dynamicCount;?>";
218
  array_controls[dynamicCount] = [];
219
  array_controls[dynamicCount].push({"control_type" : "1"});
220
  array_controls[dynamicCount].push({"text_dynamicId" : dynamicId});
@@ -245,6 +245,8 @@
245
  {
246
  jQuery("#txt_required_"+dynamicId).css("display","none");
247
  }
 
 
248
  CloseLightbox();
249
  }
250
  function enter_admin_label(dynamicId)
116
  </div>
117
  </div>
118
  <div class="layout-control-group">
119
+ <input type="button" class="btn btn-info layout-span2" onclick="save_text_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
120
  </div>
121
  </div>
122
  <script type="text/javascript">
154
  var count = <?php echo $count; ?>;
155
  if(count != 0)
156
  {
157
+
158
  var dynamicId = <?php echo $dynamicId; ?>;
159
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
160
+ jQuery("#ux_description_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
161
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
162
  {
163
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
164
  }
166
  {
167
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
168
  }
169
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
170
+ jQuery("#ux_default_value_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_default_txt_val);
171
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][7].cb_admin_label);
172
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_show_email == "1")
173
  {
174
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
175
  }
176
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label != "")
177
  {
178
+ jQuery("#button_set_outer_label_textbox_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label);
179
  jQuery("#ux_label_textbox_"+dynamicId).attr("style","display:block");
180
  jQuery("#ux_label_textbox_"+dynamicId).attr("style","position:inherit");
181
  }
182
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_input != "")
183
  {
184
+ jQuery("#button_set_txt_input_textbox_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_input);
185
  jQuery("#ux_textinput_textbox_"+dynamicId).attr("style","display:block");
186
  jQuery("#ux_textinput_textbox_"+dynamicId).attr("style","position:inherit");
187
  }
188
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_txt_description != "")
189
  {
190
+ jQuery("#button_set_txt_description_textbox_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_txt_description);
191
  jQuery("#ux_description_textbox_"+dynamicId).attr("style","display:block");
192
  jQuery("#ux_description_textbox_"+dynamicId).attr("style","position:inherit");
193
  }
194
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_checkbox_alpha_filter == "1")
195
  {
196
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
197
  }
198
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_ux_checkbox_alpha_num_filter == "1")
199
  {
200
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
201
  }
202
+ if(array_controls[<?php echo $dynamicCount;?>][14].cb_checkbox_digit_filter == "1")
203
  {
204
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
205
  }
206
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_checkbox_strip_tag_filter == "1")
207
  {
208
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
209
  }
210
+ if(array_controls[<?php echo $dynamicCount;?>][16].cb_checkbox_trim_filter == "1")
211
  {
212
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
213
  }
214
  }
215
+ function save_text_control(dynamicId,dynamicCount)
216
  {
217
+
218
  array_controls[dynamicCount] = [];
219
  array_controls[dynamicCount].push({"control_type" : "1"});
220
  array_controls[dynamicCount].push({"text_dynamicId" : dynamicId});
245
  {
246
  jQuery("#txt_required_"+dynamicId).css("display","none");
247
  }
248
+ //console.log("pushed control : 1, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
249
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
250
  CloseLightbox();
251
  }
252
  function enter_admin_label(dynamicId)
includes/cb_textarea.php CHANGED
@@ -122,7 +122,7 @@
122
  </div>
123
  </div>
124
  <div class="layout-control-group">
125
- <input type="button" class="btn btn-info layout-span2" onclick="save_textarea_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
126
  </div>
127
  </div>
128
  <script type="text/javascript">
@@ -157,9 +157,9 @@
157
  break;
158
  }
159
  }
160
- function save_textarea_control(dynamicId)
161
  {
162
- var dynamicCount = "<?php echo $dynamicCount;?>";
163
  array_controls[dynamicCount] = [];
164
  array_controls[dynamicCount].push({"control_type" : "2"});
165
  array_controls[dynamicCount].push({"textarea_dynamicId" : dynamicId});
@@ -190,6 +190,8 @@
190
  {
191
  jQuery("#txt_required_"+dynamicId).css("display","none");
192
  }
 
 
193
  CloseLightbox();
194
  }
195
  function enter_admin_label(dynamicId)
@@ -200,11 +202,11 @@
200
  var count = <?php echo $count; ?>;
201
  if(count != 0)
202
  {
203
- var dynamicCount = "<?php echo $dynamicCount;?>";
204
  var dynamicId = <?php echo $dynamicId; ?>;
205
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
206
- jQuery("#ux_description_control_"+dynamicId).val(array_controls[dynamicCount][3].cb_description);
207
- if(array_controls[dynamicCount][4].cb_control_required == "1")
208
  {
209
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
210
  }
@@ -212,48 +214,48 @@
212
  {
213
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
214
  }
215
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
216
- jQuery("#ux_default_value_"+dynamicId).val(array_controls[dynamicCount][6].cb_default_txt_val);
217
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][7].cb_admin_label);
218
- if(array_controls[dynamicCount][8].cb_show_email == "1")
219
  {
220
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
221
  }
222
- if(array_controls[dynamicCount][9].cb_button_set_outer_label != "")
223
  {
224
- jQuery("#button_set_outer_label_"+dynamicId).html(array_controls[dynamicCount][9].cb_button_set_outer_label);
225
  jQuery("#text_area_label_"+dynamicId).attr("style","display:block");
226
  jQuery("#text_area_label_"+dynamicId).attr("style","position:inherit");
227
  }
228
- if(array_controls[dynamicCount][10].cb_button_set_txt_input != "")
229
  {
230
- jQuery("#button_set_textinput_"+dynamicId).html(array_controls[dynamicCount][10].cb_button_set_txt_input);
231
  jQuery("#text_area_text_input_"+dynamicId).attr("style","display:block");
232
  jQuery("#text_area_text_input_"+dynamicId).attr("style","position:inherit");
233
  }
234
- if(array_controls[dynamicCount][11].cb_button_set_txt_description != "")
235
  {
236
- jQuery("#button_set_outer_description_"+dynamicId).html(array_controls[dynamicCount][11].cb_button_set_txt_description);
237
  jQuery("#text_area_description_"+dynamicId).attr("style","display:block");
238
  jQuery("#text_area_description_"+dynamicId).attr("style","position:inherit");
239
  }
240
- if(array_controls[dynamicCount][12].cb_checkbox_alpha_filter == "1")
241
  {
242
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
243
  }
244
- if(array_controls[dynamicCount][13].cb_ux_checkbox_alpha_num_filter == "1")
245
  {
246
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
247
  }
248
- if(array_controls[dynamicCount][14].cb_checkbox_digit_filter == "1")
249
  {
250
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
251
  }
252
- if(array_controls[dynamicCount][15].cb_checkbox_strip_tag_filter == "1")
253
  {
254
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
255
  }
256
- if(array_controls[dynamicCount][16].cb_checkbox_trim_filter == "1")
257
  {
258
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
259
  }
122
  </div>
123
  </div>
124
  <div class="layout-control-group">
125
+ <input type="button" class="btn btn-info layout-span2" onclick="save_textarea_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
126
  </div>
127
  </div>
128
  <script type="text/javascript">
157
  break;
158
  }
159
  }
160
+ function save_textarea_control(dynamicId,dynamicCount)
161
  {
162
+
163
  array_controls[dynamicCount] = [];
164
  array_controls[dynamicCount].push({"control_type" : "2"});
165
  array_controls[dynamicCount].push({"textarea_dynamicId" : dynamicId});
190
  {
191
  jQuery("#txt_required_"+dynamicId).css("display","none");
192
  }
193
+ //console.log("pushed control : 2, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
194
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
195
  CloseLightbox();
196
  }
197
  function enter_admin_label(dynamicId)
202
  var count = <?php echo $count; ?>;
203
  if(count != 0)
204
  {
205
+
206
  var dynamicId = <?php echo $dynamicId; ?>;
207
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
208
+ jQuery("#ux_description_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
209
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
210
  {
211
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
212
  }
214
  {
215
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
216
  }
217
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
218
+ jQuery("#ux_default_value_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_default_txt_val);
219
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][7].cb_admin_label);
220
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_show_email == "1")
221
  {
222
  jQuery("#ux_show_email_"+dynamicId).attr("checked","checked");
223
  }
224
+ if(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label != "")
225
  {
226
+ jQuery("#button_set_outer_label_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][9].cb_button_set_outer_label);
227
  jQuery("#text_area_label_"+dynamicId).attr("style","display:block");
228
  jQuery("#text_area_label_"+dynamicId).attr("style","position:inherit");
229
  }
230
+ if(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_input != "")
231
  {
232
+ jQuery("#button_set_textinput_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][10].cb_button_set_txt_input);
233
  jQuery("#text_area_text_input_"+dynamicId).attr("style","display:block");
234
  jQuery("#text_area_text_input_"+dynamicId).attr("style","position:inherit");
235
  }
236
+ if(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_txt_description != "")
237
  {
238
+ jQuery("#button_set_outer_description_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][11].cb_button_set_txt_description);
239
  jQuery("#text_area_description_"+dynamicId).attr("style","display:block");
240
  jQuery("#text_area_description_"+dynamicId).attr("style","position:inherit");
241
  }
242
+ if(array_controls[<?php echo $dynamicCount;?>][12].cb_checkbox_alpha_filter == "1")
243
  {
244
  jQuery("#ux_checkbox_alpha_filter_"+dynamicId).attr("checked","checked");
245
  }
246
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_ux_checkbox_alpha_num_filter == "1")
247
  {
248
  jQuery("#ux_checkbox_alpha_num_filter_"+dynamicId).attr("checked","checked");
249
  }
250
+ if(array_controls[<?php echo $dynamicCount;?>][14].cb_checkbox_digit_filter == "1")
251
  {
252
  jQuery("#ux_checkbox_digit_filter_"+dynamicId).attr("checked","checked");
253
  }
254
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_checkbox_strip_tag_filter == "1")
255
  {
256
  jQuery("#ux_checkbox_strip_tag_filter_"+dynamicId).attr("checked","checked");
257
  }
258
+ if(array_controls[<?php echo $dynamicCount;?>][16].cb_checkbox_trim_filter == "1")
259
  {
260
  jQuery("#ux_checkbox_trim_filter_"+dynamicId).attr("checked","checked");
261
  }
includes/cb_time.php CHANGED
@@ -217,7 +217,7 @@
217
  </div>
218
  </div>
219
  <div class="layout-control-group">
220
- <input type="button" class="btn btn-info layout-span2" onclick="save_time_control(<?php echo $dynamicId; ?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
221
  </div>
222
  </div>
223
  <script type="text/javascript">
@@ -255,11 +255,11 @@
255
  var count = <?php echo $count; ?>;
256
  if(count != 0)
257
  {
258
- var dynamicCount = "<?php echo $dynamicCount;?>";
259
  var dynamicId = <?php echo $dynamicId; ?>;
260
- jQuery("#ux_label_text_"+dynamicId).val(array_controls[dynamicCount][2].cb_label_value);
261
- jQuery("#ux_description_control_"+dynamicId).val(array_controls[dynamicCount][3].cb_description);
262
- if(array_controls[dynamicCount][4].cb_control_required == "1")
263
  {
264
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
265
  }
@@ -267,67 +267,67 @@
267
  {
268
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
269
  }
270
- jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[dynamicCount][5].cb_tooltip_txt);
271
- jQuery("#ux_admin_label_"+dynamicId).val(array_controls[dynamicCount][6].cb_admin_label);
272
- if(array_controls[dynamicCount][7].cb_show_email == "1")
273
  {
274
  jQuery("#ux_email_"+dynamicId).attr("checked","checked");
275
  }
276
- if(array_controls[dynamicCount][8].cb_hour_format == "12")
277
  {
278
  jQuery("#ux_default_hours_24_"+dynamicId).hide();
279
  jQuery("#ux_default_hours_12_"+dynamicId).show();
280
- jQuery("#ux_default_hours_12_"+dynamicId).val(array_controls[dynamicCount][9].cb_hours);
281
- jQuery("#ux_drop_hour_time_"+dynamicId).val(array_controls[dynamicCount][8].cb_hour_format);
282
- jQuery("#ux_default_minute_"+dynamicId).val(array_controls[dynamicCount][10].cb_minutes);
283
- jQuery("#ux_default_am_"+dynamicId).val(array_controls[dynamicCount][11].cb_am_pm);
284
- jQuery("#ux_minute_format_"+dynamicId).val(array_controls[dynamicCount][12].cb_time_format);
285
  jQuery("#ux_default_am_"+dynamicId).show();
286
  }
287
- else if(array_controls[dynamicCount][8].cb_hour_format == "24")
288
  {
289
  jQuery("#ux_default_hours_12_"+dynamicId).hide();
290
  jQuery("#ux_default_hours_24_"+dynamicId).show();
291
- jQuery("#ux_default_hours_24_"+dynamicId).val(array_controls[dynamicCount][9].cb_hours);
292
- jQuery("#ux_drop_hour_time_"+dynamicId).val(array_controls[dynamicCount][8].cb_hour_format);
293
- jQuery("#ux_default_minute_"+dynamicId).val(array_controls[dynamicCount][10].cb_minutes);
294
- jQuery("#ux_default_am_"+dynamicId).val(array_controls[dynamicCount][11].cb_am_pm);
295
- jQuery("#ux_minute_format_"+dynamicId).val(array_controls[dynamicCount][12].cb_time_format);
296
  jQuery("#ux_default_am_"+dynamicId).hide();
297
  }
298
- if(array_controls[dynamicCount][13].cb_button_set_outer_label != "")
299
  {
300
- jQuery("#button_set_outer_label_"+dynamicId).html(array_controls[dynamicCount][13].cb_button_set_outer_label);
301
  jQuery("#time_css_label_"+dynamicId).attr("style","display:block");
302
  jQuery("#time_css_label_"+dynamicId).attr("style","position:inherit");
303
  }
304
- if(array_controls[dynamicCount][14].cb_button_set_txt_input != "")
305
  {
306
- jQuery("#button_set_textinput_"+dynamicId).html(array_controls[dynamicCount][14].cb_button_set_txt_input);
307
  jQuery("#time_text_input_"+dynamicId).attr("style","display:block");
308
  jQuery("#time_text_input_"+dynamicId).attr("style","position:inherit");
309
  }
310
- if(array_controls[dynamicCount][15].cb_button_set_description != "")
311
  {
312
- jQuery("#button_set_outer_description_"+dynamicId).html(array_controls[dynamicCount][15].cb_button_set_description);
313
  jQuery("#time_description_"+dynamicId).attr("style","display:block");
314
  jQuery("#time_description_"+dynamicId).attr("style","position:inherit");
315
  }
316
- if(array_controls[dynamicCount][16].cb_button_set_time_hour_dropdown != "")
317
  {
318
- jQuery("#ux_time_hour_"+dynamicId).html(array_controls[dynamicCount][16].cb_button_set_time_hour_dropdown);
319
  jQuery("#time_set_time_hour_"+dynamicId).attr("style","display:block");
320
  jQuery("#time_set_time_hour_"+dynamicId).attr("style","position:inherit");
321
  }
322
- if(array_controls[dynamicCount][17].cb_button_set_time_minute_dropdown != "")
323
  {
324
- jQuery("#ux_time_minute_"+dynamicId).html(array_controls[dynamicCount][17].cb_button_set_time_minute_dropdown);
325
  jQuery("#button_set_time_minute_"+dynamicId).attr("style","display:block");
326
  jQuery("#button_set_time_minute_"+dynamicId).attr("style","position:inherit");
327
  }
328
- if(array_controls[dynamicCount][18].cb_button_set_time_am_pm_dropdown != "")
329
  {
330
- jQuery("#button_set_time_am_"+dynamicId).html(array_controls[dynamicCount][18].cb_button_set_time_am_pm_dropdown);
331
  jQuery("#ux_tr_set_time_am_"+dynamicId).attr("style","display:block");
332
  jQuery("#ux_tr_set_time_am_"+dynamicId).attr("style","position:inherit");
333
  }
@@ -383,9 +383,9 @@
383
  jQuery("#ux_ddl_select_ampm_"+dynamicId).val(ux_default_format);
384
  }
385
 
386
- function save_time_control(dynamicId)
387
  {
388
- var dynamicCount = "<?php echo $dynamicCount;?>";
389
  array_controls[dynamicCount] = [];
390
  array_controls[dynamicCount].push({"control_type" :" 13"});
391
  array_controls[dynamicCount].push({"time_dynamicId" : dynamicId});
@@ -440,6 +440,8 @@
440
  {
441
  jQuery("#txt_required_"+dynamicId).css("display","none");
442
  }
 
 
443
  CloseLightbox();
444
  }
445
  function enter_admin_label(dynamicId)
217
  </div>
218
  </div>
219
  <div class="layout-control-group">
220
+ <input type="button" class="btn btn-info layout-span2" onclick="save_time_control(<?php echo $dynamicId; ?>,<?php echo $dynamicCount;?>)" value="<?php _e( "Save Settings", contact_bank ); ?>" />
221
  </div>
222
  </div>
223
  <script type="text/javascript">
255
  var count = <?php echo $count; ?>;
256
  if(count != 0)
257
  {
258
+
259
  var dynamicId = <?php echo $dynamicId; ?>;
260
+ jQuery("#ux_label_text_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][2].cb_label_value);
261
+ jQuery("#ux_description_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][3].cb_description);
262
+ if(array_controls[<?php echo $dynamicCount;?>][4].cb_control_required == "1")
263
  {
264
  jQuery("#ux_required_control_"+dynamicId).attr("checked","checked");
265
  }
267
  {
268
  jQuery("#ux_required_"+dynamicId).attr("checked","checked");
269
  }
270
+ jQuery("#ux_tooltip_control_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][5].cb_tooltip_txt);
271
+ jQuery("#ux_admin_label_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][6].cb_admin_label);
272
+ if(array_controls[<?php echo $dynamicCount;?>][7].cb_show_email == "1")
273
  {
274
  jQuery("#ux_email_"+dynamicId).attr("checked","checked");
275
  }
276
+ if(array_controls[<?php echo $dynamicCount;?>][8].cb_hour_format == "12")
277
  {
278
  jQuery("#ux_default_hours_24_"+dynamicId).hide();
279
  jQuery("#ux_default_hours_12_"+dynamicId).show();
280
+ jQuery("#ux_default_hours_12_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][9].cb_hours);
281
+ jQuery("#ux_drop_hour_time_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][8].cb_hour_format);
282
+ jQuery("#ux_default_minute_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][10].cb_minutes);
283
+ jQuery("#ux_default_am_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][11].cb_am_pm);
284
+ jQuery("#ux_minute_format_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][12].cb_time_format);
285
  jQuery("#ux_default_am_"+dynamicId).show();
286
  }
287
+ else if(array_controls[<?php echo $dynamicCount;?>][8].cb_hour_format == "24")
288
  {
289
  jQuery("#ux_default_hours_12_"+dynamicId).hide();
290
  jQuery("#ux_default_hours_24_"+dynamicId).show();
291
+ jQuery("#ux_default_hours_24_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][9].cb_hours);
292
+ jQuery("#ux_drop_hour_time_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][8].cb_hour_format);
293
+ jQuery("#ux_default_minute_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][10].cb_minutes);
294
+ jQuery("#ux_default_am_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][11].cb_am_pm);
295
+ jQuery("#ux_minute_format_"+dynamicId).val(array_controls[<?php echo $dynamicCount;?>][12].cb_time_format);
296
  jQuery("#ux_default_am_"+dynamicId).hide();
297
  }
298
+ if(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_outer_label != "")
299
  {
300
+ jQuery("#button_set_outer_label_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][13].cb_button_set_outer_label);
301
  jQuery("#time_css_label_"+dynamicId).attr("style","display:block");
302
  jQuery("#time_css_label_"+dynamicId).attr("style","position:inherit");
303
  }
304
+ if(array_controls[<?php echo $dynamicCount;?>][14].cb_button_set_txt_input != "")
305
  {
306
+ jQuery("#button_set_textinput_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][14].cb_button_set_txt_input);
307
  jQuery("#time_text_input_"+dynamicId).attr("style","display:block");
308
  jQuery("#time_text_input_"+dynamicId).attr("style","position:inherit");
309
  }
310
+ if(array_controls[<?php echo $dynamicCount;?>][15].cb_button_set_description != "")
311
  {
312
+ jQuery("#button_set_outer_description_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][15].cb_button_set_description);
313
  jQuery("#time_description_"+dynamicId).attr("style","display:block");
314
  jQuery("#time_description_"+dynamicId).attr("style","position:inherit");
315
  }
316
+ if(array_controls[<?php echo $dynamicCount;?>][16].cb_button_set_time_hour_dropdown != "")
317
  {
318
+ jQuery("#ux_time_hour_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][16].cb_button_set_time_hour_dropdown);
319
  jQuery("#time_set_time_hour_"+dynamicId).attr("style","display:block");
320
  jQuery("#time_set_time_hour_"+dynamicId).attr("style","position:inherit");
321
  }
322
+ if(array_controls[<?php echo $dynamicCount;?>][17].cb_button_set_time_minute_dropdown != "")
323
  {
324
+ jQuery("#ux_time_minute_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][17].cb_button_set_time_minute_dropdown);
325
  jQuery("#button_set_time_minute_"+dynamicId).attr("style","display:block");
326
  jQuery("#button_set_time_minute_"+dynamicId).attr("style","position:inherit");
327
  }
328
+ if(array_controls[<?php echo $dynamicCount;?>][18].cb_button_set_time_am_pm_dropdown != "")
329
  {
330
+ jQuery("#button_set_time_am_"+dynamicId).html(array_controls[<?php echo $dynamicCount;?>][18].cb_button_set_time_am_pm_dropdown);
331
  jQuery("#ux_tr_set_time_am_"+dynamicId).attr("style","display:block");
332
  jQuery("#ux_tr_set_time_am_"+dynamicId).attr("style","position:inherit");
333
  }
383
  jQuery("#ux_ddl_select_ampm_"+dynamicId).val(ux_default_format);
384
  }
385
 
386
+ function save_time_control(dynamicId,dynamicCount)
387
  {
388
+
389
  array_controls[dynamicCount] = [];
390
  array_controls[dynamicCount].push({"control_type" :" 13"});
391
  array_controls[dynamicCount].push({"time_dynamicId" : dynamicId});
440
  {
441
  jQuery("#txt_required_"+dynamicId).css("display","none");
442
  }
443
+ //console.log("pushed control : 13, Dynamic Count : " + dynamicCount + ", Array Count = " + array_controls[dynamicCount].length);
444
+ //console.log(JSON.stringify(array_controls[dynamicCount]));
445
  CloseLightbox();
446
  }
447
  function enter_admin_label(dynamicId)
lib/contact_bank_email-class.php CHANGED
@@ -432,7 +432,7 @@ else
432
  $email_to_client = esc_attr($_REQUEST["ux_email_to2"]);
433
  $email_from_client = esc_attr($_REQUEST["ux_email_from2"]);
434
  $subject_client = esc_attr($_REQUEST["ux_email_subject2"]);
435
- $uxDescription_client = html_entity_decode($_REQUEST["uxDescription_client"]);
436
  $email_to_admin = esc_attr($_REQUEST["ux_email_to"]);
437
  $email_from_admin = esc_attr($_REQUEST["ux_email_from"]);
438
  $subject_admin = esc_attr($_REQUEST["ux_email_subject"]);
432
  $email_to_client = esc_attr($_REQUEST["ux_email_to2"]);
433
  $email_from_client = esc_attr($_REQUEST["ux_email_from2"]);
434
  $subject_client = esc_attr($_REQUEST["ux_email_subject2"]);
435
+ $uxDescription_client = html_entity_decode($_REQUEST["uxDescription_client"]);
436
  $email_to_admin = esc_attr($_REQUEST["ux_email_to"]);
437
  $email_from_admin = esc_attr($_REQUEST["ux_email_from"]);
438
  $subject_admin = esc_attr($_REQUEST["ux_email_subject"]);
lib/contact_view-class.php CHANGED
@@ -261,8 +261,6 @@ else
261
  }
262
  else
263
  {
264
-
265
- $control_type = intval($_REQUEST["control_type"]);
266
  $array_controls = json_decode(stripcslashes(html_entity_decode($_REQUEST["array_controls"])));
267
  $count = 0;
268
  $dynamicId = 0;
261
  }
262
  else
263
  {
 
 
264
  $array_controls = json_decode(stripcslashes(html_entity_decode($_REQUEST["array_controls"])));
265
  $count = 0;
266
  $dynamicId = 0;
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Contact Bank ===
2
- Contributors: contact-banker
3
- Tags: Contact Form, text, contact, form, contacts, request, contact me, feedback form, feedback, easy contact form, best contact form plugin, admin, Post, widget, contact bank, contact form 7, plugin, Posts, ajax, contact form 7
4
  Requires at least: 2.9
5
  Tested up to: 3.7.1
6
- Stable tag: 1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -17,7 +17,8 @@ Contact Bank can manage multiple forms, plus you can customize the form and the
17
 
18
  **The following are other recommended plugins by the author of Contact Bank.**
19
 
20
- * [Captcha Bank](http://wordpress.org/extend/plugins/captcha-bank/) - An easy to use powerful wordpress Captcha Plugin to prevent spam on your site.
 
21
 
22
  **How to setup and add Form to Contact Bank?**
23
  [youtube http://www.youtube.com/watch?v=EcqbsXmPbaI]
@@ -95,6 +96,12 @@ Contact Bank can manage multiple forms, plus you can customize the form and the
95
  1. It means that such user is not exist or you have made a syntactical error.
96
 
97
  == Changelog ==
 
 
 
 
 
 
98
 
99
  = 1.5 =
100
 
1
  === Contact Bank ===
2
+ Contributors: contact-banker, Gallery-Bank
3
+ Tags: Contact Form, text, contact, form, contacts, request, contact me, feedback form, feedback, easy contact form, best contact form plugin, admin, Post, widget, contact bank, contact form 7, plugin, Posts, ajax, contact form 7, easy contact, advanced forms
4
  Requires at least: 2.9
5
  Tested up to: 3.7.1
6
+ Stable tag: 1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
17
 
18
  **The following are other recommended plugins by the author of Contact Bank.**
19
 
20
+ * [Gallery Bank](http://wordpress.org/extend/plugins/gallery-bank/) - Gallery Bank is an easy to use Responsive WordPress Premium Gallery Plugin for galleries, videos and albums.
21
+ * [Captcha Bank](http://wordpress.org/extend/plugins/captcha-bank/) - An easy to use powerful wordpress Captcha Plugin to prevent spam on your site.lbums.
22
 
23
  **How to setup and add Form to Contact Bank?**
24
  [youtube http://www.youtube.com/watch?v=EcqbsXmPbaI]
96
  1. It means that such user is not exist or you have made a syntactical error.
97
 
98
  == Changelog ==
99
+ = 1.6 =
100
+
101
+ * Widget Added
102
+ * Database Bugs Fixed
103
+ * Code Opimized
104
+ * Css Issues Fixed
105
 
106
  = 1.5 =
107
 
views/contact_bank_email_management.php CHANGED
@@ -45,7 +45,14 @@ if(isset($_REQUEST['param']))
45
  $dynamicId = $frontend_control_value[$flag]->dynamic_control_id;
46
  if($frontend_control_value[$flag]->field_Id == 3)
47
  {
48
- $client_email .= $frontend_control_value[$flag]->dynamic_frontend_value;
 
 
 
 
 
 
 
49
  }
50
  if($frontend_control_value[$flag]->field_Id == 12)
51
  {
@@ -58,19 +65,19 @@ if(isset($_REQUEST['param']))
58
  "cb_date_format"
59
  )
60
  );
61
- if($date_format == 0)
62
  {
63
  $frontend_control = date("F d, Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
64
  }
65
- else if($date_format == 1)
66
  {
67
  $frontend_control = date("Y/m/d", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
68
  }
69
- else if($date_format == 2)
70
  {
71
  $frontend_control = date("m/d/Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
72
  }
73
- else if($date_format == 3)
74
  {
75
  $frontend_control = date("d/m/Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
76
  }
@@ -91,7 +98,7 @@ if(isset($_REQUEST['param']))
91
  if($hour_format == "12")
92
  {
93
  $time_content = explode("-", $frontend_control_value[$flag]->dynamic_frontend_value);
94
- if($time_content[2] == 0)
95
  {
96
  $AM = "AM";
97
  }
@@ -99,7 +106,7 @@ if(isset($_REQUEST['param']))
99
  {
100
  $AM = "PM";
101
  }
102
- if($time_content[1] < 10)
103
  {
104
  $time_final = $time_content[0].":"."0".$time_content[1]." ".$AM;
105
  }
@@ -143,11 +150,9 @@ if(isset($_REQUEST['param']))
143
  }
144
  else
145
  {
146
- if($frontend_control_value[$flag]->field_Id != 9)
147
- {
148
- $messageTxt = str_replace("[control_".$dynamicId."]",$frontend_control_value[$flag]->dynamic_frontend_value, $messageTxt)."<br />" ;
149
- $messageTxt_client = str_replace("[control_client_".$dynamicId."]",$frontend_control_value[$flag]->dynamic_frontend_value, $messageTxt_client)."<br />" ;
150
- }
151
  }
152
  }
153
  $admin_label = get_option( 'admin_email');
45
  $dynamicId = $frontend_control_value[$flag]->dynamic_control_id;
46
  if($frontend_control_value[$flag]->field_Id == 3)
47
  {
48
+ if($client_email != "")
49
+ {
50
+ $client_email .= ";" . $frontend_control_value[$flag]->dynamic_frontend_value;
51
+ }
52
+ else {
53
+ $client_email = $frontend_control_value[$flag]->dynamic_frontend_value;
54
+ }
55
+
56
  }
57
  if($frontend_control_value[$flag]->field_Id == 12)
58
  {
65
  "cb_date_format"
66
  )
67
  );
68
+ if($date_format == "0")
69
  {
70
  $frontend_control = date("F d, Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
71
  }
72
+ else if($date_format == "1")
73
  {
74
  $frontend_control = date("Y/m/d", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
75
  }
76
+ else if($date_format == "2")
77
  {
78
  $frontend_control = date("m/d/Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
79
  }
80
+ else if($date_format == "3")
81
  {
82
  $frontend_control = date("d/m/Y", strtotime($frontend_control_value[$flag]->dynamic_frontend_value));
83
  }
98
  if($hour_format == "12")
99
  {
100
  $time_content = explode("-", $frontend_control_value[$flag]->dynamic_frontend_value);
101
+ if(intval($time_content[2])== 0)
102
  {
103
  $AM = "AM";
104
  }
106
  {
107
  $AM = "PM";
108
  }
109
+ if(intval($time_content[1]) < 10)
110
  {
111
  $time_final = $time_content[0].":"."0".$time_content[1]." ".$AM;
112
  }
150
  }
151
  else
152
  {
153
+
154
+ $messageTxt = str_replace("[control_".$dynamicId."]",$frontend_control_value[$flag]->dynamic_frontend_value, $messageTxt)."<br />" ;
155
+ $messageTxt_client = str_replace("[control_client_".$dynamicId."]",$frontend_control_value[$flag]->dynamic_frontend_value, $messageTxt_client)."<br />" ;
 
 
156
  }
157
  }
158
  $admin_label = get_option( 'admin_email');
views/contact_bank_frontend.php CHANGED
@@ -928,7 +928,7 @@ $fields = $wpdb->get_results
928
  <?php
929
  }
930
  ?>
931
- <select style="<?php echo $cb_button_set_time_minute_dropdown; ?>" class="layout-span3" type="select_time" id="ux_ddl_select_minute_<?php echo $dynamicId; ?>" name="select_min_<?php echo $dynamicId; ?>">
932
  <option value=""><?php _e("Minute",contact_bank);?></option>
933
  <?php
934
  for($flag4=0; $flag4 < 60;)
@@ -1005,7 +1005,7 @@ $fields = $wpdb->get_results
1005
  $index = array_search("cb_checkbox_alpha_filter", $keys);
1006
  $checkbox_alpha_filter_password = $fields_dynamic_controls[$index]->dynamic_settings_value;
1007
 
1008
- $index = array_search("ux_checkbox_alpha_num_filter", $keys);
1009
  $checkbox_alpha_num_filter_password = $fields_dynamic_controls[$index]->dynamic_settings_value;
1010
 
1011
  $index = array_search("cb_checkbox_digit_filter", $keys);
@@ -1083,7 +1083,10 @@ $fields = $wpdb->get_results
1083
  }
1084
  ?>
1085
  <div class="layout-control-group">
1086
- <input class="btn btn-info layout-span2" type="submit" id="submit_button" name="submit_button" value="<?php _e("Submit Form", contact_bank); ?>" /></td>
 
 
 
1087
  </div>
1088
  </div>
1089
  </div>
@@ -1258,7 +1261,6 @@ jQuery("#ux_contact_form_submit").validate
1258
  var form_id = <?php echo $form_id ;?>;
1259
  jQuery.post(ajaxurl, jQuery(form).serialize() +"&form_id="+form_id+"&file_uploaded_path="+file_uploaded_path+"&param=frontend_submit_controls&action=frontend_contact_form_library", function(data)
1260
  {
1261
-
1262
  var submit_id = data;
1263
  jQuery.post(ajaxurl, "form_id="+form_id+"&submit_id="+submit_id+"&param=email_management&action=email_management_contact_form_library", function(data)
1264
  {
928
  <?php
929
  }
930
  ?>
931
+ <select style="<?php echo $cb_button_set_time_minute_dropdown; ?>" class="layout-span3" type="select_time" id="ux_ddl_select_minute_<?php echo $dynamicId; ?>" name="ux_ddl_select_minute_<?php echo $dynamicId; ?>">
932
  <option value=""><?php _e("Minute",contact_bank);?></option>
933
  <?php
934
  for($flag4=0; $flag4 < 60;)
1005
  $index = array_search("cb_checkbox_alpha_filter", $keys);
1006
  $checkbox_alpha_filter_password = $fields_dynamic_controls[$index]->dynamic_settings_value;
1007
 
1008
+ $index = array_search("cb_checkbox_alpha_num_filter", $keys);
1009
  $checkbox_alpha_num_filter_password = $fields_dynamic_controls[$index]->dynamic_settings_value;
1010
 
1011
  $index = array_search("cb_checkbox_digit_filter", $keys);
1083
  }
1084
  ?>
1085
  <div class="layout-control-group">
1086
+ <label class="layout-control-label"></label>
1087
+ <div class="layout-controls">
1088
+ <input class="btn btn-info layout-span2" type="submit" id="submit_button" name="submit_button" value="<?php _e("Submit Form", contact_bank); ?>" />
1089
+ </div>
1090
  </div>
1091
  </div>
1092
  </div>
1261
  var form_id = <?php echo $form_id ;?>;
1262
  jQuery.post(ajaxurl, jQuery(form).serialize() +"&form_id="+form_id+"&file_uploaded_path="+file_uploaded_path+"&param=frontend_submit_controls&action=frontend_contact_form_library", function(data)
1263
  {
 
1264
  var submit_id = data;
1265
  jQuery.post(ajaxurl, "form_id="+form_id+"&submit_id="+submit_id+"&param=email_management&action=email_management_contact_form_library", function(data)
1266
  {
views/contact_view.php CHANGED
@@ -464,100 +464,93 @@ function create_control(control_type)
464
  switch(parseInt(control_type))
465
  {
466
  case 1:
467
- jQuery("#div_1_1").clone(false).attr("id","div_"+dynamicId+"_1").appendTo("#left_block");
468
- jQuery("#div_"+dynamicId+"_1").children("label").attr("id","control_label_"+dynamicId);
469
- jQuery("#div_"+dynamicId+"_1").children("span").attr("id","txt_required_"+dynamicId);
470
- jQuery("#div_"+dynamicId+"_1").children("div").attr("id","show_tooltip"+dynamicId);
471
- jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("id","ux_txt_textbox_control_"+dynamicId);
472
- jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("name","ux_txt_textbox_control_"+dynamicId);
473
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
474
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",1)");
475
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
476
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_1,"+dynamicId+",1)");
477
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
478
- jQuery("#div_"+dynamicId+"_1").attr("style","display:block");
479
-
480
-
481
-
482
  break;
483
  case 2:
484
- jQuery("#div_2_2").clone(false).attr("id","div_"+dynamicId+"_2").appendTo("#left_block");
485
- jQuery("#div_"+dynamicId+"_2").children("label").attr("id","control_label_"+dynamicId);
486
- jQuery("#div_"+dynamicId+"_2").children("span").attr("id","txt_required_"+dynamicId);
487
- jQuery("#div_"+dynamicId+"_2").children("div").attr("id","show_tooltip"+dynamicId);
488
- jQuery("#show_tooltip"+dynamicId ).children("textarea[type='textarea']").attr("id","ux_textarea_control_"+dynamicId);
489
- jQuery("#show_tooltip"+dynamicId ).children("textarea[type='textarea']").attr("name","ux_textarea_control_"+dynamicId);
490
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
491
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",2)");
492
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
493
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_2,"+dynamicId+",2)");
494
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
495
- jQuery("#div_"+dynamicId+"_2").attr("style","display:block");
496
-
497
 
498
  break;
499
  case 3:
500
- jQuery("#div_3_3").clone(false).attr("id","div_"+dynamicId+"_3").appendTo("#left_block");
501
- jQuery("#div_"+dynamicId+"_3").children("label").attr("id","control_label_"+dynamicId);
502
- jQuery("#div_"+dynamicId+"_3").children("span").attr("id","txt_required_"+dynamicId);
503
- jQuery("#div_"+dynamicId+"_3").children("div").attr("id","show_tooltip"+dynamicId);
504
- jQuery("#div_"+dynamicId+"_3" ).children("input[type='text']").attr("id","ux_txt_email_"+dynamicId);
505
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
506
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",3)");
507
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
508
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_3,"+dynamicId+",3)");
509
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
510
- jQuery("#div_"+dynamicId+"_3").attr("style","display:block");
511
-
512
-
513
  break;
514
  case 4:
515
- jQuery("#div_4_4").clone(false).attr("id","div_"+dynamicId+"_4").appendTo("#left_block");
516
- jQuery("#div_"+dynamicId+"_4").children("label").attr("id","control_label_"+dynamicId);
517
- jQuery("#div_"+dynamicId+"_4").children("span").attr("id","txt_required_"+dynamicId);
518
- jQuery("#div_"+dynamicId+"_4").children("div").attr("id","show_tooltip"+dynamicId);
519
- jQuery("#show_tooltip"+dynamicId ).children("select[type='select']").attr("id","ux_ddl_select_control"+dynamicId);
520
- jQuery("#show_tooltip"+dynamicId ).children("select[type='select']").attr("name","ux_ddl_select_control"+dynamicId);
521
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
522
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",4)");
523
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
524
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_4,"+dynamicId+",4)");
525
- jQuery("#div_"+dynamicId+"_4").attr("style","display:block");
526
-
527
-
528
  break;
529
  case 5:
530
- jQuery("#div_5_5").clone(false).attr("id","div_"+dynamicId+"_5").appendTo("#left_block");
531
- jQuery("#div_"+dynamicId+"_5").children("label").attr("id","control_label_"+dynamicId);
532
- jQuery("#div_"+dynamicId+"_5").children("span").attr("id","txt_required_"+dynamicId);
533
- jQuery("#div_"+dynamicId+"_5").children("div").attr("id","post_back_checkbox_"+dynamicId);
534
- jQuery("#post_back_checkbox_"+dynamicId).children("div").attr("id","show_tooltip"+dynamicId);
535
- jQuery("#show_tooltip"+dynamicId ).children("input[type='checkbox']").attr("id","ux_chk_checkbox_control_"+dynamicId);
536
- jQuery("#show_tooltip"+dynamicId ).children("input[type='checkbox']").attr("name","ux_chk_checkbox_control_"+dynamicId);
537
- jQuery("#show_tooltip"+dynamicId ).children("span").attr("id","add_chk_options_here_"+dynamicId);
538
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
539
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",5)");
540
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
541
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_5,"+dynamicId+",5)");
542
- jQuery("#div_"+dynamicId+"_5").attr("style","display:block");
543
-
544
-
545
  break;
546
  case 6:
547
- jQuery("#div_6_6").clone(false).attr("id","div_"+dynamicId+"_6").appendTo("#left_block");
548
- jQuery("#div_"+dynamicId+"_6").children("label").attr("id","control_label_"+dynamicId);
549
- jQuery("#div_"+dynamicId+"_6").children("span").attr("id","txt_required_"+dynamicId);
550
- jQuery("#div_"+dynamicId+"_6").children("div").attr("id","post_back_radio_button_"+dynamicId);
551
- jQuery("#post_back_radio_button_"+dynamicId).children("div").attr("id","show_tooltip"+dynamicId);
552
- jQuery("#show_tooltip"+dynamicId ).children("input[type='radio']").attr("id","ux_radio_button_control_"+dynamicId);
553
- jQuery("#show_tooltip"+dynamicId ).children("input[type='radio']").attr("name","ux_radio_button_control_"+dynamicId);
554
- jQuery("#show_tooltip"+dynamicId ).children("span").attr("id","add_radio_options_here_"+dynamicId);
555
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
556
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",6)");
557
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
558
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_6,"+dynamicId+",6)");
559
- jQuery("#div_"+dynamicId+"_6").attr("style","display:block");
560
-
561
 
562
  break;
563
  case 9:
@@ -579,77 +572,77 @@ function create_control(control_type)
579
 
580
  break;
581
  case 12:
582
- jQuery("#div_12_12").clone(false).attr("id","div_"+dynamicId+"_12").appendTo("#left_block");
583
- jQuery("#div_"+dynamicId+"_12").children("label.layout-control-label").attr("id","control_label_"+dynamicId);
584
- jQuery("#div_"+dynamicId+"_12").children("span").attr("id","txt_required_"+dynamicId);
585
- jQuery("#div_"+dynamicId+"_12").children("div").attr("id","show_tooltip"+dynamicId);
586
- jQuery("#show_tooltip"+dynamicId).children("select[type='day']").attr("id","ux_ddl_select_day_"+dynamicId);
587
- jQuery("#show_tooltip"+dynamicId).children("select[type='day']").attr("name","ux_ddl_select_day_"+dynamicId);
588
- jQuery("#show_tooltip"+dynamicId).children("select[type='month']").attr("id","ux_ddl_select_month_"+dynamicId);
589
- jQuery("#show_tooltip"+dynamicId).children("select[type='month']").attr("name","ux_ddl_select_month_"+dynamicId);
590
- jQuery("#show_tooltip"+dynamicId).children("select[type='year']").attr("id","ux_ddl_select_year_"+dynamicId);
591
- jQuery("#show_tooltip"+dynamicId).children("select[type='year']").attr("name","ux_ddl_select_year_"+dynamicId);
592
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
593
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",12)");
594
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
595
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_12,"+dynamicId+",12)");
596
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
597
- jQuery("#div_"+dynamicId+"_12").attr("style","display:block");
598
- jQuery("#ux_ddl_select_day_"+dynamicId).val((new Date).getDate());
599
- jQuery("#ux_ddl_select_month_"+dynamicId).val((new Date).getMonth()+1);
600
- jQuery("#ux_ddl_select_year_"+dynamicId).val((new Date).getFullYear());
601
 
602
  break;
603
  case 13:
604
- jQuery("#div_13_13").clone(false).attr("id","div_"+dynamicId+"_13").appendTo("#left_block");
605
- jQuery("#div_"+dynamicId+"_13").children("label.layout-control-label").attr("id","control_label_"+dynamicId);
606
- jQuery("#div_"+dynamicId+"_13").children("span").attr("id","txt_required_"+dynamicId);
607
- jQuery("#div_"+dynamicId+"_13").children("div").attr("id","show_tooltip"+dynamicId);
608
- jQuery("#show_tooltip"+dynamicId).children("select[type='hour12']").attr("id","ux_ddl_select_hr_12_"+dynamicId);
609
- jQuery("#show_tooltip"+dynamicId).children("select[type='hour12']").attr("name","ux_ddl_select_hr_12_"+dynamicId);
610
- jQuery("#show_tooltip"+dynamicId).children("select[type='hour24']").attr("id","ux_ddl_select_hr_24_"+dynamicId);
611
- jQuery("#show_tooltip"+dynamicId).children("select[type='hour24']").attr("name","ux_ddl_select_hr_24_"+dynamicId);
612
- jQuery("#show_tooltip"+dynamicId).children("select[type='minute']").attr("id","ux_ddl_select_minute_"+dynamicId);
613
- jQuery("#show_tooltip"+dynamicId).children("select[type='minute']").attr("name","ux_ddl_select_minute_"+dynamicId);
614
- jQuery("#show_tooltip"+dynamicId).children("select[type='am']").attr("id","ux_ddl_select_ampm_"+dynamicId);
615
- jQuery("#show_tooltip"+dynamicId).children("select[type='am']").attr("name","ux_ddl_select_ampm_"+dynamicId);
616
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
617
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",13)");
618
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
619
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_13,"+dynamicId+",13)");
620
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
621
- jQuery("#div_"+dynamicId+"_13").attr("style","display:block");
622
-
623
  break;
624
  case 14:
625
- jQuery("#div_14_14").clone(false).attr("id","div_"+dynamicId+"_14").appendTo("#left_block");
626
- jQuery("#div_"+dynamicId+"_14").children("label").attr("id","control_label_"+dynamicId);
627
- jQuery("#div_"+dynamicId+"_14").children("span").attr("id","txt_required_"+dynamicId);
628
- jQuery("#div_"+dynamicId+"_14").children("div").attr("id","show_tooltip"+dynamicId);
629
- jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("id","ux_txt_hidden_control_"+dynamicId);
630
- jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("name","ux_txt_hidden_control_"+dynamicId);
631
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
632
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",14)");
633
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
634
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_14,"+dynamicId+",14)");
635
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
636
- jQuery("#div_"+dynamicId+"_14").attr("style","display:block");
637
 
638
  break;
639
  case 15:
640
- jQuery("#div_15_15").clone(false).attr("id","div_"+dynamicId+"_15").appendTo("#left_block");
641
- jQuery("#div_"+dynamicId+"_15").children("label").attr("id","control_label_"+dynamicId);
642
- jQuery("#div_"+dynamicId+"_15").children("span").attr("id","txt_required_"+dynamicId);
643
- jQuery("#div_"+dynamicId+"_15").children("div").attr("id","show_tooltip"+dynamicId);
644
- jQuery("#show_tooltip"+dynamicId ).children("input[type='password']").attr("id","ux_txt_password_control_"+dynamicId);
645
- jQuery("#show_tooltip"+dynamicId ).children("input[type='password']").attr("name","ux_txt_password_control_"+dynamicId);
646
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
647
- jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",15)");
648
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
649
- jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_15,"+dynamicId+",15)");
650
- jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
651
- jQuery("#div_"+dynamicId+"_15").attr("style","display:block");
652
-
653
  break;
654
  }
655
  }
@@ -860,6 +853,7 @@ function delete_textbox(div_id,dynamicId,control_type)
860
  jQuery("#" + dynamicId).remove();
861
  new_control_dynamic_ids.splice(index, 1);
862
  created_control_type.splice(index, 1);
 
863
  if(control_type == 9)
864
  {
865
  jQuery(".file_upload").attr("style","display:none");
@@ -1152,10 +1146,13 @@ jQuery("#ux_dynamic_form_submit").validate
1152
  }
1153
  break;
1154
  }
 
 
 
1155
  jQuery.ajax
1156
  ({
1157
  type: "POST",
1158
- url: ajaxurl + "?"+ jQuery(form).serialize() + "&array_controls="+encodeURIComponent(JSON.stringify(array_controls[array_dynamicCount[flag]]))+"&form=0&control_type=1&param=submit_controls&action=add_contact_form_library",
1159
  success : function(data)
1160
  {
1161
  if(field_no == flag)
@@ -1171,6 +1168,8 @@ jQuery("#ux_dynamic_form_submit").validate
1171
  }
1172
  });
1173
  }
 
 
1174
  if(new_control_dynamic_ids.length == 0)
1175
  {
1176
  setTimeout(function()
464
  switch(parseInt(control_type))
465
  {
466
  case 1:
467
+ jQuery("#div_1_1").clone(false).attr("id","div_"+dynamicId+"_1").appendTo("#left_block");
468
+ jQuery("#div_"+dynamicId+"_1").children("label").attr("id","control_label_"+dynamicId);
469
+ jQuery("#div_"+dynamicId+"_1").children("span").attr("id","txt_required_"+dynamicId);
470
+ jQuery("#div_"+dynamicId+"_1").children("div").attr("id","show_tooltip"+dynamicId);
471
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("id","ux_txt_textbox_control_"+dynamicId);
472
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("name","ux_txt_textbox_control_"+dynamicId);
473
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
474
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",1)");
475
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
476
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_1,"+dynamicId+",1)");
477
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
478
+ jQuery("#div_"+dynamicId+"_1").attr("style","display:block");
479
+
 
 
480
  break;
481
  case 2:
482
+ jQuery("#div_2_2").clone(false).attr("id","div_"+dynamicId+"_2").appendTo("#left_block");
483
+ jQuery("#div_"+dynamicId+"_2").children("label").attr("id","control_label_"+dynamicId);
484
+ jQuery("#div_"+dynamicId+"_2").children("span").attr("id","txt_required_"+dynamicId);
485
+ jQuery("#div_"+dynamicId+"_2").children("div").attr("id","show_tooltip"+dynamicId);
486
+ jQuery("#show_tooltip"+dynamicId ).children("textarea[type='textarea']").attr("id","ux_textarea_control_"+dynamicId);
487
+ jQuery("#show_tooltip"+dynamicId ).children("textarea[type='textarea']").attr("name","ux_textarea_control_"+dynamicId);
488
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
489
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",2)");
490
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
491
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_2,"+dynamicId+",2)");
492
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
493
+ jQuery("#div_"+dynamicId+"_2").attr("style","display:block");
 
494
 
495
  break;
496
  case 3:
497
+ jQuery("#div_3_3").clone(false).attr("id","div_"+dynamicId+"_3").appendTo("#left_block");
498
+ jQuery("#div_"+dynamicId+"_3").children("label").attr("id","control_label_"+dynamicId);
499
+ jQuery("#div_"+dynamicId+"_3").children("span").attr("id","txt_required_"+dynamicId);
500
+ jQuery("#div_"+dynamicId+"_3").children("div").attr("id","show_tooltip"+dynamicId);
501
+ jQuery("#div_"+dynamicId+"_3" ).children("input[type='text']").attr("id","ux_txt_email_"+dynamicId);
502
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
503
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",3)");
504
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
505
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_3,"+dynamicId+",3)");
506
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
507
+ jQuery("#div_"+dynamicId+"_3").attr("style","display:block");
508
+
 
509
  break;
510
  case 4:
511
+ jQuery("#div_4_4").clone(false).attr("id","div_"+dynamicId+"_4").appendTo("#left_block");
512
+ jQuery("#div_"+dynamicId+"_4").children("label").attr("id","control_label_"+dynamicId);
513
+ jQuery("#div_"+dynamicId+"_4").children("span").attr("id","txt_required_"+dynamicId);
514
+ jQuery("#div_"+dynamicId+"_4").children("div").attr("id","show_tooltip"+dynamicId);
515
+ jQuery("#show_tooltip"+dynamicId ).children("select[type='select']").attr("id","ux_ddl_select_control"+dynamicId);
516
+ jQuery("#show_tooltip"+dynamicId ).children("select[type='select']").attr("name","ux_ddl_select_control"+dynamicId);
517
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
518
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",4)");
519
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
520
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_4,"+dynamicId+",4)");
521
+ jQuery("#div_"+dynamicId+"_4").attr("style","display:block");
522
+
 
523
  break;
524
  case 5:
525
+ jQuery("#div_5_5").clone(false).attr("id","div_"+dynamicId+"_5").appendTo("#left_block");
526
+ jQuery("#div_"+dynamicId+"_5").children("label").attr("id","control_label_"+dynamicId);
527
+ jQuery("#div_"+dynamicId+"_5").children("span").attr("id","txt_required_"+dynamicId);
528
+ jQuery("#div_"+dynamicId+"_5").children("div").attr("id","post_back_checkbox_"+dynamicId);
529
+ jQuery("#post_back_checkbox_"+dynamicId).children("div").attr("id","show_tooltip"+dynamicId);
530
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='checkbox']").attr("id","ux_chk_checkbox_control_"+dynamicId);
531
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='checkbox']").attr("name","ux_chk_checkbox_control_"+dynamicId);
532
+ jQuery("#show_tooltip"+dynamicId ).children("span").attr("id","add_chk_options_here_"+dynamicId);
533
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
534
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",5)");
535
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
536
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_5,"+dynamicId+",5)");
537
+ jQuery("#div_"+dynamicId+"_5").attr("style","display:block");
538
+
 
539
  break;
540
  case 6:
541
+ jQuery("#div_6_6").clone(false).attr("id","div_"+dynamicId+"_6").appendTo("#left_block");
542
+ jQuery("#div_"+dynamicId+"_6").children("label").attr("id","control_label_"+dynamicId);
543
+ jQuery("#div_"+dynamicId+"_6").children("span").attr("id","txt_required_"+dynamicId);
544
+ jQuery("#div_"+dynamicId+"_6").children("div").attr("id","post_back_radio_button_"+dynamicId);
545
+ jQuery("#post_back_radio_button_"+dynamicId).children("div").attr("id","show_tooltip"+dynamicId);
546
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='radio']").attr("id","ux_radio_button_control_"+dynamicId);
547
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='radio']").attr("name","ux_radio_button_control_"+dynamicId);
548
+ jQuery("#show_tooltip"+dynamicId ).children("span").attr("id","add_radio_options_here_"+dynamicId);
549
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
550
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",6)");
551
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
552
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_6,"+dynamicId+",6)");
553
+ jQuery("#div_"+dynamicId+"_6").attr("style","display:block");
 
554
 
555
  break;
556
  case 9:
572
 
573
  break;
574
  case 12:
575
+ jQuery("#div_12_12").clone(false).attr("id","div_"+dynamicId+"_12").appendTo("#left_block");
576
+ jQuery("#div_"+dynamicId+"_12").children("label.layout-control-label").attr("id","control_label_"+dynamicId);
577
+ jQuery("#div_"+dynamicId+"_12").children("span").attr("id","txt_required_"+dynamicId);
578
+ jQuery("#div_"+dynamicId+"_12").children("div").attr("id","show_tooltip"+dynamicId);
579
+ jQuery("#show_tooltip"+dynamicId).children("select[type='day']").attr("id","ux_ddl_select_day_"+dynamicId);
580
+ jQuery("#show_tooltip"+dynamicId).children("select[type='day']").attr("name","ux_ddl_select_day_"+dynamicId);
581
+ jQuery("#show_tooltip"+dynamicId).children("select[type='month']").attr("id","ux_ddl_select_month_"+dynamicId);
582
+ jQuery("#show_tooltip"+dynamicId).children("select[type='month']").attr("name","ux_ddl_select_month_"+dynamicId);
583
+ jQuery("#show_tooltip"+dynamicId).children("select[type='year']").attr("id","ux_ddl_select_year_"+dynamicId);
584
+ jQuery("#show_tooltip"+dynamicId).children("select[type='year']").attr("name","ux_ddl_select_year_"+dynamicId);
585
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
586
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",12)");
587
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
588
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_12,"+dynamicId+",12)");
589
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
590
+ jQuery("#div_"+dynamicId+"_12").attr("style","display:block");
591
+ jQuery("#ux_ddl_select_day_"+dynamicId).val((new Date).getDate());
592
+ jQuery("#ux_ddl_select_month_"+dynamicId).val((new Date).getMonth()+1);
593
+ jQuery("#ux_ddl_select_year_"+dynamicId).val((new Date).getFullYear());
594
 
595
  break;
596
  case 13:
597
+ jQuery("#div_13_13").clone(false).attr("id","div_"+dynamicId+"_13").appendTo("#left_block");
598
+ jQuery("#div_"+dynamicId+"_13").children("label.layout-control-label").attr("id","control_label_"+dynamicId);
599
+ jQuery("#div_"+dynamicId+"_13").children("span").attr("id","txt_required_"+dynamicId);
600
+ jQuery("#div_"+dynamicId+"_13").children("div").attr("id","show_tooltip"+dynamicId);
601
+ jQuery("#show_tooltip"+dynamicId).children("select[type='hour12']").attr("id","ux_ddl_select_hr_12_"+dynamicId);
602
+ jQuery("#show_tooltip"+dynamicId).children("select[type='hour12']").attr("name","ux_ddl_select_hr_12_"+dynamicId);
603
+ jQuery("#show_tooltip"+dynamicId).children("select[type='hour24']").attr("id","ux_ddl_select_hr_24_"+dynamicId);
604
+ jQuery("#show_tooltip"+dynamicId).children("select[type='hour24']").attr("name","ux_ddl_select_hr_24_"+dynamicId);
605
+ jQuery("#show_tooltip"+dynamicId).children("select[type='minute']").attr("id","ux_ddl_select_minute_"+dynamicId);
606
+ jQuery("#show_tooltip"+dynamicId).children("select[type='minute']").attr("name","ux_ddl_select_minute_"+dynamicId);
607
+ jQuery("#show_tooltip"+dynamicId).children("select[type='am']").attr("id","ux_ddl_select_ampm_"+dynamicId);
608
+ jQuery("#show_tooltip"+dynamicId).children("select[type='am']").attr("name","ux_ddl_select_ampm_"+dynamicId);
609
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
610
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",13)");
611
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
612
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_13,"+dynamicId+",13)");
613
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
614
+ jQuery("#div_"+dynamicId+"_13").attr("style","display:block");
615
+
616
  break;
617
  case 14:
618
+ jQuery("#div_14_14").clone(false).attr("id","div_"+dynamicId+"_14").appendTo("#left_block");
619
+ jQuery("#div_"+dynamicId+"_14").children("label").attr("id","control_label_"+dynamicId);
620
+ jQuery("#div_"+dynamicId+"_14").children("span").attr("id","txt_required_"+dynamicId);
621
+ jQuery("#div_"+dynamicId+"_14").children("div").attr("id","show_tooltip"+dynamicId);
622
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("id","ux_txt_hidden_control_"+dynamicId);
623
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='text']").attr("name","ux_txt_hidden_control_"+dynamicId);
624
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
625
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",14)");
626
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
627
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_14,"+dynamicId+",14)");
628
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
629
+ jQuery("#div_"+dynamicId+"_14").attr("style","display:block");
630
 
631
  break;
632
  case 15:
633
+ jQuery("#div_15_15").clone(false).attr("id","div_"+dynamicId+"_15").appendTo("#left_block");
634
+ jQuery("#div_"+dynamicId+"_15").children("label").attr("id","control_label_"+dynamicId);
635
+ jQuery("#div_"+dynamicId+"_15").children("span").attr("id","txt_required_"+dynamicId);
636
+ jQuery("#div_"+dynamicId+"_15").children("div").attr("id","show_tooltip"+dynamicId);
637
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='password']").attr("id","ux_txt_password_control_"+dynamicId);
638
+ jQuery("#show_tooltip"+dynamicId ).children("input[type='password']").attr("name","ux_txt_password_control_"+dynamicId);
639
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("id","add_setting_control_"+dynamicId);
640
+ jQuery("#show_tooltip"+dynamicId).children("a.btn").attr("onclick","add_settings("+dynamicId+","+dynamicCount+",15)");
641
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_").attr("id","anchor_del_"+dynamicId);
642
+ jQuery("#show_tooltip"+dynamicId).children("#anchor_del_"+dynamicId).attr("onclick","delete_textbox(div_"+dynamicId+"_15,"+dynamicId+",15)");
643
+ jQuery("#show_tooltip"+dynamicId).children("span").attr("id","txt_description_"+dynamicId);
644
+ jQuery("#div_"+dynamicId+"_15").attr("style","display:block");
645
+
646
  break;
647
  }
648
  }
853
  jQuery("#" + dynamicId).remove();
854
  new_control_dynamic_ids.splice(index, 1);
855
  created_control_type.splice(index, 1);
856
+ array_dynamicCount.splice(index, 1);
857
  if(control_type == 9)
858
  {
859
  jQuery(".file_upload").attr("style","display:none");
1146
  }
1147
  break;
1148
  }
1149
+ //console.log("Dynamic Count - " + array_dynamicCount[flag]);
1150
+ //console.log("Control Type - " + created_control_type[flag]);
1151
+ //console.log(JSON.stringify(array_controls[array_dynamicCount[flag]]));
1152
  jQuery.ajax
1153
  ({
1154
  type: "POST",
1155
+ url: ajaxurl + "?array_controls="+encodeURIComponent(JSON.stringify(array_controls[array_dynamicCount[flag]]))+"&form=0&param=submit_controls&action=add_contact_form_library",
1156
  success : function(data)
1157
  {
1158
  if(field_no == flag)
1168
  }
1169
  });
1170
  }
1171
+ //console.log(array_controls.length);
1172
+ //console.log(array_dynamicCount.length);
1173
  if(new_control_dynamic_ids.length == 0)
1174
  {
1175
  setTimeout(function()
views/edit_contact_view.php CHANGED
@@ -471,6 +471,8 @@ jQuery(document).ready(function()
471
  cursor: 'move',
472
  update: function()
473
  {
 
 
474
  var order = jQuery("#left_block").sortable('toArray');
475
 
476
  for(flag=0;flag<order.length;flag++)
@@ -517,7 +519,7 @@ function create_control(control_type,dynamicId,arrayControl)
517
  if(jQuery.inArray(9,created_control_type) != -1 || jQuery.inArray(9,existing_array_control_types) != -1)
518
  {
519
  alert("<?php _e( "Only One File Uploader can be used on a Form. ", contact_bank ); ?>");
520
- return;
521
  }
522
  }
523
 
@@ -527,11 +529,14 @@ function create_control(control_type,dynamicId,arrayControl)
527
  {
528
  var dynamicId = Math.floor((Math.random()*100000)+1);
529
  array_dynamicCount.push(dynamicCount);
 
 
530
  }
531
  else
532
  {
533
  existing_array_control_types.push(control_type);
534
  edit_created_control_type.push(dynamicCount);
 
535
  }
536
 
537
  switch(parseInt(control_type))
@@ -555,8 +560,6 @@ function create_control(control_type,dynamicId,arrayControl)
555
  var result = jQuery.inArray(dynamicId,edit_control_dynamic_ids);
556
  if(result == -1)
557
  {
558
- new_control_dynamic_ids.push(dynamicId);
559
- created_control_type.push(1);
560
  jQuery.each(new_control_dynamic_ids,function(index,value)
561
  {
562
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -567,9 +570,8 @@ function create_control(control_type,dynamicId,arrayControl)
567
  {
568
  jQuery("#control_label_"+dynamicId).html(arrayControl[0].dynamic_settings_value);
569
  jQuery("#txt_description_"+dynamicId).html(arrayControl[1].dynamic_settings_value);
570
-
571
  jQuery("#ux_txt_textbox_control_"+dynamicId).val(arrayControl[4].dynamic_settings_value);
572
- jQuery("#show_tooltip"+dynamicId).attr("data-original-title",arrayControl[3].dynamic_settings_value);
573
  arrayControl[2].dynamic_settings_value == "1" ? jQuery("#txt_required_"+dynamicId).css("display","block") : jQuery("#txt_required_"+dynamicId).css("display","none");
574
  }
575
 
@@ -593,8 +595,6 @@ function create_control(control_type,dynamicId,arrayControl)
593
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
594
  if(result == -1)
595
  {
596
- new_control_dynamic_ids.push(dynamicId);
597
- created_control_type.push(2);
598
  jQuery.each(new_control_dynamic_ids,function(index,value)
599
  {
600
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -629,8 +629,6 @@ function create_control(control_type,dynamicId,arrayControl)
629
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
630
  if(result == -1)
631
  {
632
- new_control_dynamic_ids.push(dynamicId);
633
- created_control_type.push(3);
634
  jQuery.each(new_control_dynamic_ids,function(index,value)
635
  {
636
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -641,7 +639,6 @@ function create_control(control_type,dynamicId,arrayControl)
641
  jQuery("#control_label_"+dynamicId).html(arrayControl[0].dynamic_settings_value +" :");
642
  jQuery("#txt_description_"+dynamicId).html(arrayControl[1].dynamic_settings_value);
643
  jQuery("#show_tooltip"+dynamicId).attr("data-original-title", arrayControl[3].dynamic_settings_value);
644
-
645
  arrayControl[2].dynamic_settings_value == "1" ? jQuery("#txt_required_"+dynamicId).css("display","block") : jQuery("#txt_required_"+dynamicId).css("display","none");
646
  }
647
 
@@ -664,8 +661,6 @@ function create_control(control_type,dynamicId,arrayControl)
664
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
665
  if(result == -1)
666
  {
667
- new_control_dynamic_ids.push(dynamicId);
668
- created_control_type.push(4);
669
  jQuery.each(new_control_dynamic_ids,function(index,value)
670
  {
671
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -716,8 +711,6 @@ function create_control(control_type,dynamicId,arrayControl)
716
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
717
  if(result == -1)
718
  {
719
- new_control_dynamic_ids.push(dynamicId);
720
- created_control_type.push(5);
721
  jQuery.each(new_control_dynamic_ids,function(index,value)
722
  {
723
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -769,8 +762,6 @@ function create_control(control_type,dynamicId,arrayControl)
769
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
770
  if(result == -1)
771
  {
772
- new_control_dynamic_ids.push(dynamicId);
773
- created_control_type.push(6);
774
  jQuery.each(new_control_dynamic_ids,function(index,value)
775
  {
776
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -821,8 +812,6 @@ function create_control(control_type,dynamicId,arrayControl)
821
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
822
  if(result == -1)
823
  {
824
- new_control_dynamic_ids.push(dynamicId);
825
- created_control_type.push(9);
826
  jQuery.each(new_control_dynamic_ids,function(index,value)
827
  {
828
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -878,8 +867,6 @@ function create_control(control_type,dynamicId,arrayControl)
878
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
879
  if(result == -1)
880
  {
881
- new_control_dynamic_ids.push(dynamicId);
882
- created_control_type.push(12);
883
  jQuery.each(new_control_dynamic_ids,function(index,value)
884
  {
885
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -945,8 +932,6 @@ function create_control(control_type,dynamicId,arrayControl)
945
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
946
  if(result == -1)
947
  {
948
- new_control_dynamic_ids.push(dynamicId);
949
- created_control_type.push(13);
950
  jQuery.each(new_control_dynamic_ids,function(index,value)
951
  {
952
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -1013,8 +998,6 @@ function create_control(control_type,dynamicId,arrayControl)
1013
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
1014
  if(result == -1)
1015
  {
1016
- new_control_dynamic_ids.push(dynamicId);
1017
- created_control_type.push(14);
1018
  jQuery.each(new_control_dynamic_ids,function(index,value)
1019
  {
1020
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -1047,8 +1030,6 @@ function create_control(control_type,dynamicId,arrayControl)
1047
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
1048
  if(result == -1)
1049
  {
1050
- new_control_dynamic_ids.push(dynamicId);
1051
- created_control_type.push(15);
1052
  jQuery.each(new_control_dynamic_ids,function(index,value)
1053
  {
1054
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
@@ -1946,11 +1927,11 @@ function delete_textbox(div_id,dynamicId,control_no)
1946
  if(edit_created_control_type.length != 0)
1947
  {
1948
  var index = jQuery.inArray(dynamicId,edit_control_dynamic_ids);
1949
- if(index > -1)
1950
  {
1951
  if(control_no == 9)
1952
  {
1953
- new_file_upload = "";
1954
  jQuery(".file_upload").attr("style","display:none");
1955
  }
1956
  else
@@ -1959,10 +1940,12 @@ function delete_textbox(div_id,dynamicId,control_no)
1959
  }
1960
  edit_control_dynamic_ids.splice(index, 1);
1961
  edit_created_control_type.splice(index, 1);
 
 
1962
  }
1963
  }
1964
  var index = jQuery.inArray(dynamicId,new_control_dynamic_ids);
1965
- if(index > -1)
1966
  {
1967
  if(control_no == 9)
1968
  {
@@ -1975,8 +1958,9 @@ function delete_textbox(div_id,dynamicId,control_no)
1975
  }
1976
  new_control_dynamic_ids.splice(index, 1);
1977
  created_control_type.splice(index, 1);
 
1978
  }
1979
- delete_control_dynamicIds.push(dynamicId);
1980
 
1981
  }
1982
  function field_reqired(dynamicId)
@@ -2280,7 +2264,7 @@ jQuery("#ux_dynamic_form_submit").validate
2280
  array_controls[dynamicCount].push({"cb_button_set_txt_input" : ""});
2281
  array_controls[dynamicCount].push({"cb_button_set_txt_description" : ""});
2282
  array_controls[dynamicCount].push({"cb_checkbox_alpha_filter": "0"});
2283
- array_controls[dynamicCount].push({"ux_checkbox_alpha_num_filter_": "0"});
2284
  array_controls[dynamicCount].push({"cb_checkbox_digit_filter": "0"});
2285
  array_controls[dynamicCount].push({"cb_checkbox_strip_tag_filter": "0"});
2286
  array_controls[dynamicCount].push({"cb_checkbox_trim_filter": "0"});
@@ -2320,7 +2304,7 @@ jQuery("#ux_dynamic_form_submit").validate
2320
  jQuery.ajax
2321
  ({
2322
  type: "POST",
2323
- url: ajaxurl + "?"+ jQuery(form).serialize() + "&field_order="+field_order+"&form_id="+form_id+"&array_controls="+encodeURIComponent(JSON.stringify(array_controls[edit_created_control_type[flag]]))+"&form=0&control_type=1&param=submit_controls&action=edit_contact_form_library",
2324
  success : function(data)
2325
  {
2326
  imaginaryCount++;
471
  cursor: 'move',
472
  update: function()
473
  {
474
+ field_order = [];
475
+ field_dynamic_id = [];
476
  var order = jQuery("#left_block").sortable('toArray');
477
 
478
  for(flag=0;flag<order.length;flag++)
519
  if(jQuery.inArray(9,created_control_type) != -1 || jQuery.inArray(9,existing_array_control_types) != -1)
520
  {
521
  alert("<?php _e( "Only One File Uploader can be used on a Form. ", contact_bank ); ?>");
522
+ return;
523
  }
524
  }
525
 
529
  {
530
  var dynamicId = Math.floor((Math.random()*100000)+1);
531
  array_dynamicCount.push(dynamicCount);
532
+ new_control_dynamic_ids.push(dynamicId);
533
+ created_control_type.push(control_type);
534
  }
535
  else
536
  {
537
  existing_array_control_types.push(control_type);
538
  edit_created_control_type.push(dynamicCount);
539
+
540
  }
541
 
542
  switch(parseInt(control_type))
560
  var result = jQuery.inArray(dynamicId,edit_control_dynamic_ids);
561
  if(result == -1)
562
  {
 
 
563
  jQuery.each(new_control_dynamic_ids,function(index,value)
564
  {
565
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
570
  {
571
  jQuery("#control_label_"+dynamicId).html(arrayControl[0].dynamic_settings_value);
572
  jQuery("#txt_description_"+dynamicId).html(arrayControl[1].dynamic_settings_value);
 
573
  jQuery("#ux_txt_textbox_control_"+dynamicId).val(arrayControl[4].dynamic_settings_value);
574
+ jQuery("#show_tooltip"+dynamicId).attr("data-original-title",arrayControl[3].dynamic_settings_value);
575
  arrayControl[2].dynamic_settings_value == "1" ? jQuery("#txt_required_"+dynamicId).css("display","block") : jQuery("#txt_required_"+dynamicId).css("display","none");
576
  }
577
 
595
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
596
  if(result == -1)
597
  {
 
 
598
  jQuery.each(new_control_dynamic_ids,function(index,value)
599
  {
600
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
629
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
630
  if(result == -1)
631
  {
 
 
632
  jQuery.each(new_control_dynamic_ids,function(index,value)
633
  {
634
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
639
  jQuery("#control_label_"+dynamicId).html(arrayControl[0].dynamic_settings_value +" :");
640
  jQuery("#txt_description_"+dynamicId).html(arrayControl[1].dynamic_settings_value);
641
  jQuery("#show_tooltip"+dynamicId).attr("data-original-title", arrayControl[3].dynamic_settings_value);
 
642
  arrayControl[2].dynamic_settings_value == "1" ? jQuery("#txt_required_"+dynamicId).css("display","block") : jQuery("#txt_required_"+dynamicId).css("display","none");
643
  }
644
 
661
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
662
  if(result == -1)
663
  {
 
 
664
  jQuery.each(new_control_dynamic_ids,function(index,value)
665
  {
666
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
711
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
712
  if(result == -1)
713
  {
 
 
714
  jQuery.each(new_control_dynamic_ids,function(index,value)
715
  {
716
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
762
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
763
  if(result == -1)
764
  {
 
 
765
  jQuery.each(new_control_dynamic_ids,function(index,value)
766
  {
767
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
812
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
813
  if(result == -1)
814
  {
 
 
815
  jQuery.each(new_control_dynamic_ids,function(index,value)
816
  {
817
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
867
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
868
  if(result == -1)
869
  {
 
 
870
  jQuery.each(new_control_dynamic_ids,function(index,value)
871
  {
872
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
932
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
933
  if(result == -1)
934
  {
 
 
935
  jQuery.each(new_control_dynamic_ids,function(index,value)
936
  {
937
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
998
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
999
  if(result == -1)
1000
  {
 
 
1001
  jQuery.each(new_control_dynamic_ids,function(index,value)
1002
  {
1003
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
1030
  var result = jQuery.inArray(dynamicId, edit_control_dynamic_ids);
1031
  if(result == -1)
1032
  {
 
 
1033
  jQuery.each(new_control_dynamic_ids,function(index,value)
1034
  {
1035
  jQuery('#left_block').append(jQuery("#div_"+value+"_"+created_control_type[index]));
1927
  if(edit_created_control_type.length != 0)
1928
  {
1929
  var index = jQuery.inArray(dynamicId,edit_control_dynamic_ids);
1930
+ if(index != -1)
1931
  {
1932
  if(control_no == 9)
1933
  {
1934
+
1935
  jQuery(".file_upload").attr("style","display:none");
1936
  }
1937
  else
1940
  }
1941
  edit_control_dynamic_ids.splice(index, 1);
1942
  edit_created_control_type.splice(index, 1);
1943
+ existing_array_control_types.splice(index, 1);
1944
+ delete_control_dynamicIds.push(dynamicId);
1945
  }
1946
  }
1947
  var index = jQuery.inArray(dynamicId,new_control_dynamic_ids);
1948
+ if(index != -1)
1949
  {
1950
  if(control_no == 9)
1951
  {
1958
  }
1959
  new_control_dynamic_ids.splice(index, 1);
1960
  created_control_type.splice(index, 1);
1961
+ array_dynamicCount.splice(index, 1);
1962
  }
1963
+
1964
 
1965
  }
1966
  function field_reqired(dynamicId)
2264
  array_controls[dynamicCount].push({"cb_button_set_txt_input" : ""});
2265
  array_controls[dynamicCount].push({"cb_button_set_txt_description" : ""});
2266
  array_controls[dynamicCount].push({"cb_checkbox_alpha_filter": "0"});
2267
+ array_controls[dynamicCount].push({"cb_checkbox_alpha_num_filter": "0"});
2268
  array_controls[dynamicCount].push({"cb_checkbox_digit_filter": "0"});
2269
  array_controls[dynamicCount].push({"cb_checkbox_strip_tag_filter": "0"});
2270
  array_controls[dynamicCount].push({"cb_checkbox_trim_filter": "0"});
2304
  jQuery.ajax
2305
  ({
2306
  type: "POST",
2307
+ url: ajaxurl + "?"+ jQuery(form).serialize() + "&field_order="+field_order+"&form_id="+form_id+"&array_controls="+encodeURIComponent(JSON.stringify(array_controls[edit_created_control_type[flag]]))+"&form=0&param=submit_controls&action=edit_contact_form_library",
2308
  success : function(data)
2309
  {
2310
  imaginaryCount++;