Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.5.7 |
Comparing to | |
See all releases |
Code changes from version 1.5.6 to 1.5.7
- Form_Maker.php +426 -188
- Submissions.html.php +326 -93
- Submissions.php +112 -108
- Theme_functions.php +9 -7
- Themes_function.html.php +2 -28
- css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- css/images/ui-icons_222222_256x240.png +0 -0
- css/images/ui-icons_454545_256x240.png +0 -0
- css/images/ui-icons_888888_256x240.png +0 -0
- css/jquery-ui-spinner.css +1176 -0
- css/style.css +33 -40
- form_ajax_functions.php +202 -30
- form_maker_functions.html.php +3418 -3057
- form_maker_functions.php +126 -132
- form_maker_widget.php +2 -2
- front_end_form_maker.php +1125 -126
- images/delete_el.png +0 -0
- images/delete_el_hover.png +0 -0
- images/down.png +0 -0
- images/down_hover.png +0 -0
- images/dublicate.png +0 -0
- images/dublicate_hover.png +0 -0
- images/edit.png +0 -0
- images/edit_hover.png +0 -0
- images/left-hover.png +0 -0
- images/left.png +0 -0
- images/left_hover.png +0 -0
- images/minus.png +0 -0
- images/minus_hover.png +0 -0
- images/page_delete.png +0 -0
- images/page_delete_all.png +0 -0
- images/page_delete_all_hover.png +0 -0
- images/page_delete_hover.png +0 -0
- images/page_down.png +0 -0
- images/page_down_hover.png +0 -0
- images/page_edit.png +0 -0
- images/page_edit_hover.png +0 -0
- images/page_up.png +0 -0
- images/page_up_hover.png +0 -0
- images/plus.png +0 -0
- images/plus_hover.png +0 -0
- images/right.png +0 -0
- images/right_hover.png +0 -0
- images/star.png +0 -0
- images/star_blue.png +0 -0
- images/star_green.png +0 -0
- images/star_red.png +0 -0
- images/star_yellow.png +0 -0
- images/survey.png +0 -0
- images/up.png +0 -0
- images/up_hover.png +0 -0
- js/editor_plugin.js +1 -0
- js/formmaker_free.js +10707 -1282
Form_Maker.php
CHANGED
@@ -2,12 +2,19 @@
|
|
2 |
/*
|
3 |
Plugin Name: Form Maker
|
4 |
Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
-
Version: 1.5.
|
6 |
Author: http://web-dorado.com/
|
7 |
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
*/
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
$first_css = ".wdform_table1
|
12 |
{
|
13 |
font-size:14px;
|
@@ -202,30 +209,24 @@ width:100px;
|
|
202 |
require_once("front_end_form_maker.php");
|
203 |
require_once("form_maker_widget.php");
|
204 |
require_once('recaptchalib.php');
|
205 |
-
|
206 |
function form_maker_language_load() {
|
207 |
load_plugin_textdomain('form_maker', FALSE, basename(dirname(__FILE__)) . '/languages');
|
208 |
}
|
209 |
-
|
210 |
-
function form_maker_sesseion_path() {
|
211 |
-
@session_start();
|
212 |
-
session_save_path(ABSPATH . 'wp-content/plugins/form-maker');
|
213 |
-
}
|
214 |
-
add_action('init', 'form_maker_sesseion_path');
|
215 |
|
216 |
function do_output_buffer() {
|
217 |
ob_start();
|
218 |
}
|
219 |
add_action('init', 'do_output_buffer');
|
220 |
|
221 |
-
////////////////
|
222 |
for ($ii = 0; $ii < 100; $ii++) {
|
223 |
remove_filter('the_content', 'do_shortcode', $ii);
|
224 |
remove_filter('the_content', 'wpautop', $ii);
|
225 |
}
|
226 |
add_filter('the_content', 'wpautop', 10);
|
227 |
add_filter('the_content', 'do_shortcode', 11);
|
228 |
-
|
229 |
function Form_maker_fornt_end_main($content) {
|
230 |
$pattern = '[\[Form id="([0-9]*)"\]]';
|
231 |
$count_forms_in_post = preg_match_all($pattern, $content, $matches_form);
|
@@ -236,25 +237,45 @@ function Form_maker_fornt_end_main($content) {
|
|
236 |
}
|
237 |
return $content;
|
238 |
}
|
|
|
239 |
|
240 |
function form_maker_scripts_method() {
|
241 |
wp_enqueue_style("gmap_styles_", plugins_url("css/style_for_map.css", __FILE__), FALSE);
|
242 |
-
wp_enqueue_script("main_g_js", plugins_url("js/main_front_end.js", __FILE__), FALSE);
|
243 |
wp_enqueue_script("Calendar", plugins_url("js/calendar.js", __FILE__), FALSE);
|
244 |
wp_enqueue_script("calendar-setup", plugins_url("js/calendar-setup.js", __FILE__), FALSE);
|
245 |
wp_enqueue_script("calendar_function", plugins_url("js/calendar_function.js", __FILE__), FALSE);
|
246 |
wp_enqueue_style("Css", plugins_url("js/calendar-jos.css", __FILE__), FALSE);
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
248 |
-
|
249 |
add_action('wp_enqueue_scripts', 'form_maker_scripts_method');
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
$check_seo = 0;
|
252 |
function print_massage($content) {
|
253 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
254 |
if (is_plugin_active('wordpress-seo/wp-seo.php') && $_SESSION['form_submit_type']) {
|
255 |
global $check_seo;
|
256 |
if ($check_seo++ != 1) {
|
257 |
-
return;
|
258 |
}
|
259 |
}
|
260 |
$mh_after_head = did_action('wp_enqueue_scripts');
|
@@ -277,7 +298,7 @@ function print_massage($content) {
|
|
277 |
if ($_SESSION['massage_after_submit'] != "") {
|
278 |
$message = $_SESSION['massage_after_submit'];
|
279 |
$_SESSION['massage_after_submit'] = "";
|
280 |
-
$returned_content = "
|
281 |
.updated,.error{
|
282 |
border-width:1px !important;
|
283 |
border-style:solid !important;
|
@@ -354,6 +375,7 @@ add_filter('the_content', 'print_massage');
|
|
354 |
//// add editor new mce button
|
355 |
add_filter('mce_external_plugins', "Form_Maker_register");
|
356 |
add_filter('mce_buttons', 'Form_Maker_add_button', 0);
|
|
|
357 |
/// function for add new button
|
358 |
function Form_Maker_add_button($buttons) {
|
359 |
array_push($buttons, "Form_Maker_mce");
|
@@ -367,121 +389,19 @@ function Form_Maker_register($plugin_array) {
|
|
367 |
return $plugin_array;
|
368 |
}
|
369 |
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
add_action('
|
379 |
-
add_action('
|
380 |
-
|
381 |
-
$icon_url = plugins_url('images/FormMakerLogo-16.png', __FILE__);
|
382 |
-
add_menu_page('Theme page title', 'Form Maker', 'manage_options', 'Form_maker', 'Manage_Form_maker', $icon_url);
|
383 |
-
$page_form = add_submenu_page('Form_maker', 'Form Maker Manager', 'Manager', 'manage_options', 'Form_maker', 'Manage_Form_maker');
|
384 |
-
$page_submits = add_submenu_page('Form_maker', 'Form Maker submissions', 'Submissions', 'manage_options', 'Form_maker_Submits', 'Form_maker_Submits');
|
385 |
-
add_submenu_page('Form_maker', 'Licensing/Donation', 'Licensing/Donation', 'manage_options', 'form_maker_Licensing', 'form_maker_Licensing');
|
386 |
-
add_submenu_page('Form_maker', 'Form Maker Themes', 'Themes', 'manage_options', 'Form_maker_Themes', 'Form_maker_Themes');
|
387 |
-
add_submenu_page('Form_maker', 'Uninstall Form Maker ', 'Uninstall Form Maker', 'manage_options', 'Uninstall_Form_Maker', 'Uninstall_Form_Maker');
|
388 |
-
add_action('admin_print_styles-' . $page_form, 'form_maker_admin_styles_scripts');
|
389 |
-
add_action('admin_print_styles-' . $page_submits, 'form_maker_submits_styles_scripts');
|
390 |
-
}
|
391 |
-
|
392 |
-
function form_maker_Licensing() {
|
393 |
-
?>
|
394 |
-
<div style="width:95%">
|
395 |
-
<p>This plugin is the non-commercial version of the Form Maker. Use of this plugin is free. You can add not more than 7 fields. The limitation is on the some types of the fields (File Upload, Map and Paypal). If you want to use those fields, you are required to purchase a license. </p>
|
396 |
-
<br/>
|
397 |
-
<a href="http://web-dorado.com/files/fromFormMaker.php" class="button-primary" target="_blank">Purchase a License</a>
|
398 |
-
<br/><br/>
|
399 |
-
<p>After the purchasing the commercial version follow this steps:</p>
|
400 |
-
<ol>
|
401 |
-
<li>Deactivate Form Maker Plugin</li>
|
402 |
-
<li>Delete Form Maker Plugin</li>
|
403 |
-
<li>Install the downloaded commercial version of the plugin</li>
|
404 |
-
</ol>
|
405 |
-
<br/>
|
406 |
-
<p>If you enjoy using Form Maker and find it useful, please consider making a donation. Your donation will help encourage and support the plugin's continued development and better user support.</p>
|
407 |
-
<br/>
|
408 |
-
<a href="http://web-dorado.com/files/donate_redirect.php" target="_blank"><img src="<?php echo plugins_url('images/btn_donateCC_LG.gif', __FILE__); ?>" /></a>
|
409 |
-
</div>
|
410 |
-
<?php
|
411 |
-
}
|
412 |
-
|
413 |
-
function form_maker_submits_styles_scripts() {
|
414 |
-
wp_enqueue_script('word-count');
|
415 |
-
wp_enqueue_script('post');
|
416 |
-
wp_enqueue_script('editor');
|
417 |
-
wp_enqueue_script('media-upload');
|
418 |
-
wp_admin_css('thickbox');
|
419 |
-
wp_print_scripts('media-upload');
|
420 |
-
do_action('admin_print_styles');
|
421 |
-
wp_enqueue_script('common');
|
422 |
-
wp_enqueue_script('jquery-color');
|
423 |
-
wp_enqueue_script('utils');
|
424 |
-
wp_enqueue_script("mootools", plugins_url("js/mootools.js", __FILE__));
|
425 |
-
wp_enqueue_script("f_calendar", plugins_url("js/calendar.js", __FILE__));
|
426 |
-
wp_enqueue_script("f_calendar_functions", plugins_url("js/calendar_function.js", __FILE__));
|
427 |
-
wp_enqueue_script("f_calendar_setup", plugins_url("js/calendar-setup.js", __FILE__));
|
428 |
-
wp_enqueue_style("calendar-jos", plugins_url("js/calendar-jos.css", __FILE__));
|
429 |
-
}
|
430 |
-
|
431 |
-
function form_maker_admin_styles_scripts() {
|
432 |
-
if (isset($_GET['task'])) {
|
433 |
-
if (esc_html($_GET['task']) == "update" || esc_html($_GET['task']) == "save_update" || esc_html($_GET['task']) == "gotoedit" || esc_html($_GET['task']) == "add_form" || esc_html($_GET['task']) == "edit_form" || esc_html($_GET['task']) == "Save_Edit_JavaScript" || esc_html($_GET['task']) == "Save_Actions_after_submission" || esc_html($_GET['task']) == "Save_Custom_text_in_email_for_administrator" || esc_html($_GET['task']) == "Save_Custom_text_in_email_for_user") {
|
434 |
-
wp_enqueue_script('word-count');
|
435 |
-
wp_enqueue_script('post');
|
436 |
-
wp_enqueue_script('editor');
|
437 |
-
wp_enqueue_script('media-upload');
|
438 |
-
wp_admin_css('thickbox');
|
439 |
-
wp_print_scripts('media-upload');
|
440 |
-
do_action('admin_print_styles');
|
441 |
-
wp_enqueue_script('common');
|
442 |
-
wp_enqueue_script('jquery-color');
|
443 |
-
if (get_bloginfo('version') < '3.3') {
|
444 |
-
if (function_exists('add_thickbox'))
|
445 |
-
add_thickbox();
|
446 |
-
if (function_exists('wp_tiny_mce'))
|
447 |
-
wp_tiny_mce();
|
448 |
-
}
|
449 |
-
wp_enqueue_script('utils');
|
450 |
-
if (get_bloginfo('version') > 3.3) {
|
451 |
-
wp_enqueue_script("jquery");
|
452 |
-
}
|
453 |
-
else {
|
454 |
-
wp_deregister_script('jquery');
|
455 |
-
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js');
|
456 |
-
wp_enqueue_script('jquery');
|
457 |
-
}
|
458 |
-
wp_enqueue_script("form_main_js", plugins_url("js/formmaker_free.js", __FILE__));
|
459 |
-
wp_enqueue_style("styles_form", plugins_url("css/style.css", __FILE__));
|
460 |
-
wp_enqueue_script("mootools", plugins_url("js/mootools.js", __FILE__));
|
461 |
-
wp_enqueue_script("f_calendar", plugins_url("js/calendar.js", __FILE__));
|
462 |
-
wp_enqueue_script("f_calendar_functions", plugins_url("js/calendar_function.js", __FILE__));
|
463 |
-
wp_enqueue_script("f_calendar_setup", plugins_url("js/calendar-setup.js", __FILE__));
|
464 |
-
// wp_enqueue_script("main",plugins_url("js/main.js",__FILE__));
|
465 |
-
wp_enqueue_style("calendar-jos", plugins_url("js/calendar-jos.css", __FILE__));
|
466 |
-
}
|
467 |
-
}
|
468 |
-
}
|
469 |
-
|
470 |
-
///////////////////////////////////////// add ajax for form maker functionaliti
|
471 |
-
require_once("form_ajax_functions.php"); //////////// include form ajax functions for next 4 ajax hooks
|
472 |
-
add_action('wp_ajax_formmakergeneretexml', 'form_maker_generete_xml'); ///export xml
|
473 |
-
add_action('wp_ajax_formmakergeneretecsv', 'form_maker_generete_csv'); ///export csv
|
474 |
-
add_action('wp_ajax_formmakerwdcaptcha', 'form_maker_wd_captcha'); /// generete captcha image and save it code in session
|
475 |
-
add_action('wp_ajax_formmakerwindow', 'form_maker_window_php'); /// openid window in post or page for editor
|
476 |
-
add_action('wp_ajax_nopriv_formmakergeneretexml', 'form_maker_generete_xml'); ///export xml
|
477 |
-
add_action('wp_ajax_nopriv_formmakergeneretecsv', 'form_maker_generete_csv'); ///export csv
|
478 |
-
add_action('wp_ajax_nopriv_formmakerwdcaptcha', 'form_maker_wd_captcha'); /// generete captcha image and save it code in session
|
479 |
-
add_action('wp_ajax_nopriv_formmakerwindow', 'form_maker_window_php'); /// openid window in post or page for editor
|
480 |
add_action('wp_ajax_form_preview_product_option', 'form_maker_form_preview_product_option');
|
481 |
-
|
482 |
-
//////////////////////////////////////////// manager
|
483 |
-
////////////////////////////////////////////
|
484 |
-
add_action('wp_ajax_fromeditcountryinpopup', 'spider_form_country_edit');
|
485 |
function spider_form_country_edit() {
|
486 |
if (function_exists('current_user_can')) {
|
487 |
if (!current_user_can('manage_options')) {
|
@@ -640,11 +560,117 @@ function html_spider_form_country_edit($id) {
|
|
640 |
<?php
|
641 |
}
|
642 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
function Manage_Form_maker() {
|
644 |
require_once("form_maker_functions.php");
|
645 |
require_once("form_maker_functions.html.php");
|
646 |
-
if (!function_exists('print_html_nav'))
|
647 |
require_once("nav_function/nav_html_func.php");
|
|
|
648 |
global $wpdb;
|
649 |
if (isset($_GET["task"])) {
|
650 |
$task = esc_html($_GET["task"]);
|
@@ -653,7 +679,7 @@ function Manage_Form_maker() {
|
|
653 |
$task = "show";
|
654 |
}
|
655 |
if (isset($_GET["id"])) {
|
656 |
-
$id = (int)$_GET["id"];
|
657 |
}
|
658 |
else {
|
659 |
$id = 0;
|
@@ -676,10 +702,12 @@ function Manage_Form_maker() {
|
|
676 |
edit_form_maker($id);
|
677 |
break;
|
678 |
case "Save" :
|
679 |
-
if ($id)
|
680 |
apply_form($id);
|
681 |
-
|
|
|
682 |
save_form();
|
|
|
683 |
display_form_lists();
|
684 |
break;
|
685 |
case "Apply" :
|
@@ -709,7 +737,7 @@ function Manage_Form_maker() {
|
|
709 |
save_form();
|
710 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
711 |
}
|
712 |
-
|
713 |
break;
|
714 |
case "Save_form_options" :
|
715 |
Apply_form_options($id);
|
@@ -717,7 +745,7 @@ function Manage_Form_maker() {
|
|
717 |
break;
|
718 |
case "Apply_form_options" :
|
719 |
Apply_form_options($id);
|
720 |
-
|
721 |
break;
|
722 |
case "save_as_copy":
|
723 |
save_as_copy();
|
@@ -728,10 +756,7 @@ function Manage_Form_maker() {
|
|
728 |
}
|
729 |
}
|
730 |
|
731 |
-
|
732 |
-
//////////////////////////////////////////// Submi
|
733 |
-
////////////////////////////////////////////
|
734 |
-
////map in spubmits
|
735 |
add_action('wp_ajax_frommapeditinpopup', 'spider_form_map_edit');
|
736 |
function spider_form_map_edit() {
|
737 |
if (function_exists('current_user_can')) {
|
@@ -746,9 +771,8 @@ function spider_form_map_edit() {
|
|
746 |
$long = esc_html($_GET['long']);
|
747 |
$lat = esc_html($_GET['lat']);
|
748 |
?>
|
749 |
-
<script src="<?php echo plugins_url("js/
|
750 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
751 |
-
|
752 |
<table style="margin:0px; padding:0px">
|
753 |
<tr>
|
754 |
<td><b>Address:</b></td>
|
@@ -764,20 +788,99 @@ function spider_form_map_edit() {
|
|
764 |
</tr>
|
765 |
</table>
|
766 |
|
767 |
-
<div id="0_elementform_id_temp" long="<?php echo $long ?>" center_x="<?php echo $long ?>"
|
768 |
-
center_y="<?php echo $lat ?>" lat="<?php echo $lat ?>" zoom="8" info=""
|
769 |
-
style="width:600px; height:500px; "></div>
|
770 |
-
|
771 |
<script>
|
772 |
if_gmap_init("0");
|
773 |
add_marker_on_map(0, 0, "<?php echo $long ?>", "<?php echo $lat ?>", '');
|
774 |
-
|
775 |
-
|
776 |
</script>
|
777 |
-
|
778 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
781 |
die();
|
782 |
}
|
783 |
else {
|
@@ -785,29 +888,33 @@ function spider_form_map_edit() {
|
|
785 |
}
|
786 |
}
|
787 |
|
788 |
-
|
789 |
-
/////////////////////////////////////////////////////////////////////////////////// priview form
|
790 |
-
///////////////////////////////////////////////////////////////////////////////////
|
791 |
-
///////////////////////////////////////////////////////////////////////////////////
|
792 |
add_action('wp_ajax_frommakerpreview', 'preview_formmaker');
|
793 |
function html_preview_formmaker($css) {
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
|
|
|
|
|
|
800 |
$cmpnt_js_path = plugins_url('js', __FILE__);
|
801 |
$id = 'form_id_temp';
|
802 |
?>
|
803 |
-
<script src="<?php echo $cmpnt_js_path . "/
|
804 |
<script src="<?php echo $cmpnt_js_path . "/main.js"; ?>"></script>
|
805 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
|
|
|
|
|
|
|
|
|
|
806 |
<style>
|
807 |
<?php
|
808 |
$cmpnt_js_path = plugins_url('', __FILE__);
|
809 |
echo str_replace('[SITE_ROOT]', $cmpnt_js_path, $css);
|
810 |
-
|
811 |
?>
|
812 |
</style>
|
813 |
<div id="form_id_temppages" class="wdform_page_navigation" show_title="" show_numbers="" type=""></div>
|
@@ -823,8 +930,6 @@ document.getElementById('form_id_temppages').setAttribute('show_title', window.p
|
|
823 |
document.getElementById('form_id_temppages').setAttribute('show_numbers', window.parent.document.getElementById('pages').getAttribute('show_numbers'));
|
824 |
document.getElementById('form_id_temppages').setAttribute('type', window.parent.document.getElementById('pages').getAttribute('type'));
|
825 |
document.getElementById('counterform_id_temp').value = window.parent.gen;
|
826 |
-
;
|
827 |
-
|
828 |
form_view_count<?php echo $id ?>= 0;
|
829 |
for (i = 1; i <= 30; i++) {
|
830 |
if (document.getElementById('<?php echo $id ?>form_view' + i)) {
|
@@ -869,7 +974,6 @@ function remove_add_(id) {
|
|
869 |
}
|
870 |
|
871 |
function refresh_first() {
|
872 |
-
|
873 |
n = window.parent.gen;
|
874 |
for (i = 0; i < n; i++) {
|
875 |
if (document.getElementById(i)) {
|
@@ -1038,12 +1142,18 @@ function refresh_first() {
|
|
1038 |
}
|
1039 |
case "type_address":
|
1040 |
{
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1047 |
|
1048 |
break;
|
1049 |
|
@@ -1058,9 +1168,6 @@ function refresh_first() {
|
|
1058 |
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1059 |
remove_add_(i + "_elementform_id_temp" + j);
|
1060 |
}
|
1061 |
-
/* if(document.getElementById(i+"_randomize").value=="yes")
|
1062 |
-
choises_randomize(i);*/
|
1063 |
-
|
1064 |
break;
|
1065 |
}
|
1066 |
|
@@ -1101,6 +1208,140 @@ function refresh_first() {
|
|
1101 |
remove_add_(i + "_yearform_id_temp");
|
1102 |
break;
|
1103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1104 |
}
|
1105 |
}
|
1106 |
}
|
@@ -1148,7 +1389,7 @@ function refresh_first() {
|
|
1148 |
die();
|
1149 |
}
|
1150 |
|
1151 |
-
function
|
1152 |
if (function_exists('current_user_can')) {
|
1153 |
if (!current_user_can('manage_options')) {
|
1154 |
die('Access Denied');
|
@@ -1158,12 +1399,8 @@ function preview_formmaker() {
|
|
1158 |
die('Access Denied');
|
1159 |
}
|
1160 |
global $wpdb;
|
1161 |
-
if (isset($_GET['id']))
|
1162 |
-
$getparams = (int)$_GET['id'];
|
1163 |
-
}
|
1164 |
-
else {
|
1165 |
-
$getparams = 0;
|
1166 |
-
}
|
1167 |
$query = "SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id=" . $getparams;
|
1168 |
$css = $wpdb->get_var($query);
|
1169 |
html_preview_formmaker($css);
|
@@ -1187,7 +1424,7 @@ function Form_maker_Submits() {
|
|
1187 |
$task = "show";
|
1188 |
}
|
1189 |
if (isset($_GET["id"])) {
|
1190 |
-
$id = (int)$_GET["id"];
|
1191 |
}
|
1192 |
else {
|
1193 |
$id = 0;
|
@@ -1226,8 +1463,9 @@ function Form_maker_Submits() {
|
|
1226 |
function Form_maker_Themes() {
|
1227 |
require_once("Theme_functions.php");
|
1228 |
require_once("Themes_function.html.php");
|
1229 |
-
if (!function_exists('print_html_nav'))
|
1230 |
require_once("nav_function/nav_html_func.php");
|
|
|
1231 |
global $wpdb;
|
1232 |
if (isset($_GET["task"])) {
|
1233 |
$task = esc_html($_GET["task"]);
|
@@ -1236,7 +1474,7 @@ function Form_maker_Themes() {
|
|
1236 |
$task = "";
|
1237 |
}
|
1238 |
if (isset($_GET["id"])) {
|
1239 |
-
$id = (int)$_GET["id"];
|
1240 |
}
|
1241 |
else {
|
1242 |
$id = 0;
|
@@ -1418,7 +1656,7 @@ function Uninstall_Form_Maker() {
|
|
1418 |
</div>
|
1419 |
</form>
|
1420 |
<?php
|
1421 |
-
}
|
1422 |
}
|
1423 |
|
1424 |
|
@@ -1428,12 +1666,12 @@ function formmaker_activate() {
|
|
1428 |
require_once("update_sql.php");
|
1429 |
formmaker_chech_update();
|
1430 |
}
|
1431 |
-
|
1432 |
register_activation_hook(__FILE__, 'formmaker_activate');
|
|
|
1433 |
function sp_form_deactiv() {
|
1434 |
echo esc_html($_GET['form_maker_uninstall']);
|
1435 |
if (isset($_GET['form_maker_uninstall'])) {
|
1436 |
-
if (
|
1437 |
delete_option('formmaker_cureent_version');
|
1438 |
}
|
1439 |
}
|
2 |
/*
|
3 |
Plugin Name: Form Maker
|
4 |
Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
|
5 |
+
Version: 1.5.7
|
6 |
Author: http://web-dorado.com/
|
7 |
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
*/
|
9 |
+
|
10 |
+
|
11 |
+
function form_maker_sesseion_path() {
|
12 |
+
@session_start();
|
13 |
+
session_save_path(ABSPATH . 'wp-content/plugins/form-maker/session');
|
14 |
+
}
|
15 |
+
add_action('init', 'form_maker_sesseion_path');
|
16 |
+
|
17 |
+
// Css.
|
18 |
$first_css = ".wdform_table1
|
19 |
{
|
20 |
font-size:14px;
|
209 |
require_once("front_end_form_maker.php");
|
210 |
require_once("form_maker_widget.php");
|
211 |
require_once('recaptchalib.php');
|
212 |
+
|
213 |
function form_maker_language_load() {
|
214 |
load_plugin_textdomain('form_maker', FALSE, basename(dirname(__FILE__)) . '/languages');
|
215 |
}
|
216 |
+
add_action('init', 'form_maker_language_load');
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
function do_output_buffer() {
|
219 |
ob_start();
|
220 |
}
|
221 |
add_action('init', 'do_output_buffer');
|
222 |
|
|
|
223 |
for ($ii = 0; $ii < 100; $ii++) {
|
224 |
remove_filter('the_content', 'do_shortcode', $ii);
|
225 |
remove_filter('the_content', 'wpautop', $ii);
|
226 |
}
|
227 |
add_filter('the_content', 'wpautop', 10);
|
228 |
add_filter('the_content', 'do_shortcode', 11);
|
229 |
+
|
230 |
function Form_maker_fornt_end_main($content) {
|
231 |
$pattern = '[\[Form id="([0-9]*)"\]]';
|
232 |
$count_forms_in_post = preg_match_all($pattern, $content, $matches_form);
|
237 |
}
|
238 |
return $content;
|
239 |
}
|
240 |
+
add_filter('the_content', 'Form_maker_fornt_end_main', 5000);
|
241 |
|
242 |
function form_maker_scripts_method() {
|
243 |
wp_enqueue_style("gmap_styles_", plugins_url("css/style_for_map.css", __FILE__), FALSE);
|
244 |
+
wp_enqueue_script("main_g_js", plugins_url("js/main_front_end.js", __FILE__), array(), '', FALSE);
|
245 |
wp_enqueue_script("Calendar", plugins_url("js/calendar.js", __FILE__), FALSE);
|
246 |
wp_enqueue_script("calendar-setup", plugins_url("js/calendar-setup.js", __FILE__), FALSE);
|
247 |
wp_enqueue_script("calendar_function", plugins_url("js/calendar_function.js", __FILE__), FALSE);
|
248 |
wp_enqueue_style("Css", plugins_url("js/calendar-jos.css", __FILE__), FALSE);
|
249 |
+
wp_enqueue_script("jquery", plugins_url("js/jquery-1.9.1.js", __FILE__), array(), '1.9.1');
|
250 |
+
wp_deregister_script('jquery-ui');
|
251 |
+
wp_enqueue_script("jquery-ui", plugins_url("js/jquery-ui.js", __FILE__));
|
252 |
+
wp_enqueue_script("jquery.ui.slider", plugins_url("js/jquery.ui.slider.js", __FILE__));
|
253 |
+
wp_enqueue_style("jquery-ui-spinner", plugins_url("css/jquery-ui-spinner.css", __FILE__), FALSE);
|
254 |
}
|
|
|
255 |
add_action('wp_enqueue_scripts', 'form_maker_scripts_method');
|
256 |
+
|
257 |
+
// Add form maker plugin ur to head.
|
258 |
+
function form_maker_plugin_url() {
|
259 |
+
echo "<input type='hidden' value='" . plugins_url("", __FILE__) . "' id='form_plugins_url' />";
|
260 |
+
echo '<script type="text/javascript">
|
261 |
+
if (document.getElementById("form_plugins_url")) {
|
262 |
+
var plugin_url = document.getElementById("form_plugins_url").value;
|
263 |
+
}
|
264 |
+
else {
|
265 |
+
var plugin_url = "";
|
266 |
+
}
|
267 |
+
</script>';
|
268 |
+
}
|
269 |
+
add_action('wp_head', 'form_maker_plugin_url');
|
270 |
+
|
271 |
+
// Frontend messages.
|
272 |
$check_seo = 0;
|
273 |
function print_massage($content) {
|
274 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
275 |
if (is_plugin_active('wordpress-seo/wp-seo.php') && $_SESSION['form_submit_type']) {
|
276 |
global $check_seo;
|
277 |
if ($check_seo++ != 1) {
|
278 |
+
// return;
|
279 |
}
|
280 |
}
|
281 |
$mh_after_head = did_action('wp_enqueue_scripts');
|
298 |
if ($_SESSION['massage_after_submit'] != "") {
|
299 |
$message = $_SESSION['massage_after_submit'];
|
300 |
$_SESSION['massage_after_submit'] = "";
|
301 |
+
$returned_content = "<style>
|
302 |
.updated,.error{
|
303 |
border-width:1px !important;
|
304 |
border-style:solid !important;
|
375 |
//// add editor new mce button
|
376 |
add_filter('mce_external_plugins', "Form_Maker_register");
|
377 |
add_filter('mce_buttons', 'Form_Maker_add_button', 0);
|
378 |
+
|
379 |
/// function for add new button
|
380 |
function Form_Maker_add_button($buttons) {
|
381 |
array_push($buttons, "Form_Maker_mce");
|
389 |
return $plugin_array;
|
390 |
}
|
391 |
|
392 |
+
// Add ajax for form maker.
|
393 |
+
require_once("form_ajax_functions.php");
|
394 |
+
add_action('wp_ajax_formmakergeneretexml', 'form_maker_generete_xml'); // Export xml.
|
395 |
+
add_action('wp_ajax_nopriv_formmakergeneretexml', 'form_maker_generete_xml'); // Export xml for all users.
|
396 |
+
add_action('wp_ajax_formmakergeneretecsv', 'form_maker_generete_csv'); // Export csv.
|
397 |
+
add_action('wp_ajax_nopriv_formmakergeneretecsv', 'form_maker_generete_csv'); // Export csv for all users.
|
398 |
+
add_action('wp_ajax_formmakerwdcaptcha', 'form_maker_wd_captcha'); // Generete captcha image and save it code in session.
|
399 |
+
add_action('wp_ajax_nopriv_formmakerwdcaptcha', 'form_maker_wd_captcha'); // Generete captcha image and save it code in session for all users.
|
400 |
+
add_action('wp_ajax_formmakerwindow', 'form_maker_window_php'); // Open window in post or page for editor.
|
401 |
+
add_action('wp_ajax_nopriv_formmakerwindow', 'form_maker_window_php'); // Open window in post or page for editor for all users.
|
402 |
+
add_action('wp_ajax_fromeditcountryinpopup', 'spider_form_country_edit'); // Open country list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
add_action('wp_ajax_form_preview_product_option', 'form_maker_form_preview_product_option');
|
404 |
+
|
|
|
|
|
|
|
405 |
function spider_form_country_edit() {
|
406 |
if (function_exists('current_user_can')) {
|
407 |
if (!current_user_can('manage_options')) {
|
560 |
<?php
|
561 |
}
|
562 |
|
563 |
+
function add_button_style1() {
|
564 |
+
echo '<style type="text/css">
|
565 |
+
.wp_themeSkin span.mce_Form_Maker_mce {background:url(' . plugins_url('images/formmakerLogo.png', __FILE__) . ') no-repeat !important;}
|
566 |
+
.wp_themeSkin .mceButtonEnabled:hover span.mce_Form_Maker_mce,.wp_themeSkin .mceButtonActive span.mce_Form_Maker_mce
|
567 |
+
{background:url(' . plugins_url('images/formmakerLogoHover.png', __FILE__) . ') no-repeat !important;}
|
568 |
+
</style>';
|
569 |
+
}
|
570 |
+
|
571 |
+
add_action('admin_head', 'add_button_style1');
|
572 |
+
add_action('admin_menu', 'Form_maker_options_panel');
|
573 |
+
function Form_maker_options_panel() {
|
574 |
+
$icon_url = plugins_url('images/FormMakerLogo-16.png', __FILE__);
|
575 |
+
add_menu_page('Theme page title', 'Form Maker', 'manage_options', 'Form_maker', 'Manage_Form_maker', $icon_url);
|
576 |
+
$page_form = add_submenu_page('Form_maker', 'Form Maker Manager', 'Manager', 'manage_options', 'Form_maker', 'Manage_Form_maker');
|
577 |
+
$page_submits = add_submenu_page('Form_maker', 'Form Maker submissions', 'Submissions', 'manage_options', 'Form_maker_Submits', 'Form_maker_Submits');
|
578 |
+
add_submenu_page('Form_maker', 'Licensing/Donation', 'Licensing/Donation', 'manage_options', 'form_maker_Licensing', 'form_maker_Licensing');
|
579 |
+
add_submenu_page('Form_maker', 'Form Maker Themes', 'Themes', 'manage_options', 'Form_maker_Themes', 'Form_maker_Themes');
|
580 |
+
add_submenu_page('Form_maker', 'Uninstall Form Maker ', 'Uninstall Form Maker', 'manage_options', 'Uninstall_Form_Maker', 'Uninstall_Form_Maker');
|
581 |
+
add_action('admin_print_styles-' . $page_form, 'form_maker_admin_styles_scripts');
|
582 |
+
add_action('admin_print_styles-' . $page_submits, 'form_maker_submits_styles_scripts');
|
583 |
+
}
|
584 |
+
|
585 |
+
function form_maker_Licensing() {
|
586 |
+
?>
|
587 |
+
<div style="width:95%">
|
588 |
+
<p>This plugin is the non-commercial version of the Form Maker. Use of this plugin is free. You can add not more than 7 fields. The limitation is on the some types of the fields (File Upload, Map and Paypal). If you want to use those fields, you are required to purchase a license. </p>
|
589 |
+
<br/>
|
590 |
+
<a href="http://web-dorado.com/files/fromFormMaker.php" class="button-primary" target="_blank">Purchase a License</a>
|
591 |
+
<br/><br/>
|
592 |
+
<p>After the purchasing the commercial version follow this steps:</p>
|
593 |
+
<ol>
|
594 |
+
<li>Deactivate Form Maker Plugin</li>
|
595 |
+
<li>Delete Form Maker Plugin</li>
|
596 |
+
<li>Install the downloaded commercial version of the plugin</li>
|
597 |
+
</ol>
|
598 |
+
<br/>
|
599 |
+
<p>If you enjoy using Form Maker and find it useful, please consider making a donation. Your donation will help encourage and support the plugin's continued development and better user support.</p>
|
600 |
+
<br/>
|
601 |
+
<a href="http://web-dorado.com/files/donate_redirect.php" target="_blank"><img src="<?php echo plugins_url('images/btn_donateCC_LG.gif', __FILE__); ?>" /></a>
|
602 |
+
</div>
|
603 |
+
<?php
|
604 |
+
}
|
605 |
+
|
606 |
+
function form_maker_submits_styles_scripts() {
|
607 |
+
wp_enqueue_script('word-count');
|
608 |
+
wp_enqueue_script('post');
|
609 |
+
wp_enqueue_script('editor');
|
610 |
+
wp_enqueue_script('media-upload');
|
611 |
+
wp_admin_css('thickbox');
|
612 |
+
wp_print_scripts('media-upload');
|
613 |
+
do_action('admin_print_styles');
|
614 |
+
wp_enqueue_script('common');
|
615 |
+
wp_enqueue_script('jquery-color');
|
616 |
+
wp_enqueue_script('utils');
|
617 |
+
wp_enqueue_script("main", plugins_url("js/main.js", __FILE__));
|
618 |
+
wp_enqueue_script("mootools", plugins_url("js/mootools.js", __FILE__));
|
619 |
+
wp_enqueue_script("f_calendar", plugins_url("js/calendar.js", __FILE__));
|
620 |
+
wp_enqueue_script("f_calendar_functions", plugins_url("js/calendar_function.js", __FILE__));
|
621 |
+
wp_enqueue_script("f_calendar_setup", plugins_url("js/calendar-setup.js", __FILE__));
|
622 |
+
wp_enqueue_style("calendar-jos", plugins_url("js/calendar-jos.css", __FILE__));
|
623 |
+
wp_enqueue_script("jquery", plugins_url("js/jquery-1.9.1.js", __FILE__), array(), '1.9.1');
|
624 |
+
wp_deregister_script('jquery-ui');
|
625 |
+
wp_enqueue_script("jquery-ui", plugins_url("js/jquery-ui.js", __FILE__));
|
626 |
+
wp_enqueue_style("jquery-ui-spinner", plugins_url("css/jquery-ui-spinner.css", __FILE__), FALSE);
|
627 |
+
wp_enqueue_script("jquery.ui.slider", plugins_url("js/jquery.ui.slider.js", __FILE__));
|
628 |
+
|
629 |
+
}
|
630 |
+
|
631 |
+
function form_maker_admin_styles_scripts() {
|
632 |
+
if (isset($_GET['task'])) {
|
633 |
+
if (esc_html($_GET['task']) == "update" || esc_html($_GET['task']) == "save_update" || esc_html($_GET['task']) == "gotoedit" || esc_html($_GET['task']) == "add_form" || esc_html($_GET['task']) == "edit_form" || esc_html($_GET['task']) == "form_options") {
|
634 |
+
wp_enqueue_script('word-count');
|
635 |
+
wp_enqueue_script('post');
|
636 |
+
wp_enqueue_script('editor');
|
637 |
+
wp_enqueue_script('media-upload');
|
638 |
+
wp_admin_css('thickbox');
|
639 |
+
wp_print_scripts('media-upload');
|
640 |
+
do_action('admin_print_styles');
|
641 |
+
wp_enqueue_script('common');
|
642 |
+
wp_enqueue_script('jquery-color');
|
643 |
+
if (get_bloginfo('version') < '3.3') {
|
644 |
+
if (function_exists('add_thickbox'))
|
645 |
+
add_thickbox();
|
646 |
+
if (function_exists('wp_tiny_mce'))
|
647 |
+
wp_tiny_mce();
|
648 |
+
}
|
649 |
+
wp_enqueue_script('utils');
|
650 |
+
wp_enqueue_script("main", plugins_url("js/main.js", __FILE__));
|
651 |
+
wp_enqueue_script("form_main_js", plugins_url("js/formmaker_free.js", __FILE__));
|
652 |
+
wp_enqueue_script("gmap_form_api", 'http://maps.google.com/maps/api/js?sensor=false');
|
653 |
+
wp_enqueue_style("styles_form", plugins_url("css/style.css", __FILE__));
|
654 |
+
wp_enqueue_script("mootools", plugins_url("js/mootools.js", __FILE__));
|
655 |
+
wp_enqueue_script("f_calendar", plugins_url("js/calendar.js", __FILE__));
|
656 |
+
wp_enqueue_script("f_calendar_functions", plugins_url("js/calendar_function.js", __FILE__));
|
657 |
+
wp_enqueue_script("f_calendar_setup", plugins_url("js/calendar-setup.js", __FILE__));
|
658 |
+
wp_enqueue_style("calendar-jos", plugins_url("js/calendar-jos.css", __FILE__));
|
659 |
+
wp_enqueue_script("jquery", plugins_url("js/jquery-1.9.1.js", __FILE__), array(), '1.9.1');
|
660 |
+
wp_deregister_script('jquery-ui');
|
661 |
+
wp_enqueue_script("jquery-ui", plugins_url("js/jquery-ui.js", __FILE__));
|
662 |
+
wp_enqueue_script("jquery.ui.slider", plugins_url("js/jquery.ui.slider.js", __FILE__));
|
663 |
+
wp_enqueue_style("jquery-ui-spinner", plugins_url("css/jquery-ui-spinner.css", __FILE__), FALSE);
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
|
668 |
function Manage_Form_maker() {
|
669 |
require_once("form_maker_functions.php");
|
670 |
require_once("form_maker_functions.html.php");
|
671 |
+
if (!function_exists('print_html_nav')) {
|
672 |
require_once("nav_function/nav_html_func.php");
|
673 |
+
}
|
674 |
global $wpdb;
|
675 |
if (isset($_GET["task"])) {
|
676 |
$task = esc_html($_GET["task"]);
|
679 |
$task = "show";
|
680 |
}
|
681 |
if (isset($_GET["id"])) {
|
682 |
+
$id = (int) $_GET["id"];
|
683 |
}
|
684 |
else {
|
685 |
$id = 0;
|
702 |
edit_form_maker($id);
|
703 |
break;
|
704 |
case "Save" :
|
705 |
+
if ($id) {
|
706 |
apply_form($id);
|
707 |
+
}
|
708 |
+
else {
|
709 |
save_form();
|
710 |
+
}
|
711 |
display_form_lists();
|
712 |
break;
|
713 |
case "Apply" :
|
737 |
save_form();
|
738 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
739 |
}
|
740 |
+
wd_form_options($id);
|
741 |
break;
|
742 |
case "Save_form_options" :
|
743 |
Apply_form_options($id);
|
745 |
break;
|
746 |
case "Apply_form_options" :
|
747 |
Apply_form_options($id);
|
748 |
+
wd_form_options($id);
|
749 |
break;
|
750 |
case "save_as_copy":
|
751 |
save_as_copy();
|
756 |
}
|
757 |
}
|
758 |
|
759 |
+
// Open map in submissions.
|
|
|
|
|
|
|
760 |
add_action('wp_ajax_frommapeditinpopup', 'spider_form_map_edit');
|
761 |
function spider_form_map_edit() {
|
762 |
if (function_exists('current_user_can')) {
|
771 |
$long = esc_html($_GET['long']);
|
772 |
$lat = esc_html($_GET['lat']);
|
773 |
?>
|
774 |
+
<script src="<?php echo plugins_url("js/if_gmap_back_end.js", __FILE__); ?>"></script>
|
775 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
|
|
776 |
<table style="margin:0px; padding:0px">
|
777 |
<tr>
|
778 |
<td><b>Address:</b></td>
|
788 |
</tr>
|
789 |
</table>
|
790 |
|
791 |
+
<div id="0_elementform_id_temp" long="<?php echo $long ?>" center_x="<?php echo $long ?>" center_y="<?php echo $lat ?>" lat="<?php echo $lat ?>" zoom="8" info="" style="width:600px; height:500px; "></div>
|
|
|
|
|
|
|
792 |
<script>
|
793 |
if_gmap_init("0");
|
794 |
add_marker_on_map(0, 0, "<?php echo $long ?>", "<?php echo $lat ?>", '');
|
|
|
|
|
795 |
</script>
|
|
|
796 |
<?php
|
797 |
+
die();
|
798 |
+
}
|
799 |
+
else {
|
800 |
+
return 0;
|
801 |
+
}
|
802 |
+
}
|
803 |
|
804 |
+
// Open map in submissions.
|
805 |
+
add_action('wp_ajax_show_matrix', 'spider_form_show_matrix');
|
806 |
+
function spider_form_show_matrix() {
|
807 |
+
if (function_exists('current_user_can')) {
|
808 |
+
if (!current_user_can('manage_options')) {
|
809 |
+
die('Access Denied');
|
810 |
+
}
|
811 |
+
}
|
812 |
+
else {
|
813 |
+
die('Access Denied');
|
814 |
+
}
|
815 |
+
if (isset($_GET['matrix_params'])) {
|
816 |
+
$matrix_params = esc_html($_GET['matrix_params']);
|
817 |
+
$new_filename = str_replace("***matrix***", '', $matrix_params);
|
818 |
+
$new_filename = explode('***', $matrix_params);
|
819 |
+
$mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
|
820 |
+
$mat_rows = $mat_params[0];
|
821 |
+
$mat_columns = $mat_params[$mat_rows + 1];
|
822 |
+
$matrix = '<table>';
|
823 |
+
$matrix .= '<tr><td></td>';
|
824 |
+
for ($k = 1; $k <= $mat_columns; $k++) {
|
825 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px;">' . $mat_params[$mat_rows + 1 + $k] . '</td>';
|
826 |
+
}
|
827 |
+
$matrix .= '</tr>';
|
828 |
+
$aaa = Array();
|
829 |
+
$var_checkbox = 1;
|
830 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
831 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px; ">'.$mat_params[$k].'</td>';
|
832 |
+
if ($mat_params[$mat_rows + $mat_columns + 2] == "radio") {
|
833 |
+
if ($mat_params[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
834 |
+
$checked = 0;
|
835 |
+
$aaa[1] = "";
|
836 |
+
}
|
837 |
+
else {
|
838 |
+
$aaa = explode("_", $mat_params[$mat_rows + $mat_columns + 2 + $k]);
|
839 |
+
}
|
840 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
841 |
+
if ($aaa[1] == $l) {
|
842 |
+
$checked = "checked";
|
843 |
+
}
|
844 |
+
else {
|
845 |
+
$checked = "";
|
846 |
+
}
|
847 |
+
$matrix .= '<td style="text-align:center"><input type="radio" ' . $checked . ' disabled /></td>';
|
848 |
+
}
|
849 |
+
}
|
850 |
+
else {
|
851 |
+
if ($mat_params[$mat_rows + $mat_columns + 2] == "checkbox") {
|
852 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
853 |
+
if ($mat_params[$mat_rows+$mat_columns + 2 + $var_checkbox] == "1") {
|
854 |
+
$checked = "checked";
|
855 |
+
}
|
856 |
+
else {
|
857 |
+
$checked = "";
|
858 |
+
}
|
859 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" ' . $checked . ' disabled /></td>';
|
860 |
+
$var_checkbox++;
|
861 |
+
}
|
862 |
+
}
|
863 |
+
else {
|
864 |
+
if ($mat_params[$mat_rows + $mat_columns + 2] == "text") {
|
865 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
866 |
+
$checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
|
867 |
+
$matrix .= '<td style="text-align:center"><input type="text" value="' . $checked . '" disabled /></td>';
|
868 |
+
$var_checkbox++;
|
869 |
+
}
|
870 |
+
}
|
871 |
+
else {
|
872 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
873 |
+
$checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
|
874 |
+
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
875 |
+
$var_checkbox++;
|
876 |
+
}
|
877 |
+
}
|
878 |
+
}
|
879 |
+
}
|
880 |
+
$matrix .= '</tr>';
|
881 |
+
}
|
882 |
+
$matrix .= '</table>';
|
883 |
+
echo $matrix;
|
884 |
die();
|
885 |
}
|
886 |
else {
|
888 |
}
|
889 |
}
|
890 |
|
891 |
+
// Form preview.
|
|
|
|
|
|
|
892 |
add_action('wp_ajax_frommakerpreview', 'preview_formmaker');
|
893 |
function html_preview_formmaker($css) {
|
894 |
+
echo "<input type='hidden' value='" . plugins_url("", __FILE__) . "' id='form_plugins_url' />";
|
895 |
+
echo '<script type="text/javascript">
|
896 |
+
if (document.getElementById("form_plugins_url")) {
|
897 |
+
var plugin_url = document.getElementById("form_plugins_url").value;
|
898 |
+
}
|
899 |
+
else {
|
900 |
+
var plugin_url = "";
|
901 |
+
}
|
902 |
+
</script>';
|
903 |
$cmpnt_js_path = plugins_url('js', __FILE__);
|
904 |
$id = 'form_id_temp';
|
905 |
?>
|
906 |
+
<script src="<?php echo $cmpnt_js_path . "/if_gmap_back_end.js"; ?>"></script>
|
907 |
<script src="<?php echo $cmpnt_js_path . "/main.js"; ?>"></script>
|
908 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
909 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery-1.9.1.js"; ?>"></script>
|
910 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery-ui.js"; ?>"></script>
|
911 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery.ui.slider.js"; ?>"></script>
|
912 |
+
<script src="<?php echo $cmpnt_js_path . "/main_front_end.js"; ?>"></script>
|
913 |
+
<link media="all" type="text/css" href="<?php echo plugins_url('', __FILE__) . "/css/jquery-ui-spinner.css"; ?>" rel="stylesheet">
|
914 |
<style>
|
915 |
<?php
|
916 |
$cmpnt_js_path = plugins_url('', __FILE__);
|
917 |
echo str_replace('[SITE_ROOT]', $cmpnt_js_path, $css);
|
|
|
918 |
?>
|
919 |
</style>
|
920 |
<div id="form_id_temppages" class="wdform_page_navigation" show_title="" show_numbers="" type=""></div>
|
930 |
document.getElementById('form_id_temppages').setAttribute('show_numbers', window.parent.document.getElementById('pages').getAttribute('show_numbers'));
|
931 |
document.getElementById('form_id_temppages').setAttribute('type', window.parent.document.getElementById('pages').getAttribute('type'));
|
932 |
document.getElementById('counterform_id_temp').value = window.parent.gen;
|
|
|
|
|
933 |
form_view_count<?php echo $id ?>= 0;
|
934 |
for (i = 1; i <= 30; i++) {
|
935 |
if (document.getElementById('<?php echo $id ?>form_view' + i)) {
|
974 |
}
|
975 |
|
976 |
function refresh_first() {
|
|
|
977 |
n = window.parent.gen;
|
978 |
for (i = 0; i < n; i++) {
|
979 |
if (document.getElementById(i)) {
|
1142 |
}
|
1143 |
case "type_address":
|
1144 |
{
|
1145 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('street1')=='no')
|
1146 |
+
remove_add_(i+"_street1form_id_temp");
|
1147 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('street2')=='no')
|
1148 |
+
remove_add_(i+"_street2form_id_temp");
|
1149 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('city')=='no')
|
1150 |
+
remove_add_(i+"_cityform_id_temp");
|
1151 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('state')=='no')
|
1152 |
+
remove_add_(i+"_stateform_id_temp");
|
1153 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('postal')=='no')
|
1154 |
+
remove_add_(i+"_postalform_id_temp");
|
1155 |
+
if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('country')=='no')
|
1156 |
+
remove_add_(i+"_countryform_id_temp");
|
1157 |
|
1158 |
break;
|
1159 |
|
1168 |
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1169 |
remove_add_(i + "_elementform_id_temp" + j);
|
1170 |
}
|
|
|
|
|
|
|
1171 |
break;
|
1172 |
}
|
1173 |
|
1208 |
remove_add_(i + "_yearform_id_temp");
|
1209 |
break;
|
1210 |
}
|
1211 |
+
case "type_star_rating":
|
1212 |
+
{
|
1213 |
+
remove_add_(i+"_elementform_id_temp");
|
1214 |
+
|
1215 |
+
break;
|
1216 |
+
}
|
1217 |
+
case "type_scale_rating":
|
1218 |
+
{
|
1219 |
+
remove_add_(i+"_elementform_id_temp");
|
1220 |
+
|
1221 |
+
break;
|
1222 |
+
}
|
1223 |
+
case "type_spinner":
|
1224 |
+
{
|
1225 |
+
remove_add_(i+"_elementform_id_temp");
|
1226 |
+
|
1227 |
+
var spinner_value = document.getElementById(i+"_elementform_id_temp").getAttribute( "aria-valuenow" );
|
1228 |
+
var spinner_min_value = document.getElementById(i+"_min_valueform_id_temp").value;
|
1229 |
+
var spinner_max_value = document.getElementById(i+"_max_valueform_id_temp").value;
|
1230 |
+
var spinner_step = document.getElementById(i+"_stepform_id_temp").value;
|
1231 |
+
|
1232 |
+
jQuery( "#"+i+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
|
1233 |
+
.prop( "disabled", false )
|
1234 |
+
.removeAttr( "autocomplete" )
|
1235 |
+
.removeAttr( "role" )
|
1236 |
+
.removeAttr( "aria-valuemin" )
|
1237 |
+
.removeAttr( "aria-valuemax" )
|
1238 |
+
.removeAttr( "aria-valuenow" );
|
1239 |
+
|
1240 |
+
span_ui= document.getElementById(i+"_elementform_id_temp").parentNode;
|
1241 |
+
span_ui.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp"));
|
1242 |
+
span_ui.parentNode.removeChild(span_ui);
|
1243 |
+
|
1244 |
+
jQuery("#"+i+"_elementform_id_temp")[0].spin = null;
|
1245 |
+
|
1246 |
+
spinner = jQuery( "#"+i+"_elementform_id_temp" ).spinner();
|
1247 |
+
spinner.spinner( "value", spinner_value );
|
1248 |
+
jQuery( "#"+i+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
|
1249 |
+
jQuery( "#"+i+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
|
1250 |
+
jQuery( "#"+i+"_elementform_id_temp" ).spinner({ step: spinner_step});
|
1251 |
+
break;
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
case "type_slider":
|
1255 |
+
{
|
1256 |
+
remove_add_(i+"_elementform_id_temp");
|
1257 |
+
|
1258 |
+
var slider_value = document.getElementById(i+"_slider_valueform_id_temp").value;
|
1259 |
+
var slider_min_value = document.getElementById(i+"_slider_min_valueform_id_temp").value;
|
1260 |
+
var slider_max_value = document.getElementById(i+"_slider_max_valueform_id_temp").value;
|
1261 |
+
|
1262 |
+
var slider_element_value = document.getElementById( i+"_element_valueform_id_temp" );
|
1263 |
+
var slider_value_save = document.getElementById( i+"_slider_valueform_id_temp" );
|
1264 |
+
|
1265 |
+
document.getElementById(i+"_elementform_id_temp").innerHTML = "";
|
1266 |
+
document.getElementById(i+"_elementform_id_temp").removeAttribute( "class" );
|
1267 |
+
document.getElementById(i+"_elementform_id_temp").removeAttribute( "aria-disabled" );
|
1268 |
+
jQuery("#"+i+"_elementform_id_temp")[0].slide = null;
|
1269 |
+
|
1270 |
+
|
1271 |
+
jQuery( "#"+i+"_elementform_id_temp").slider({
|
1272 |
+
range: "min",
|
1273 |
+
value: eval(slider_value),
|
1274 |
+
min: eval(slider_min_value),
|
1275 |
+
max: eval(slider_max_value),
|
1276 |
+
slide: function( event, ui ) {
|
1277 |
+
slider_element_value.innerHTML = "" + ui.value ;
|
1278 |
+
slider_value_save.value = "" + ui.value;
|
1279 |
+
|
1280 |
+
}
|
1281 |
+
});
|
1282 |
+
break;
|
1283 |
+
}
|
1284 |
+
case "type_range":
|
1285 |
+
{
|
1286 |
+
remove_add_(i+"_elementform_id_temp0");
|
1287 |
+
remove_add_(i+"_elementform_id_temp1");
|
1288 |
+
|
1289 |
+
var spinner_value0 = document.getElementById(i+"_elementform_id_temp0").getAttribute( "aria-valuenow" );
|
1290 |
+
var spinner_step = document.getElementById(i+"_range_stepform_id_temp").value;
|
1291 |
+
|
1292 |
+
jQuery( "#"+i+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
|
1293 |
+
.prop( "disabled", false )
|
1294 |
+
.removeAttr( "autocomplete" )
|
1295 |
+
.removeAttr( "role" )
|
1296 |
+
.removeAttr( "aria-valuenow" );
|
1297 |
+
|
1298 |
+
span_ui= document.getElementById(i+"_elementform_id_temp0").parentNode;
|
1299 |
+
span_ui.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp0"));
|
1300 |
+
span_ui.parentNode.removeChild(span_ui);
|
1301 |
+
|
1302 |
+
jQuery("#"+i+"_elementform_id_temp0")[0].spin = null;
|
1303 |
+
jQuery("#"+i+"_elementform_id_temp1")[0].spin = null;
|
1304 |
+
|
1305 |
+
|
1306 |
+
spinner0 = jQuery( "#"+i+"_elementform_id_temp0" ).spinner();
|
1307 |
+
spinner0.spinner( "value", spinner_value0 );
|
1308 |
+
jQuery( "#"+i+"_elementform_id_temp0" ).spinner({ step: spinner_step});
|
1309 |
+
var spinner_value1 = document.getElementById(i+"_elementform_id_temp1").getAttribute( "aria-valuenow" );
|
1310 |
+
jQuery( "#"+i+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
|
1311 |
+
.prop( "disabled", false )
|
1312 |
+
.removeAttr( "autocomplete" )
|
1313 |
+
.removeAttr( "role" )
|
1314 |
+
.removeAttr( "aria-valuenow" );
|
1315 |
+
|
1316 |
+
span_ui1= document.getElementById(i+"_elementform_id_temp1").parentNode;
|
1317 |
+
span_ui1.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp1"));
|
1318 |
+
span_ui1.parentNode.removeChild(span_ui1);
|
1319 |
+
|
1320 |
+
spinner1 = jQuery( "#"+i+"_elementform_id_temp1" ).spinner();
|
1321 |
+
spinner1.spinner( "value", spinner_value1 );
|
1322 |
+
jQuery( "#"+i+"_elementform_id_temp1" ).spinner({ step: spinner_step});
|
1323 |
+
|
1324 |
+
break;
|
1325 |
+
}
|
1326 |
+
case "type_grading":
|
1327 |
+
{
|
1328 |
+
|
1329 |
+
for(k=0; k<100; k++)
|
1330 |
+
if(document.getElementById(i+"_elementform_id_temp"+k))
|
1331 |
+
{
|
1332 |
+
remove_add_(i+"_elementform_id_temp"+k);
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
|
1336 |
+
break;
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
case "type_matrix":
|
1340 |
+
{
|
1341 |
+
remove_add_(i+"_elementform_id_temp");
|
1342 |
+
|
1343 |
+
break;
|
1344 |
+
}
|
1345 |
}
|
1346 |
}
|
1347 |
}
|
1389 |
die();
|
1390 |
}
|
1391 |
|
1392 |
+
function preview_formmaker() {
|
1393 |
if (function_exists('current_user_can')) {
|
1394 |
if (!current_user_can('manage_options')) {
|
1395 |
die('Access Denied');
|
1399 |
die('Access Denied');
|
1400 |
}
|
1401 |
global $wpdb;
|
1402 |
+
if (isset($_GET['id']))
|
1403 |
+
$getparams = (int) $_GET['id'];
|
|
|
|
|
|
|
|
|
1404 |
$query = "SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id=" . $getparams;
|
1405 |
$css = $wpdb->get_var($query);
|
1406 |
html_preview_formmaker($css);
|
1424 |
$task = "show";
|
1425 |
}
|
1426 |
if (isset($_GET["id"])) {
|
1427 |
+
$id = (int) $_GET["id"];
|
1428 |
}
|
1429 |
else {
|
1430 |
$id = 0;
|
1463 |
function Form_maker_Themes() {
|
1464 |
require_once("Theme_functions.php");
|
1465 |
require_once("Themes_function.html.php");
|
1466 |
+
if (!function_exists('print_html_nav')) {
|
1467 |
require_once("nav_function/nav_html_func.php");
|
1468 |
+
}
|
1469 |
global $wpdb;
|
1470 |
if (isset($_GET["task"])) {
|
1471 |
$task = esc_html($_GET["task"]);
|
1474 |
$task = "";
|
1475 |
}
|
1476 |
if (isset($_GET["id"])) {
|
1477 |
+
$id = (int) $_GET["id"];
|
1478 |
}
|
1479 |
else {
|
1480 |
$id = 0;
|
1656 |
</div>
|
1657 |
</form>
|
1658 |
<?php
|
1659 |
+
}
|
1660 |
}
|
1661 |
|
1662 |
|
1666 |
require_once("update_sql.php");
|
1667 |
formmaker_chech_update();
|
1668 |
}
|
|
|
1669 |
register_activation_hook(__FILE__, 'formmaker_activate');
|
1670 |
+
|
1671 |
function sp_form_deactiv() {
|
1672 |
echo esc_html($_GET['form_maker_uninstall']);
|
1673 |
if (isset($_GET['form_maker_uninstall'])) {
|
1674 |
+
if ($_GET['form_maker_uninstall'] == 1) {
|
1675 |
delete_option('formmaker_cureent_version');
|
1676 |
}
|
1677 |
}
|
Submissions.html.php
CHANGED
@@ -16,14 +16,13 @@ function html_show_submits($rows, $forms, $lists, $pageNav, $labels, $label_titl
|
|
16 |
array_push($group_id_s, $row->group_id);
|
17 |
}
|
18 |
}
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
<script type="text/javascript">
|
27 |
function tableOrdering(order, dir, task) {
|
28 |
var form = document.admin_form;
|
29 |
form.filter_order2.value = order;
|
@@ -37,7 +36,6 @@ function ordering(name, as_or_desc) {
|
|
37 |
}
|
38 |
function renderColumns() {
|
39 |
allTags = document.getElementsByTagName('*');
|
40 |
-
|
41 |
for (curTag in allTags) {
|
42 |
if (typeof(allTags[curTag].className) != "undefined")
|
43 |
if (allTags[curTag].className.indexOf('_fc') > 0) {
|
@@ -47,21 +45,25 @@ function renderColumns() {
|
|
47 |
else
|
48 |
allTags[curTag].style.display = '';
|
49 |
}
|
50 |
-
if (typeof(allTags[curTag].id) != "undefined")
|
51 |
if (allTags[curTag].id.indexOf('_fc') > 0) {
|
52 |
-
curLabel = allTags[curTag].id.replace('_fc',
|
53 |
-
if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0)
|
54 |
allTags[curTag].style.display = 'none';
|
55 |
-
|
|
|
56 |
allTags[curTag].style.display = '';
|
|
|
57 |
}
|
|
|
58 |
}
|
59 |
}
|
60 |
|
61 |
function clickLabChB(label, ChB) {
|
62 |
document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
|
63 |
-
if (document.forms.admin_form.hide_label_list.value == '')
|
64 |
-
|
|
|
65 |
if (!(ChB.checked)) {
|
66 |
document.forms.admin_form.hide_label_list.value += '@' + label + '@';
|
67 |
document.getElementById('ChBAll').checked = false;
|
@@ -248,7 +250,6 @@ jQuery(document).ready(function ($) {
|
|
248 |
</script>
|
249 |
|
250 |
<style>
|
251 |
-
|
252 |
.reports {
|
253 |
border: 1px solid #DEDEDE;
|
254 |
border-radius: 11px;
|
@@ -256,11 +257,9 @@ jQuery(document).ready(function ($) {
|
|
256 |
text-align: center;
|
257 |
width: 100px;
|
258 |
}
|
259 |
-
|
260 |
.bordered {
|
261 |
border-radius: 8px
|
262 |
}
|
263 |
-
|
264 |
.simple_table {
|
265 |
background-color: transparent;
|
266 |
!important
|
@@ -292,11 +291,14 @@ jQuery(document).ready(function ($) {
|
|
292 |
else
|
293 |
echo '<input type="checkbox" onclick="clickLabChB(\'' . $curlabel . '\', this)" />' . stripslashes($label_titles[$key]) . '<br />';
|
294 |
}
|
295 |
-
|
296 |
-
|
|
|
|
|
|
|
|
|
297 |
?>
|
298 |
<br/>
|
299 |
-
|
300 |
<div style="text-align:center;">
|
301 |
<input type="button" onclick="toggleChBDiv(false);" value="Done"/>
|
302 |
</div>
|
@@ -310,19 +312,16 @@ jQuery(document).ready(function ($) {
|
|
310 |
This section allows you to view and manage form submissions.
|
311 |
<a href="http://web-dorado.com/wordpress-form-maker-guide-6.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
312 |
</div>
|
313 |
-
<form action="admin.php?page=Form_maker_Submits" method="post" id="admin_form"
|
314 |
name="admin_form">
|
315 |
<input type="hidden" name="option" value="com_formmaker">
|
316 |
<input type="hidden" name="task" value="submits">
|
317 |
-
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php
|
318 |
-
echo esc_html($_POST['asc_or_desc']);
|
319 |
-
|
320 |
-
|
321 |
-
echo esc_html($_POST['order_by']);
|
322 |
-
} ?>">
|
323 |
<br/>
|
324 |
<table width="95%">
|
325 |
-
|
326 |
<tr>
|
327 |
<td colspan="11">
|
328 |
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%">
|
@@ -396,18 +395,13 @@ jQuery(document).ready(function ($) {
|
|
396 |
</table>
|
397 |
<?php print_html_nav($pageNav['total'], $pageNav['limit']);
|
398 |
?>
|
399 |
-
<div style="border-radius: 3px 3px 3px 3px;border: 1px solid #F0F0F0; overflow-x:auto; width:95%; ">
|
400 |
<table class="wp-list-table widefat fixed posts" style="width:95%; table-layout: inherit !important;">
|
401 |
<thead>
|
402 |
<tr>
|
403 |
<th width="3%"><?php echo '#'; ?></th>
|
404 |
-
|
405 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th>
|
406 |
-
<?php
|
407 |
-
|
408 |
-
|
409 |
-
?>
|
410 |
-
<th width="4%" scope="col" id="submitid_fc" class="submitid_fc <?php if ($sort["sortid_by"] == "group_id")
|
411 |
echo $sort["custom_style"];
|
412 |
else echo $sort["default_style"]; ?>" <?php if (!(strpos($lists['hide_label_list'], '@submitid@') === FALSE))
|
413 |
echo 'style="display:none;"';?>><a href="javascript:ordering('group_id',<?php if ($sort["sortid_by"] == "group_id")
|
@@ -427,18 +421,15 @@ jQuery(document).ready(function ($) {
|
|
427 |
echo 'style="display:none;"';?>><a href="javascript:ordering('ip',<?php if ($sort["sortid_by"] == "ip")
|
428 |
echo $sort["1_or_2"];
|
429 |
else echo "1"; ?>)"><span>Submitter's IP Address</span><span class="sorting-indicator"></span></a></th><?php
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
$n = count($rows);
|
434 |
-
|
435 |
-
|
436 |
for ($i = 0; $i < count($labels); $i++) {
|
437 |
-
if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE)
|
438 |
$styleStr = '';
|
439 |
-
|
440 |
-
|
441 |
-
|
|
|
|
|
442 |
switch ($label_titles_copy[$i]) {
|
443 |
case 'Street Line':
|
444 |
$field_title = __('Street Address', 'form_maker');
|
@@ -462,10 +453,10 @@ jQuery(document).ready(function ($) {
|
|
462 |
$field_title = stripslashes($label_titles_copy[$i]);
|
463 |
break;
|
464 |
}
|
465 |
-
else
|
466 |
$field_title = stripslashes($label_titles_copy[$i]);
|
|
|
467 |
?>
|
468 |
-
|
469 |
<th style="<?php echo $styleStr; ?>" id="<?php echo $labels_id[$i] . '_fc';?>"
|
470 |
class="<?php echo $labels_id[$i] . '_fc'; if ($sort["sortid_by"] == $labels_id[$i] . "_field")
|
471 |
echo $sort["custom_style"] . '"';
|
@@ -473,9 +464,8 @@ jQuery(document).ready(function ($) {
|
|
473 |
href="javascript:ordering('<?php echo $labels_id[$i] . "_field"; ?>',<?php if ($sort["sortid_by"] == $labels_id[$i] . "_field")
|
474 |
echo $sort["1_or_2"];
|
475 |
else echo "1"; ?>)"><span><?php echo $field_title ?></span><span class="sorting-indicator"></span></a></th>
|
476 |
-
|
477 |
<?php
|
478 |
-
|
479 |
?>
|
480 |
<th style="width:80px">Edit</th>
|
481 |
<th style="width:80px"><a
|
@@ -526,14 +516,17 @@ jQuery(document).ready(function ($) {
|
|
526 |
}
|
527 |
|
528 |
for ($i = 0; $i < count($labels); $i++) {
|
529 |
-
if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE)
|
530 |
$styleStr = '';
|
531 |
-
|
|
|
532 |
$styleStr = 'style="display:none;"';
|
533 |
-
|
|
|
534 |
if ($lists[$form_id . '_' . $labels_id[$i] . '_search']) {
|
535 |
$ka_fielderov_search = TRUE;
|
536 |
}
|
|
|
537 |
if ($sorted_labels_type[$i] != 'type_mark_map')
|
538 |
echo '<th class="' . $labels_id[$i] . '_fc" ' . $styleStr . '>' . '<input name="' . $form_id . '_' . $labels_id[$i] . '_search" id="' . $form_id . '_' . $labels_id[$i] . '_search" type="text" value="' . $lists[$form_id . '_' . $labels_id[$i] . '_search'] . '" onChange="this.form.submit();" >' . '</th>';
|
539 |
else
|
@@ -568,7 +561,6 @@ jQuery(document).ready(function ($) {
|
|
568 |
$f = $temp[0];
|
569 |
$date = $f->date;
|
570 |
$ip = $f->ip;
|
571 |
-
// $checked = JHTML::_('grid.id', $www, $group_id_s[$www]);
|
572 |
$link = "admin.php?page=Form_maker_Submits&task=edit_submit&id=" . $f->group_id;
|
573 |
?>
|
574 |
|
@@ -612,53 +604,78 @@ jQuery(document).ready(function ($) {
|
|
612 |
$map_params = explode('***map***', $t->element_value);
|
613 |
$longit = $map_params[0];
|
614 |
$latit = $map_params[1];
|
615 |
-
echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '
|
|
|
|
|
616 |
}
|
617 |
else if (strpos($t->element_value, "*@@url@@*")) {
|
618 |
$new_file = str_replace("*@@url@@*", '', str_replace("***br***", '<br>', $t->element_value));
|
619 |
$new_filename = explode('/', $new_file);
|
620 |
echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><a target="_blank" href="' . $new_file . '">' . $new_filename[count($new_filename) - 1] . "</td>";
|
621 |
}
|
622 |
-
|
623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
$not_label = FALSE;
|
625 |
}
|
626 |
}
|
627 |
-
if ($not_label)
|
628 |
echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '></td>';
|
|
|
629 |
}
|
630 |
?>
|
631 |
-
<td
|
632 |
-
href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=edit_submit&id=<?php echo $f->group_id; ?>')">Edit</a>
|
633 |
</td>
|
634 |
-
<td
|
635 |
-
href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=remove_submit&id=<?php echo $f->group_id; ?>')">Delete</a>
|
636 |
</td>
|
637 |
</tr>
|
638 |
-
|
639 |
<?php
|
640 |
-
|
641 |
-
|
642 |
$k = 1 - $k;
|
643 |
}
|
644 |
-
|
645 |
?>
|
646 |
-
|
647 |
</table>
|
648 |
</div>
|
649 |
-
|
650 |
-
|
651 |
<?php
|
652 |
foreach ($sorted_labels_type as $key => $label_type) {
|
653 |
if ($label_type == "type_checkbox" || $label_type == "type_radio" || $label_type == "type_own_select" || $label_type == "type_country") {
|
654 |
?>
|
655 |
<br/>
|
656 |
<br/>
|
657 |
-
|
658 |
<strong><?php echo stripslashes($label_titles_copy[$key]); ?></strong>
|
659 |
<br/>
|
660 |
<br/>
|
661 |
-
|
662 |
<?php
|
663 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits " . $where_choices . " AND element_label='" . $labels_id[$key] . "'";
|
664 |
$choices = $wpdb->get_results($query);
|
@@ -736,7 +753,6 @@ jQuery(document).ready(function ($) {
|
|
736 |
<input type="hidden" name="filter_order_Dir2" value="<?php echo $lists['order_Dir']; ?>"/>
|
737 |
|
738 |
</form>
|
739 |
-
|
740 |
<script>
|
741 |
<?php if ($ka_fielderov_search) { ?>
|
742 |
document.getElementById('fields_filter').style.display = '';
|
@@ -781,7 +797,7 @@ function html_editSubmit($rows, $labels_id, $labels_name, $labels_type) {
|
|
781 |
</tr>
|
782 |
</tbody>
|
783 |
</table>
|
784 |
-
<form action="admin.php?page=Form_maker_Submits&id=<?php echo (int)$_GET['id']; ?>" method="post" id="adminForm"
|
785 |
name="adminForm">
|
786 |
<table class="admintable">
|
787 |
<tr>
|
@@ -820,39 +836,252 @@ function html_editSubmit($rows, $labels_id, $labels_name, $labels_type) {
|
|
820 |
$element_value = $row->element_value;
|
821 |
break;
|
822 |
}
|
|
|
|
|
|
|
823 |
}
|
824 |
-
if ($
|
825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
<td class="key">
|
827 |
<label for="title">
|
828 |
-
'
|
829 |
</label>
|
830 |
</td>
|
831 |
-
<td
|
832 |
-
|
|
|
|
|
|
|
|
|
833 |
</td>
|
834 |
-
</tr>
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
<label for="title">
|
842 |
-
'
|
843 |
</label>
|
844 |
-
</td>';
|
845 |
-
foreach ($choices as $choice_key => $choice)
|
846 |
-
echo '
|
847 |
-
<td >
|
848 |
-
<input type="text" name="submission_' . $label_id . '_' . $choice_key . '" id="submission_' . $label_id . '_' . $choice_key . '" value="' . $choice . '" size="80" />
|
849 |
</td>
|
850 |
-
|
851 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
852 |
}
|
853 |
}
|
854 |
}
|
855 |
-
|
856 |
?>
|
857 |
</table>
|
858 |
<input type="hidden" name="option" value="com_formmaker"/>
|
@@ -861,6 +1090,10 @@ function html_editSubmit($rows, $labels_id, $labels_name, $labels_type) {
|
|
861 |
<input type="hidden" name="date" value="<?php echo $rows[0]->date?>"/>
|
862 |
<input type="hidden" name="ip" value="<?php echo $rows[0]->ip?>"/>
|
863 |
<input type="hidden" name="task" value="save_submit"/>
|
|
|
|
|
|
|
|
|
864 |
</form>
|
865 |
<?php
|
866 |
}
|
16 |
array_push($group_id_s, $row->group_id);
|
17 |
}
|
18 |
}
|
19 |
+
?>
|
20 |
+
<style>
|
21 |
+
.calendar .button {
|
22 |
+
display: table-cell !important;
|
23 |
+
}
|
24 |
+
</style>
|
25 |
+
<script type="text/javascript">
|
|
|
26 |
function tableOrdering(order, dir, task) {
|
27 |
var form = document.admin_form;
|
28 |
form.filter_order2.value = order;
|
36 |
}
|
37 |
function renderColumns() {
|
38 |
allTags = document.getElementsByTagName('*');
|
|
|
39 |
for (curTag in allTags) {
|
40 |
if (typeof(allTags[curTag].className) != "undefined")
|
41 |
if (allTags[curTag].className.indexOf('_fc') > 0) {
|
45 |
else
|
46 |
allTags[curTag].style.display = '';
|
47 |
}
|
48 |
+
if (typeof(allTags[curTag].id) != "undefined") {
|
49 |
if (allTags[curTag].id.indexOf('_fc') > 0) {
|
50 |
+
curLabel = allTags[curTag].id.replace('_fc','');
|
51 |
+
if (document.forms.admin_form.hide_label_list.value.indexOf('@' + curLabel + '@') >= 0) {
|
52 |
allTags[curTag].style.display = 'none';
|
53 |
+
}
|
54 |
+
else {
|
55 |
allTags[curTag].style.display = '';
|
56 |
+
}
|
57 |
}
|
58 |
+
}
|
59 |
}
|
60 |
}
|
61 |
|
62 |
function clickLabChB(label, ChB) {
|
63 |
document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
|
64 |
+
if (document.forms.admin_form.hide_label_list.value == '') {
|
65 |
+
document.getElementById('ChBAll').checked = true;
|
66 |
+
}
|
67 |
if (!(ChB.checked)) {
|
68 |
document.forms.admin_form.hide_label_list.value += '@' + label + '@';
|
69 |
document.getElementById('ChBAll').checked = false;
|
250 |
</script>
|
251 |
|
252 |
<style>
|
|
|
253 |
.reports {
|
254 |
border: 1px solid #DEDEDE;
|
255 |
border-radius: 11px;
|
257 |
text-align: center;
|
258 |
width: 100px;
|
259 |
}
|
|
|
260 |
.bordered {
|
261 |
border-radius: 8px
|
262 |
}
|
|
|
263 |
.simple_table {
|
264 |
background-color: transparent;
|
265 |
!important
|
291 |
else
|
292 |
echo '<input type="checkbox" onclick="clickLabChB(\'' . $curlabel . '\', this)" />' . stripslashes($label_titles[$key]) . '<br />';
|
293 |
}
|
294 |
+
$ispaypal = FALSE;
|
295 |
+
for ($i = 0; $i < count($labels); $i++) {
|
296 |
+
if ($sorted_labels_type[$i] == 'type_paypal_payment_status') {
|
297 |
+
$ispaypal = TRUE;
|
298 |
+
}
|
299 |
+
}
|
300 |
?>
|
301 |
<br/>
|
|
|
302 |
<div style="text-align:center;">
|
303 |
<input type="button" onclick="toggleChBDiv(false);" value="Done"/>
|
304 |
</div>
|
312 |
This section allows you to view and manage form submissions.
|
313 |
<a href="http://web-dorado.com/wordpress-form-maker-guide-6.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
314 |
</div>
|
315 |
+
<form action="admin.php?page=Form_maker_Submits" method="post" style="" id="admin_form"
|
316 |
name="admin_form">
|
317 |
<input type="hidden" name="option" value="com_formmaker">
|
318 |
<input type="hidden" name="task" value="submits">
|
319 |
+
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc']))
|
320 |
+
echo esc_html($_POST['asc_or_desc']); ?>">
|
321 |
+
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by']))
|
322 |
+
echo esc_html($_POST['order_by']) ?>">
|
|
|
|
|
323 |
<br/>
|
324 |
<table width="95%">
|
|
|
325 |
<tr>
|
326 |
<td colspan="11">
|
327 |
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%">
|
395 |
</table>
|
396 |
<?php print_html_nav($pageNav['total'], $pageNav['limit']);
|
397 |
?>
|
398 |
+
<div style="border-radius: 3px 3px 3px 3px;border: 1px solid #F0F0F0; overflow-x:auto; width:95%; ">
|
399 |
<table class="wp-list-table widefat fixed posts" style="width:95%; table-layout: inherit !important;">
|
400 |
<thead>
|
401 |
<tr>
|
402 |
<th width="3%"><?php echo '#'; ?></th>
|
|
|
403 |
<th scope="col" id="cb" class="manage-column column-cb check-column" style=""><input type="checkbox"></th>
|
404 |
+
<th width="4%" scope="col" id="submitid_fc" class="submitid_fc <?php if ($sort["sortid_by"] == "group_id")
|
|
|
|
|
|
|
|
|
405 |
echo $sort["custom_style"];
|
406 |
else echo $sort["default_style"]; ?>" <?php if (!(strpos($lists['hide_label_list'], '@submitid@') === FALSE))
|
407 |
echo 'style="display:none;"';?>><a href="javascript:ordering('group_id',<?php if ($sort["sortid_by"] == "group_id")
|
421 |
echo 'style="display:none;"';?>><a href="javascript:ordering('ip',<?php if ($sort["sortid_by"] == "ip")
|
422 |
echo $sort["1_or_2"];
|
423 |
else echo "1"; ?>)"><span>Submitter's IP Address</span><span class="sorting-indicator"></span></a></th><?php
|
|
|
|
|
|
|
424 |
$n = count($rows);
|
|
|
|
|
425 |
for ($i = 0; $i < count($labels); $i++) {
|
426 |
+
if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE) {
|
427 |
$styleStr = '';
|
428 |
+
}
|
429 |
+
else {
|
430 |
+
$styleStr = 'display:none;';
|
431 |
+
}
|
432 |
+
if ($sorted_labels_type[$i] == 'type_address')
|
433 |
switch ($label_titles_copy[$i]) {
|
434 |
case 'Street Line':
|
435 |
$field_title = __('Street Address', 'form_maker');
|
453 |
$field_title = stripslashes($label_titles_copy[$i]);
|
454 |
break;
|
455 |
}
|
456 |
+
else {
|
457 |
$field_title = stripslashes($label_titles_copy[$i]);
|
458 |
+
}
|
459 |
?>
|
|
|
460 |
<th style="<?php echo $styleStr; ?>" id="<?php echo $labels_id[$i] . '_fc';?>"
|
461 |
class="<?php echo $labels_id[$i] . '_fc'; if ($sort["sortid_by"] == $labels_id[$i] . "_field")
|
462 |
echo $sort["custom_style"] . '"';
|
464 |
href="javascript:ordering('<?php echo $labels_id[$i] . "_field"; ?>',<?php if ($sort["sortid_by"] == $labels_id[$i] . "_field")
|
465 |
echo $sort["1_or_2"];
|
466 |
else echo "1"; ?>)"><span><?php echo $field_title ?></span><span class="sorting-indicator"></span></a></th>
|
|
|
467 |
<?php
|
468 |
+
}
|
469 |
?>
|
470 |
<th style="width:80px">Edit</th>
|
471 |
<th style="width:80px"><a
|
516 |
}
|
517 |
|
518 |
for ($i = 0; $i < count($labels); $i++) {
|
519 |
+
if (strpos($lists['hide_label_list'], '@' . $labels_id[$i] . '@') === FALSE) {
|
520 |
$styleStr = '';
|
521 |
+
}
|
522 |
+
else {
|
523 |
$styleStr = 'style="display:none;"';
|
524 |
+
}
|
525 |
+
if (!$ka_fielderov_search) {
|
526 |
if ($lists[$form_id . '_' . $labels_id[$i] . '_search']) {
|
527 |
$ka_fielderov_search = TRUE;
|
528 |
}
|
529 |
+
}
|
530 |
if ($sorted_labels_type[$i] != 'type_mark_map')
|
531 |
echo '<th class="' . $labels_id[$i] . '_fc" ' . $styleStr . '>' . '<input name="' . $form_id . '_' . $labels_id[$i] . '_search" id="' . $form_id . '_' . $labels_id[$i] . '_search" type="text" value="' . $lists[$form_id . '_' . $labels_id[$i] . '_search'] . '" onChange="this.form.submit();" >' . '</th>';
|
532 |
else
|
561 |
$f = $temp[0];
|
562 |
$date = $f->date;
|
563 |
$ip = $f->ip;
|
|
|
564 |
$link = "admin.php?page=Form_maker_Submits&task=edit_submit&id=" . $f->group_id;
|
565 |
?>
|
566 |
|
604 |
$map_params = explode('***map***', $t->element_value);
|
605 |
$longit = $map_params[0];
|
606 |
$latit = $map_params[1];
|
607 |
+
echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '>
|
608 |
+
<a class="thickbox-preview" href="' . admin_url('admin-ajax.php?action=frommapeditinpopup&long=' . $longit . '&lat=' . $latit) . '&TB_iframe=1&tbWidth=630&tbHeight=650" >' . 'Show on Map' . '</a>
|
609 |
+
</td>';
|
610 |
}
|
611 |
else if (strpos($t->element_value, "*@@url@@*")) {
|
612 |
$new_file = str_replace("*@@url@@*", '', str_replace("***br***", '<br>', $t->element_value));
|
613 |
$new_filename = explode('/', $new_file);
|
614 |
echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><a target="_blank" href="' . $new_file . '">' . $new_filename[count($new_filename) - 1] . "</td>";
|
615 |
}
|
616 |
+
elseif (strpos($t->element_value, "***star_rating***")) {
|
617 |
+
$new_filename = str_replace("***star_rating***", '', $t->element_value);
|
618 |
+
$stars = "";
|
619 |
+
$new_filename=explode('***', $new_filename);
|
620 |
+
for ($j = 0; $j < $new_filename[1]; $j++) {
|
621 |
+
$stars .= '<img id="' . $t->element_label . '_star_' . $j . '" src="' . plugins_url('images/star_' . $new_filename[2] . '.png', __FILE__) . '" /> ';
|
622 |
+
}
|
623 |
+
for ($k = $new_filename[1]; $k < $new_filename[0]; $k++) {
|
624 |
+
$stars .= '<img id="' . $t->element_label . '_star_' . $k . '" src="' . plugins_url('images/star.png', __FILE__) . '" /> ';
|
625 |
+
}
|
626 |
+
echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '>' . $stars . "</td>";
|
627 |
+
}
|
628 |
+
elseif (strpos($t->element_value, "***matrix***")) {
|
629 |
+
echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '>
|
630 |
+
<a class="thickbox-preview" href="' . admin_url('admin-ajax.php?action=show_matrix&matrix_params=' . $t->element_value) . '&TB_iframe=1&tbWidth=630&tbHeight=650">Show Matrix</a>
|
631 |
+
</td>';
|
632 |
+
}
|
633 |
+
elseif (strpos($t->element_value, "***grading***")) {
|
634 |
+
$new_filename = str_replace("***grading***", '', $t->element_value);
|
635 |
+
$grading = explode(":", $new_filename);
|
636 |
+
$items_count = sizeof($grading) - 1;
|
637 |
+
$items = "";
|
638 |
+
$total = "";
|
639 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
640 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . "</br>";
|
641 |
+
$total += $grading[$k];
|
642 |
+
}
|
643 |
+
$items .= "Total: " . $total;
|
644 |
+
echo '<td align="center" class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><pre style="font-family:inherit">' . $items . '</pre></td>';
|
645 |
+
}
|
646 |
+
else {
|
647 |
+
echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '><pre style="font-family:inherit">' . str_replace("***br***", '<br>', stripslashes($t->element_value)) . '</pre></td>';
|
648 |
+
}
|
649 |
$not_label = FALSE;
|
650 |
}
|
651 |
}
|
652 |
+
if ($not_label) {
|
653 |
echo '<td class="' . $labels_id[$h] . '_fc" ' . $styleStr . '></td>';
|
654 |
+
}
|
655 |
}
|
656 |
?>
|
657 |
+
<td>
|
658 |
+
<a href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=edit_submit&id=<?php echo $f->group_id; ?>')">Edit</a>
|
659 |
</td>
|
660 |
+
<td>
|
661 |
+
<a href="javascript:submit_del('admin.php?page=Form_maker_Submits&task=remove_submit&id=<?php echo $f->group_id; ?>')">Delete</a>
|
662 |
</td>
|
663 |
</tr>
|
|
|
664 |
<?php
|
|
|
|
|
665 |
$k = 1 - $k;
|
666 |
}
|
|
|
667 |
?>
|
|
|
668 |
</table>
|
669 |
</div>
|
|
|
|
|
670 |
<?php
|
671 |
foreach ($sorted_labels_type as $key => $label_type) {
|
672 |
if ($label_type == "type_checkbox" || $label_type == "type_radio" || $label_type == "type_own_select" || $label_type == "type_country") {
|
673 |
?>
|
674 |
<br/>
|
675 |
<br/>
|
|
|
676 |
<strong><?php echo stripslashes($label_titles_copy[$key]); ?></strong>
|
677 |
<br/>
|
678 |
<br/>
|
|
|
679 |
<?php
|
680 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits " . $where_choices . " AND element_label='" . $labels_id[$key] . "'";
|
681 |
$choices = $wpdb->get_results($query);
|
753 |
<input type="hidden" name="filter_order_Dir2" value="<?php echo $lists['order_Dir']; ?>"/>
|
754 |
|
755 |
</form>
|
|
|
756 |
<script>
|
757 |
<?php if ($ka_fielderov_search) { ?>
|
758 |
document.getElementById('fields_filter').style.display = '';
|
797 |
</tr>
|
798 |
</tbody>
|
799 |
</table>
|
800 |
+
<form action="admin.php?page=Form_maker_Submits&id=<?php echo (int) $_GET['id']; ?>" method="post" id="adminForm"
|
801 |
name="adminForm">
|
802 |
<table class="admintable">
|
803 |
<tr>
|
836 |
$element_value = $row->element_value;
|
837 |
break;
|
838 |
}
|
839 |
+
else {
|
840 |
+
$element_value = 'element_valueelement_valueelement_value';
|
841 |
+
}
|
842 |
}
|
843 |
+
if ($element_value == "element_valueelement_valueelement_value") {
|
844 |
+
continue;
|
845 |
+
}
|
846 |
+
switch ($labels_type[$key]) {
|
847 |
+
case 'type_checkbox':
|
848 |
+
{
|
849 |
+
$choices = explode('***br***', $element_value);
|
850 |
+
$choices = array_slice($choices, 0, count($choices) - 1);
|
851 |
+
echo '<tr>
|
852 |
+
<td class="key" rowspan="' . count($choices) . '">
|
853 |
+
<label for="title">' . $labels_name[$key] . '</label>
|
854 |
+
</td>';
|
855 |
+
foreach ($choices as $choice_key => $choice) {
|
856 |
+
echo '<td>
|
857 |
+
<input type="text" name="submission_'.$label_id.'_'.$choice_key.'" id="submission_'.$label_id.'_'.$choice_key.'" value="'.$choice.'" size="80" />
|
858 |
+
</td>
|
859 |
+
</tr>';
|
860 |
+
}
|
861 |
+
break;
|
862 |
+
}
|
863 |
+
case 'type_star_rating': {
|
864 |
+
$edit_stars = "";
|
865 |
+
$element_value1 = str_replace("***star_rating***", '', $element_value);
|
866 |
+
$stars_value = explode('***', $element_value1);
|
867 |
+
for ($j = 0; $j < $stars_value[1]; $j++)
|
868 |
+
$edit_stars.='<img id="'.$label_id.'_star_'.$j.'" onclick="edit_star_rating('.$j.','.$label_id.')" src="' . plugins_url('/images/star_'.$stars_value[2].'.png', __FILE__) . '" /> ';
|
869 |
+
for( $k=$stars_value[1];$k<$stars_value[0];$k++)
|
870 |
+
$edit_stars.='<img id="'.$label_id.'_star_'.$k.'" onclick="edit_star_rating('.$k.','.$label_id.')" src="' . plugins_url('/images/star.png', __FILE__) . '" /> ';
|
871 |
+
echo '<tr>
|
872 |
<td class="key">
|
873 |
<label for="title">
|
874 |
+
'.$labels_name[$key].'
|
875 |
</label>
|
876 |
</td>
|
877 |
+
<td>
|
878 |
+
<input type="hidden" id="'.$label_id.'_star_amountform_id_temp" name="'.$label_id.'_star_amountform_id_temp" value="'.$stars_value[0].'">
|
879 |
+
<input type="hidden" name="'.$label_id.'_star_colorform_id_temp" id="'.$label_id.'_star_colorform_id_temp" value="'.$stars_value[2].'">
|
880 |
+
<input type="hidden" id="'.$label_id.'_selected_star_amountform_id_temp" name="'.$label_id.'_selected_star_amountform_id_temp" value="'.$stars_value[1].'">
|
881 |
+
'.$edit_stars.'
|
882 |
+
<input type="hidden" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.$element_value.'" size="80" />
|
883 |
</td>
|
884 |
+
</tr>';
|
885 |
+
break;
|
886 |
+
}
|
887 |
+
case "type_scale_rating": {
|
888 |
+
$scale_radio = explode('/', $element_value);
|
889 |
+
$scale_value = $scale_radio[0];
|
890 |
+
$scale ='<table><tr>';
|
891 |
+
for ($k = 1; $k <= $scale_radio[1]; $k++)
|
892 |
+
$scale .= '<td style="text-align:center"><span>'.$k.'</span></td>';
|
893 |
+
$scale .='<tr></tr>';
|
894 |
+
for ($l = 1; $l <= $scale_radio[1]; $l++) {
|
895 |
+
if ($l == $scale_radio[0])
|
896 |
+
$checked="checked";
|
897 |
+
else
|
898 |
+
$checked="";
|
899 |
+
$scale .= '<td><input type="radio" name = "'.$label_id.'_scale_rating_radio" id = "'.$label_id.'_scale_rating_radio_'.$l.'" value="'.$l.'" '.$checked.' onClick="edit_scale_rating(this.value,'.$label_id.')" /></td>';
|
900 |
+
}
|
901 |
+
$scale .= '</tr></table>';
|
902 |
+
echo '<tr>
|
903 |
+
<td class="key">
|
904 |
+
<label for="title">
|
905 |
+
'.$labels_name[$key].'
|
906 |
+
</label>
|
907 |
+
</td>
|
908 |
+
<td>
|
909 |
+
<input type="hidden" id="'.$label_id.'_scale_checkedform_id_temp" name="'.$label_id.'_scale_checkedform_id_temp" value="'.$scale_radio[1].'">
|
910 |
+
'.$scale.'
|
911 |
+
<input type="hidden" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.$element_value.'" size="80" />
|
912 |
+
</td>
|
913 |
+
</tr>';
|
914 |
+
break;
|
915 |
+
}
|
916 |
+
case 'type_range': {
|
917 |
+
$range_value = explode('-', $element_value);
|
918 |
+
$range = '<input name="'.$label_id.'_element0" id="'.$label_id.'_element0" type="text" value="'.$range_value[0].'" onChange="edit_range(this.value,'.$label_id.',0)" size="8"/> - <input name="'.$label_id.'_element1" id="'.$label_id.'_element1" type="text" value="'.$range_value[1].'" onChange="edit_range(this.value,'.$label_id.',1)" size="8"/>';
|
919 |
+
echo '<tr>
|
920 |
+
<td class="key">
|
921 |
+
<label for="title">
|
922 |
+
'.$labels_name[$key].'
|
923 |
+
</label>
|
924 |
+
</td>
|
925 |
+
<td>
|
926 |
+
'.$range.'
|
927 |
+
<input type="hidden" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.$element_value.'" size="80" />
|
928 |
+
</td>
|
929 |
+
</tr>';
|
930 |
+
break;
|
931 |
+
}
|
932 |
+
case 'type_spinner': {
|
933 |
+
echo '<tr>
|
934 |
+
<td class="key">
|
935 |
+
<label for="title">
|
936 |
+
'.$labels_name[$key].'
|
937 |
+
</label>
|
938 |
+
</td>
|
939 |
+
<td>
|
940 |
+
<input type="text" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.str_replace("*@@url@@*",'',$element_value).'" size="20" />
|
941 |
+
</td>
|
942 |
+
</tr>';
|
943 |
+
break;
|
944 |
+
}
|
945 |
+
case 'type_grading': {
|
946 |
+
$element_value1 = str_replace("***grading***", '', $element_value);
|
947 |
+
$garding_value = explode(':', $element_value1);
|
948 |
+
$items_count = sizeof($garding_value) - 1;
|
949 |
+
$garding = "";
|
950 |
+
$sum = "";
|
951 |
+
for ($k = 0; $k < $items_count/2; $k++) {
|
952 |
+
$garding .= '<input name="'.$label_id.'_element'.$k.'" id="'.$label_id.'_element'.$k.'" type="text" value="'.$garding_value[$k].'" onKeyUp="edit_grading('.$label_id.','.$items_count.')" size="5"/> '.$garding_value[$items_count/2+$k].'</br>';
|
953 |
+
$sum += $garding_value[$k];
|
954 |
+
}
|
955 |
+
echo '<tr>
|
956 |
+
<td class="key">
|
957 |
+
<label for="title">
|
958 |
+
'.$labels_name[$key].'
|
959 |
+
</label>
|
960 |
+
</td>
|
961 |
+
<td>
|
962 |
+
'.$garding.'<div><span id="'.$label_id.'_grading_sumform_id_temp">'.$sum.'</span>/<span id="'.$label_id.'_grading_totalform_id_temp">'.$garding_value[$items_count].'</span><span id="'.$label_id.'_text_elementform_id_temp"></span>
|
963 |
+
<input type="hidden" id="'.$label_id.'_element_valueform_id_temp" name="'.$label_id.'_element_valueform_id_temp" value="'.$element_value1.'">
|
964 |
+
<input type="hidden" id="'.$label_id.'_grading_totalform_id_temp" name="'.$label_id.'_grading_totalform_id_temp" value="'.$garding_value[$items_count].'">
|
965 |
+
<input type="hidden" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.$element_value.'" size="80" />
|
966 |
+
</td>
|
967 |
+
</tr>';
|
968 |
+
break;
|
969 |
+
}
|
970 |
+
case 'type_matrix': {
|
971 |
+
$new_filename = str_replace("***matrix***", '', $element_value);
|
972 |
+
$matrix_value = explode('***', $new_filename);
|
973 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
974 |
+
$mat_rows = $matrix_value[0];
|
975 |
+
$mat_columns = $matrix_value[$mat_rows + 1];
|
976 |
+
$matrix = "<table>";
|
977 |
+
$matrix .= '<tr><td></td>';
|
978 |
+
for ($k = 1; $k <= $mat_columns; $k++)
|
979 |
+
$matrix .= '<td style="background-color:#BBBBBB; padding:5px; border:1px; ">'.$matrix_value[$mat_rows+1+$k].'</td>';
|
980 |
+
$matrix .= '</tr>';
|
981 |
+
$aaa = Array();
|
982 |
+
$var_checkbox = 1;
|
983 |
+
$selected_value = "";
|
984 |
+
$selected_value_yes = "";
|
985 |
+
$selected_value_no = "";
|
986 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
987 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px; border:1px;">'.$matrix_value[$k].'</td>';
|
988 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
989 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
990 |
+
$checked = "";
|
991 |
+
$aaa[1] = "";
|
992 |
+
}
|
993 |
+
else
|
994 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
995 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
996 |
+
if ($aaa[1] == $l) {
|
997 |
+
$checked = 'checked';
|
998 |
+
}
|
999 |
+
else
|
1000 |
+
$checked = "";
|
1001 |
+
$index = "'" . $k . '_' . $l . "'";
|
1002 |
+
$matrix .='<td style="text-align:center;"><input name="'.$label_id.'_input_elementform_id_temp'.$k.'" id="'.$label_id.'_input_elementform_id_temp'.$k.'_'.$l.'" type="'.$matrix_value[$mat_rows+$mat_columns+2].'" '.$checked.' onClick="change_radio_values('.$index.','.$label_id.','.$mat_rows.','.$mat_columns.')"/></td>';
|
1003 |
+
}
|
1004 |
+
}
|
1005 |
+
else {
|
1006 |
+
if ($matrix_value[$mat_rows+$mat_columns+2] == "checkbox") {
|
1007 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
1008 |
+
if ($matrix_value[$mat_rows+$mat_columns+2+$var_checkbox]==1)
|
1009 |
+
$checked = 'checked';
|
1010 |
+
else
|
1011 |
+
$checked = '';
|
1012 |
+
$index = "'".$k.'_'.$l."'";
|
1013 |
+
$matrix .='<td style="text-align:center;"><input name="'.$label_id.'_input_elementform_id_temp'.$k.'_'.$l.'" id="'.$label_id.'_input_elementform_id_temp'.$k.'_'.$l.'" type="'.$matrix_value[$mat_rows+$mat_columns+2].'" '.$checked.' onClick="change_checkbox_values('.$index.','.$label_id.','.$mat_rows.','.$mat_columns.')"/></td>';
|
1014 |
+
$var_checkbox++;
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
else {
|
1018 |
+
if ($matrix_value[$mat_rows+$mat_columns+2]=="text") {
|
1019 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
1020 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
1021 |
+
$index = "'".$k.'_'.$l."'";
|
1022 |
+
$matrix .='<td style="text-align:center;"><input name="'.$label_id.'_input_elementform_id_temp'.$k.'_'.$l.'" id="'.$label_id.'_input_elementform_id_temp'.$k.'_'.$l.'" type="'.$matrix_value[$mat_rows+$mat_columns+2].'"
|
1023 |
+
value="'.$text_value.'" onKeyUp="change_text_values('.$index.','.$label_id.','.$mat_rows.','.$mat_columns.')"/></td>';
|
1024 |
+
$var_checkbox++;
|
1025 |
+
}
|
1026 |
+
}
|
1027 |
+
else {
|
1028 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
1029 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
1030 |
+
if ($selected_text=='yes') {
|
1031 |
+
$selected_value_yes ='selected';
|
1032 |
+
$selected_value_no ='';
|
1033 |
+
$selected_value ='';
|
1034 |
+
}
|
1035 |
+
else {
|
1036 |
+
if ($selected_text=='no') {
|
1037 |
+
$selected_value_yes ='';
|
1038 |
+
$selected_value_no ='selected';
|
1039 |
+
$selected_value ='';
|
1040 |
+
}
|
1041 |
+
else {
|
1042 |
+
$selected_value_yes = '';
|
1043 |
+
$selected_value_no ='';
|
1044 |
+
$selected_value ='selected';
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
$index = "'".$k.'_'.$l."'";
|
1048 |
+
$matrix .='<td style="text-align:center;"><select name="'.$label_id.'_select_yes_noform_id_temp'.$k.'_'.$l.'" id="'.$label_id.'_select_yes_noform_id_temp'.$k.'_'.$l.'" onChange="change_option_values('.$index.','.$label_id.','.$mat_rows.','.$mat_columns.')"><option value="" '.$selected_value.'></option><option value="yes" '.$selected_value_yes.' >Yes</option><option value="no" '.$selected_value_no.'>No</option></select></td>';
|
1049 |
+
$var_checkbox++;
|
1050 |
+
}
|
1051 |
+
}
|
1052 |
+
}
|
1053 |
+
}
|
1054 |
+
$matrix .= '</tr>';
|
1055 |
+
}
|
1056 |
+
$matrix .= '</table>';
|
1057 |
+
echo '<tr>
|
1058 |
+
<td class="key">
|
1059 |
<label for="title">
|
1060 |
+
'.$labels_name[$key].'
|
1061 |
</label>
|
|
|
|
|
|
|
|
|
|
|
1062 |
</td>
|
1063 |
+
<td>
|
1064 |
+
<input type="hidden" id="'.$label_id.'_matrixform_id_temp" name="'.$label_id.'_matrixform_id_temp" value="'.$new_filename.'">
|
1065 |
+
'.$matrix.'
|
1066 |
+
<input type="hidden" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.$element_value.'" size="80" />
|
1067 |
+
</td>
|
1068 |
+
</tr>';
|
1069 |
+
break;
|
1070 |
+
}
|
1071 |
+
default: {
|
1072 |
+
echo '<tr>
|
1073 |
+
<td class="key">
|
1074 |
+
<label for="title">' . $labels_name[$key] . '</label>
|
1075 |
+
</td>
|
1076 |
+
<td>
|
1077 |
+
<input type="text" name="submission_'.$label_id.'" id="submission_'.$label_id.'" value="'.str_replace("*@@url@@*", '', $element_value).'" size="80" />
|
1078 |
+
</td>
|
1079 |
+
</tr>';
|
1080 |
+
}
|
1081 |
+
break;
|
1082 |
}
|
1083 |
}
|
1084 |
}
|
|
|
1085 |
?>
|
1086 |
</table>
|
1087 |
<input type="hidden" name="option" value="com_formmaker"/>
|
1090 |
<input type="hidden" name="date" value="<?php echo $rows[0]->date?>"/>
|
1091 |
<input type="hidden" name="ip" value="<?php echo $rows[0]->ip?>"/>
|
1092 |
<input type="hidden" name="task" value="save_submit"/>
|
1093 |
+
<input type="hidden" value="<?php echo plugins_url("", __FILE__); ?>" id="form_plugins_url" />
|
1094 |
+
<script>
|
1095 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
1096 |
+
</script>
|
1097 |
</form>
|
1098 |
<?php
|
1099 |
}
|
Submissions.php
CHANGED
@@ -1,17 +1,19 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if (!current_user_can('manage_options')) {
|
4 |
die('Access Denied');
|
5 |
}
|
6 |
function show_submits() {
|
7 |
global $wpdb;
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
9 |
$sort["default_style"] = "manage-column column-autor sortable desc";
|
10 |
if (isset($_POST['page_number'])) {
|
11 |
if ($_POST['asc_or_desc']) {
|
12 |
-
|
13 |
-
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
14 |
-
}
|
15 |
if ($_POST['asc_or_desc'] == 1) {
|
16 |
$sort["custom_style"] = "manage-column column-title sorted asc";
|
17 |
$sort["1_or_2"] = "2";
|
@@ -23,84 +25,74 @@ function show_submits() {
|
|
23 |
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
24 |
}
|
25 |
}
|
26 |
-
else {
|
27 |
-
$sort["sortid_by"] = "";
|
28 |
-
}
|
29 |
if ($_POST['page_number']) {
|
30 |
-
$limit = ((int)$_POST['page_number'] - 1) * 20;
|
31 |
}
|
32 |
else {
|
33 |
$limit = 0;
|
34 |
}
|
35 |
}
|
36 |
else {
|
37 |
-
$sort["sortid_by"] = "";
|
38 |
$limit = 0;
|
39 |
}
|
40 |
-
|
41 |
-
$query = "SELECT id, title FROM " . $wpdb->prefix . "formmaker
|
42 |
$forms = $wpdb->get_results($query);
|
43 |
-
//$task = JRequest::getCmd('task');
|
44 |
if (isset($_POST['form_id'])) {
|
45 |
-
$form_id = (int)$_POST['form_id'];
|
46 |
-
if ($form_id) {
|
47 |
-
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker WHERE id=" . $form_id;
|
48 |
-
$exists = $wpdb->get_var($query);
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
$exists = "";
|
52 |
-
}
|
53 |
}
|
54 |
else {
|
55 |
-
$
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
-
if (!$exists)
|
58 |
$form_id = 0;
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
62 |
$filter_order = 'id';
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
}
|
67 |
-
else {
|
68 |
-
$filter_order_Dir = " DESC";
|
69 |
-
}
|
70 |
}
|
71 |
else {
|
72 |
-
$filter_order_Dir = "";
|
73 |
}
|
74 |
if (isset($_POST['search_submits'])) {
|
75 |
$search_submits = esc_html($_POST['search_submits']);
|
76 |
-
$search_submits = strtolower($search_submits);
|
77 |
}
|
78 |
else {
|
79 |
-
$search_submits =
|
80 |
}
|
|
|
81 |
if (isset($_POST['ip_search'])) {
|
82 |
$ip_search = esc_html($_POST['ip_search']);
|
83 |
-
$ip_search = strtolower($ip_search);
|
84 |
}
|
85 |
else {
|
86 |
-
$ip_search =
|
87 |
}
|
|
|
88 |
$where = array();
|
89 |
$where_choices = array();
|
90 |
if (isset($_POST['startdate'])) {
|
91 |
-
$lists['startdate'] =
|
92 |
}
|
93 |
else {
|
94 |
$lists['startdate'] = "";
|
95 |
}
|
96 |
if (isset($_POST['enddate'])) {
|
97 |
-
$lists['enddate'] =
|
98 |
}
|
99 |
else {
|
100 |
$lists['enddate'] = "";
|
101 |
}
|
102 |
if (isset($_POST['hide_label_list'])) {
|
103 |
-
$lists['hide_label_list'] =
|
104 |
}
|
105 |
else {
|
106 |
$lists['hide_label_list'] = "";
|
@@ -111,10 +103,12 @@ function show_submits() {
|
|
111 |
if ($ip_search) {
|
112 |
$where[] = 'ip LIKE "%' . $ip_search . '%"';
|
113 |
}
|
114 |
-
if ($lists['startdate'] != '')
|
115 |
$where[] = " `date`>='" . $lists['startdate'] . " 00:00:00' ";
|
116 |
-
|
|
|
117 |
$where[] = " `date`<='" . $lists['enddate'] . " 23:59:59' ";
|
|
|
118 |
/*if ($form_id=="")
|
119 |
if($forms)
|
120 |
$form_id=$forms[0]->id;*/
|
@@ -124,7 +118,7 @@ function show_submits() {
|
|
124 |
if ($filter_order == 'id' or $filter_order == 'title' or $filter_order == 'mail') {
|
125 |
$orderby = ' ORDER BY `date` desc';
|
126 |
}
|
127 |
-
|
128 |
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir . '';
|
129 |
}
|
130 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits" . $where;
|
@@ -141,6 +135,11 @@ function show_submits() {
|
|
141 |
array_push($labels, $row->element_label);
|
142 |
}
|
143 |
}
|
|
|
|
|
|
|
|
|
|
|
144 |
$sorted_labels_type = array();
|
145 |
$sorted_labels_id = array();
|
146 |
$sorted_labels = array();
|
@@ -164,26 +163,30 @@ function show_submits() {
|
|
164 |
array_push($label_order, $label_temp);
|
165 |
array_push($label_type, $label_order_each[1]);
|
166 |
}
|
167 |
-
foreach ($label_id as $key => $label)
|
168 |
if (in_array($label, $labels)) {
|
169 |
array_push($sorted_labels_type, $label_type[$key]);
|
170 |
array_push($sorted_labels, $label_order[$key]);
|
171 |
array_push($sorted_labels_id, $label);
|
172 |
array_push($label_titles, $label_order_original[$key]);
|
173 |
-
if (isset($_POST[$form_id . '_' . $label . '_search']))
|
174 |
-
$search_temp =
|
175 |
-
|
|
|
176 |
$search_temp = '';
|
|
|
177 |
$search_temp = strtolower($search_temp);
|
178 |
$lists[$form_id . '_' . $label . '_search'] = $search_temp;
|
179 |
if ($search_temp) {
|
180 |
-
$where_labels[] = '(group_id in (SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE element_label=' . $label . ' AND element_value LIKE "%' . $search_temp . '%"))';
|
181 |
}
|
182 |
}
|
|
|
183 |
}
|
184 |
$where_labels = (count($where_labels) ? ' ' . implode(' AND ', $where_labels) : '');
|
185 |
-
if ($where_labels)
|
186 |
$where = $where . ' AND ' . $where_labels;
|
|
|
187 |
$rows_ord = array();
|
188 |
if (strpos($filter_order, "_field")) {
|
189 |
$query = "insert into " . $wpdb->prefix . "formmaker_submits (form_id, element_label, element_value, group_id,`date`,ip) select $form_id,'" . str_replace("_field", "", $filter_order) . "', '', group_id,`date`,ip from " . $wpdb->prefix . "formmaker_submits where `form_id`=$form_id and group_id not in (select group_id from " . $wpdb->prefix . "formmaker_submits where `form_id`=$form_id and element_label='" . str_replace("_field", "", $filter_order) . "' group by group_id) group by group_id";
|
@@ -207,8 +210,9 @@ function show_submits() {
|
|
207 |
$where2 = array();
|
208 |
$where_choices = $where;
|
209 |
for ($i = $limit; $i < $limit + 20; $i++) {
|
210 |
-
if ($i < $total)
|
211 |
$where2 [] = "group_id='" . $group_ids[$i]->group_id . "'";
|
|
|
212 |
}
|
213 |
$where2 = (count($where2) ? ' AND ( ' . implode(' OR ', $where2) . ' )' : '');
|
214 |
$where = $where . $where2;
|
@@ -220,12 +224,13 @@ function show_submits() {
|
|
220 |
$total_views = $wpdb->get_var($query);
|
221 |
$lists['order_Dir'] = $filter_order_Dir;
|
222 |
$lists['order'] = $filter_order;
|
223 |
-
//
|
224 |
$lists['search_submits'] = $search_submits;
|
225 |
$lists['ip_search'] = $ip_search;
|
226 |
-
if (count($rows_ord) == 0)
|
227 |
$rows_ord = $rows;
|
228 |
-
|
|
|
229 |
html_show_submits($rows, $forms, $lists, $pageNav, $sorted_labels, $label_titles, $rows_ord, $filter_order_Dir, $form_id, $sorted_labels_id, $sorted_labels_type, $total_entries, $total_views, $where, $where_choices, $sort);
|
230 |
}
|
231 |
|
@@ -248,8 +253,8 @@ function remov_cheched_submission() {
|
|
248 |
global $wpdb;
|
249 |
$cid = $_POST['post'];
|
250 |
if (count($cid)) {
|
251 |
-
$cids =
|
252 |
-
// Create sql statement
|
253 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits' . ' WHERE group_id IN ( ' . $cids . ' )';
|
254 |
if ($wpdb->query($query)) {
|
255 |
?>
|
@@ -286,13 +291,13 @@ function editSubmit($id) {
|
|
286 |
array_push($label_order_original, $label_oder_each[0]);
|
287 |
array_push($label_type, $label_oder_each[1]);
|
288 |
}
|
289 |
-
//
|
290 |
html_editSubmit($rows, $label_id, $label_order_original, $label_type);
|
291 |
}
|
292 |
|
293 |
function save_submit($id) {
|
294 |
global $wpdb;
|
295 |
-
$id = (int)$_POST['id'];
|
296 |
$date = esc_html($_POST['date']);
|
297 |
$ip = esc_html($_POST['ip']);
|
298 |
$form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
|
@@ -310,7 +315,7 @@ function save_submit($id) {
|
|
310 |
array_push($label_type, $label_oder_each[1]);
|
311 |
}
|
312 |
foreach ($label_id as $key => $label_id_1) {
|
313 |
-
$element_value =
|
314 |
if (isset($_POST["submission_" . $label_id_1])) {
|
315 |
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
316 |
$result = $wpdb->get_var($query);
|
@@ -318,52 +323,7 @@ function save_submit($id) {
|
|
318 |
if ($element_value)
|
319 |
$element_value = $element_value . "*@@url@@*";
|
320 |
if ($result) {
|
321 |
-
//$query = "UPDATE ".$wpdb->prefix."formmaker_submits SET `element_value`='".$element_value."' WHERE group_id='".$id."' AND element_label='".$label_id_1."'";
|
322 |
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
323 |
-
'element_value' => stripslashes($element_value),
|
324 |
-
), array(
|
325 |
-
'group_id' => $id,
|
326 |
-
'element_label' => $label_id_1
|
327 |
-
), array(
|
328 |
-
'%s',
|
329 |
-
), array(
|
330 |
-
'%d',
|
331 |
-
'%s'
|
332 |
-
));
|
333 |
-
}
|
334 |
-
else {
|
335 |
-
$wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
336 |
-
'form_id' => $form_id,
|
337 |
-
'element_label' => $label_id_1,
|
338 |
-
'element_value' => stripslashes($element_value),
|
339 |
-
'group_id' => $id,
|
340 |
-
'date' => $date,
|
341 |
-
'ip' => $ip
|
342 |
-
), array(
|
343 |
-
'%d',
|
344 |
-
'%s',
|
345 |
-
'%s',
|
346 |
-
'%d',
|
347 |
-
'%s',
|
348 |
-
'%s'
|
349 |
-
));
|
350 |
-
}
|
351 |
-
}
|
352 |
-
else {
|
353 |
-
$element_value_ch = esc_html($_POST["submission_" . $label_id_1 . '_0']);
|
354 |
-
if (isset($_POST["submission_" . $label_id_1 . '_0'])) {
|
355 |
-
for ($z = 0; $z < 21; $z++) {
|
356 |
-
$element_value_ch = esc_html($_POST["submission_" . $label_id_1 . '_' . $z]);
|
357 |
-
if (isset($element_value_ch))
|
358 |
-
$element_value = $element_value . $element_value_ch . '***br***';
|
359 |
-
else
|
360 |
-
break;
|
361 |
-
}
|
362 |
-
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
363 |
-
$result = $wpdb->get_var($query);
|
364 |
-
if ($result) {
|
365 |
-
$query = "UPDATE " . $wpdb->prefix . "formmaker_submits SET `element_value`='" . $element_value . "' WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
366 |
-
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
367 |
'element_value' => stripslashes($element_value),
|
368 |
), array(
|
369 |
'group_id' => $id,
|
@@ -374,10 +334,9 @@ function save_submit($id) {
|
|
374 |
'%d',
|
375 |
'%s'
|
376 |
));
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
$wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
381 |
'form_id' => $form_id,
|
382 |
'element_label' => $label_id_1,
|
383 |
'element_value' => stripslashes($element_value),
|
@@ -392,6 +351,51 @@ function save_submit($id) {
|
|
392 |
'%s',
|
393 |
'%s'
|
394 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
}
|
396 |
}
|
397 |
}
|
1 |
<?php
|
|
|
2 |
if (!current_user_can('manage_options')) {
|
3 |
die('Access Denied');
|
4 |
}
|
5 |
function show_submits() {
|
6 |
global $wpdb;
|
7 |
+
$sort["sortid_by"] = '';
|
8 |
+
$sort["custom_style"] = '';
|
9 |
+
$sort["1_or_2"] = '';
|
10 |
+
$order = '';
|
11 |
+
// Page navigation.
|
12 |
+
$exists = 0;
|
13 |
$sort["default_style"] = "manage-column column-autor sortable desc";
|
14 |
if (isset($_POST['page_number'])) {
|
15 |
if ($_POST['asc_or_desc']) {
|
16 |
+
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
|
|
|
|
17 |
if ($_POST['asc_or_desc'] == 1) {
|
18 |
$sort["custom_style"] = "manage-column column-title sorted asc";
|
19 |
$sort["1_or_2"] = "2";
|
25 |
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
26 |
}
|
27 |
}
|
|
|
|
|
|
|
28 |
if ($_POST['page_number']) {
|
29 |
+
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
30 |
}
|
31 |
else {
|
32 |
$limit = 0;
|
33 |
}
|
34 |
}
|
35 |
else {
|
|
|
36 |
$limit = 0;
|
37 |
}
|
38 |
+
//End page navigation.
|
39 |
+
$query = "SELECT id, title FROM " . $wpdb->prefix . "formmaker order by title";
|
40 |
$forms = $wpdb->get_results($query);
|
|
|
41 |
if (isset($_POST['form_id'])) {
|
42 |
+
$form_id = (int) $_POST['form_id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
else {
|
45 |
+
$form_id = 0;
|
46 |
+
}
|
47 |
+
if ($form_id) {
|
48 |
+
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker where id=" . $form_id;
|
49 |
+
$exists = $wpdb->get_var($query);
|
50 |
}
|
51 |
+
if (!$exists) {
|
52 |
$form_id = 0;
|
53 |
+
}
|
54 |
+
if (isset($_POST['order_by']) && $_POST['order_by'] != "") {
|
55 |
+
$filter_order = esc_html($_POST['order_by']);
|
56 |
+
}
|
57 |
+
else {
|
58 |
$filter_order = 'id';
|
59 |
+
}
|
60 |
+
if (isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 1) {
|
61 |
+
$filter_order_Dir = " ASC";
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
else {
|
64 |
+
$filter_order_Dir = " DESC";
|
65 |
}
|
66 |
if (isset($_POST['search_submits'])) {
|
67 |
$search_submits = esc_html($_POST['search_submits']);
|
|
|
68 |
}
|
69 |
else {
|
70 |
+
$search_submits = '';
|
71 |
}
|
72 |
+
$search_submits = strtolower($search_submits);
|
73 |
if (isset($_POST['ip_search'])) {
|
74 |
$ip_search = esc_html($_POST['ip_search']);
|
|
|
75 |
}
|
76 |
else {
|
77 |
+
$ip_search = '';
|
78 |
}
|
79 |
+
$ip_search = strtolower($ip_search);
|
80 |
$where = array();
|
81 |
$where_choices = array();
|
82 |
if (isset($_POST['startdate'])) {
|
83 |
+
$lists['startdate'] = $_POST['startdate'];
|
84 |
}
|
85 |
else {
|
86 |
$lists['startdate'] = "";
|
87 |
}
|
88 |
if (isset($_POST['enddate'])) {
|
89 |
+
$lists['enddate'] = $_POST['enddate'];
|
90 |
}
|
91 |
else {
|
92 |
$lists['enddate'] = "";
|
93 |
}
|
94 |
if (isset($_POST['hide_label_list'])) {
|
95 |
+
$lists['hide_label_list'] = $_POST['hide_label_list'];
|
96 |
}
|
97 |
else {
|
98 |
$lists['hide_label_list'] = "";
|
103 |
if ($ip_search) {
|
104 |
$where[] = 'ip LIKE "%' . $ip_search . '%"';
|
105 |
}
|
106 |
+
if ($lists['startdate'] != '') {
|
107 |
$where[] = " `date`>='" . $lists['startdate'] . " 00:00:00' ";
|
108 |
+
}
|
109 |
+
if ($lists['enddate'] != '') {
|
110 |
$where[] = " `date`<='" . $lists['enddate'] . " 23:59:59' ";
|
111 |
+
}
|
112 |
/*if ($form_id=="")
|
113 |
if($forms)
|
114 |
$form_id=$forms[0]->id;*/
|
118 |
if ($filter_order == 'id' or $filter_order == 'title' or $filter_order == 'mail') {
|
119 |
$orderby = ' ORDER BY `date` desc';
|
120 |
}
|
121 |
+
elseif (!strpos($filter_order, "_field")) {
|
122 |
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir . '';
|
123 |
}
|
124 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits" . $where;
|
135 |
array_push($labels, $row->element_label);
|
136 |
}
|
137 |
}
|
138 |
+
// $query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id='".$form_id."' and element_label=0";
|
139 |
+
// $ispaypal = $wpdb->get_row($query);
|
140 |
+
// if (!$ispaypal) {
|
141 |
+
// return false;
|
142 |
+
// }
|
143 |
$sorted_labels_type = array();
|
144 |
$sorted_labels_id = array();
|
145 |
$sorted_labels = array();
|
163 |
array_push($label_order, $label_temp);
|
164 |
array_push($label_type, $label_order_each[1]);
|
165 |
}
|
166 |
+
foreach ($label_id as $key => $label) {
|
167 |
if (in_array($label, $labels)) {
|
168 |
array_push($sorted_labels_type, $label_type[$key]);
|
169 |
array_push($sorted_labels, $label_order[$key]);
|
170 |
array_push($sorted_labels_id, $label);
|
171 |
array_push($label_titles, $label_order_original[$key]);
|
172 |
+
if (isset($_POST[$form_id . '_' . $label . '_search'])) {
|
173 |
+
$search_temp = $_POST[$form_id . '_' . $label . '_search'];
|
174 |
+
}
|
175 |
+
else {
|
176 |
$search_temp = '';
|
177 |
+
}
|
178 |
$search_temp = strtolower($search_temp);
|
179 |
$lists[$form_id . '_' . $label . '_search'] = $search_temp;
|
180 |
if ($search_temp) {
|
181 |
+
$where_labels[] = '(group_id in (SELECT group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE element_label="' . $label . '" AND element_value LIKE "%' . $search_temp . '%"))';
|
182 |
}
|
183 |
}
|
184 |
+
}
|
185 |
}
|
186 |
$where_labels = (count($where_labels) ? ' ' . implode(' AND ', $where_labels) : '');
|
187 |
+
if ($where_labels) {
|
188 |
$where = $where . ' AND ' . $where_labels;
|
189 |
+
}
|
190 |
$rows_ord = array();
|
191 |
if (strpos($filter_order, "_field")) {
|
192 |
$query = "insert into " . $wpdb->prefix . "formmaker_submits (form_id, element_label, element_value, group_id,`date`,ip) select $form_id,'" . str_replace("_field", "", $filter_order) . "', '', group_id,`date`,ip from " . $wpdb->prefix . "formmaker_submits where `form_id`=$form_id and group_id not in (select group_id from " . $wpdb->prefix . "formmaker_submits where `form_id`=$form_id and element_label='" . str_replace("_field", "", $filter_order) . "' group by group_id) group by group_id";
|
210 |
$where2 = array();
|
211 |
$where_choices = $where;
|
212 |
for ($i = $limit; $i < $limit + 20; $i++) {
|
213 |
+
if ($i < $total) {
|
214 |
$where2 [] = "group_id='" . $group_ids[$i]->group_id . "'";
|
215 |
+
}
|
216 |
}
|
217 |
$where2 = (count($where2) ? ' AND ( ' . implode(' OR ', $where2) . ' )' : '');
|
218 |
$where = $where . $where2;
|
224 |
$total_views = $wpdb->get_var($query);
|
225 |
$lists['order_Dir'] = $filter_order_Dir;
|
226 |
$lists['order'] = $filter_order;
|
227 |
+
// Search filter.
|
228 |
$lists['search_submits'] = $search_submits;
|
229 |
$lists['ip_search'] = $ip_search;
|
230 |
+
if (count($rows_ord) == 0) {
|
231 |
$rows_ord = $rows;
|
232 |
+
}
|
233 |
+
// Display function.
|
234 |
html_show_submits($rows, $forms, $lists, $pageNav, $sorted_labels, $label_titles, $rows_ord, $filter_order_Dir, $form_id, $sorted_labels_id, $sorted_labels_type, $total_entries, $total_views, $where, $where_choices, $sort);
|
235 |
}
|
236 |
|
253 |
global $wpdb;
|
254 |
$cid = $_POST['post'];
|
255 |
if (count($cid)) {
|
256 |
+
$cids = implode(',', $cid);
|
257 |
+
// Create sql statement.
|
258 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits' . ' WHERE group_id IN ( ' . $cids . ' )';
|
259 |
if ($wpdb->query($query)) {
|
260 |
?>
|
291 |
array_push($label_order_original, $label_oder_each[0]);
|
292 |
array_push($label_type, $label_oder_each[1]);
|
293 |
}
|
294 |
+
// Display function.
|
295 |
html_editSubmit($rows, $label_id, $label_order_original, $label_type);
|
296 |
}
|
297 |
|
298 |
function save_submit($id) {
|
299 |
global $wpdb;
|
300 |
+
$id = (int) $_POST['id'];
|
301 |
$date = esc_html($_POST['date']);
|
302 |
$ip = esc_html($_POST['ip']);
|
303 |
$form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
|
315 |
array_push($label_type, $label_oder_each[1]);
|
316 |
}
|
317 |
foreach ($label_id as $key => $label_id_1) {
|
318 |
+
$element_value = $_POST["submission_" . $label_id_1];
|
319 |
if (isset($_POST["submission_" . $label_id_1])) {
|
320 |
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
321 |
$result = $wpdb->get_var($query);
|
323 |
if ($element_value)
|
324 |
$element_value = $element_value . "*@@url@@*";
|
325 |
if ($result) {
|
|
|
326 |
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
'element_value' => stripslashes($element_value),
|
328 |
), array(
|
329 |
'group_id' => $id,
|
334 |
'%d',
|
335 |
'%s'
|
336 |
));
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
$wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
|
|
340 |
'form_id' => $form_id,
|
341 |
'element_label' => $label_id_1,
|
342 |
'element_value' => stripslashes($element_value),
|
351 |
'%s',
|
352 |
'%s'
|
353 |
));
|
354 |
+
}
|
355 |
+
}
|
356 |
+
else {
|
357 |
+
$element_value_ch = $_POST["submission_" . $label_id_1 . '_0'];
|
358 |
+
if (isset($_POST["submission_" . $label_id_1 . '_0'])) {
|
359 |
+
for ($z = 0; $z < 21; $z++) {
|
360 |
+
$element_value_ch = $_POST["submission_" . $label_id_1 . '_' . $z];
|
361 |
+
if (isset($element_value_ch))
|
362 |
+
$element_value = $element_value . $element_value_ch . '***br***';
|
363 |
+
else
|
364 |
+
break;
|
365 |
+
}
|
366 |
+
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
367 |
+
$result = $wpdb->get_var($query);
|
368 |
+
if ($result) {
|
369 |
+
$query = "UPDATE " . $wpdb->prefix . "formmaker_submits SET `element_value`='" . stripslashes($element_value) . "' WHERE group_id='" . $id . "' AND element_label='" . $label_id_1 . "'";
|
370 |
+
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
371 |
+
'element_value' => stripslashes($element_value),
|
372 |
+
), array(
|
373 |
+
'group_id' => $id,
|
374 |
+
'element_label' => $label_id_1
|
375 |
+
), array(
|
376 |
+
'%s',
|
377 |
+
), array(
|
378 |
+
'%d',
|
379 |
+
'%s'
|
380 |
+
));
|
381 |
+
}
|
382 |
+
else {
|
383 |
+
$query = "INSERT INTO " . $wpdb->prefix . "formmaker_submits (form_id, element_label, element_value, group_id, date, ip) VALUES('" . $form_id . "', '" . $label_id_1 . "', '" . stripslashes($element_value) . "','" . $id . "', '" . $date . "', '" . $ip . "')";
|
384 |
+
$wpdb->insert($wpdb->prefix . "formmaker_submits", array(
|
385 |
+
'form_id' => $form_id,
|
386 |
+
'element_label' => $label_id_1,
|
387 |
+
'element_value' => stripslashes($element_value),
|
388 |
+
'group_id' => $id,
|
389 |
+
'date' => $date,
|
390 |
+
'ip' => $ip
|
391 |
+
), array(
|
392 |
+
'%d',
|
393 |
+
'%s',
|
394 |
+
'%s',
|
395 |
+
'%d',
|
396 |
+
'%s',
|
397 |
+
'%s'
|
398 |
+
));
|
399 |
}
|
400 |
}
|
401 |
}
|
Theme_functions.php
CHANGED
@@ -12,6 +12,12 @@ function add_theme() {
|
|
12 |
function show_theme() {
|
13 |
global $wpdb;
|
14 |
$order = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
$sort["default_style"] = "manage-column column-autor sortable desc";
|
16 |
if (isset($_POST['page_number'])) {
|
17 |
if ($_POST['asc_or_desc']) {
|
@@ -28,14 +34,13 @@ function show_theme() {
|
|
28 |
}
|
29 |
}
|
30 |
if ($_POST['page_number']) {
|
31 |
-
$limit = ((int)$_POST['page_number'] - 1) * 20;
|
32 |
}
|
33 |
else {
|
34 |
$limit = 0;
|
35 |
}
|
36 |
}
|
37 |
else {
|
38 |
-
$sort["sortid_by"] = "";
|
39 |
$limit = 0;
|
40 |
}
|
41 |
if (isset($_POST['search_events_by_title'])) {
|
@@ -46,16 +51,13 @@ function show_theme() {
|
|
46 |
}
|
47 |
if ($search_tag) {
|
48 |
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
|
|
49 |
}
|
50 |
else {
|
51 |
-
$where = "";
|
52 |
}
|
53 |
if ($order == "")
|
54 |
$order = "ORDER BY `title` ASC";
|
55 |
-
if (!$where)
|
56 |
-
$where = " WHERE `id` NOT IN (" . get_option('contact_form_themes', 0) . ")";
|
57 |
-
else
|
58 |
-
$where .= " AND `id` NOT IN (" . get_option('contact_form_themes', 0) . ")";
|
59 |
// get the total number of records
|
60 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_themes" . $where;
|
61 |
$total = $wpdb->get_var($query);
|
12 |
function show_theme() {
|
13 |
global $wpdb;
|
14 |
$order = "";
|
15 |
+
$where = '';
|
16 |
+
$sort["sortid_by"] = '';
|
17 |
+
$order = '';
|
18 |
+
$sort["custom_style"] = '';
|
19 |
+
$sort["1_or_2"] = '';
|
20 |
+
$search_tag = '';
|
21 |
$sort["default_style"] = "manage-column column-autor sortable desc";
|
22 |
if (isset($_POST['page_number'])) {
|
23 |
if ($_POST['asc_or_desc']) {
|
34 |
}
|
35 |
}
|
36 |
if ($_POST['page_number']) {
|
37 |
+
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
38 |
}
|
39 |
else {
|
40 |
$limit = 0;
|
41 |
}
|
42 |
}
|
43 |
else {
|
|
|
44 |
$limit = 0;
|
45 |
}
|
46 |
if (isset($_POST['search_events_by_title'])) {
|
51 |
}
|
52 |
if ($search_tag) {
|
53 |
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
54 |
+
$where .= " AND `id` NOT IN (" . get_option('contact_form_themes', 0) . ")";
|
55 |
}
|
56 |
else {
|
57 |
+
$where = " WHERE `id` NOT IN (" . get_option('contact_form_themes', 0) . ")";
|
58 |
}
|
59 |
if ($order == "")
|
60 |
$order = "ORDER BY `title` ASC";
|
|
|
|
|
|
|
|
|
61 |
// get the total number of records
|
62 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_themes" . $where;
|
63 |
$total = $wpdb->get_var($query);
|
Themes_function.html.php
CHANGED
@@ -124,8 +124,6 @@ function html_show_theme($rows, $pageNav, $sort) {
|
|
124 |
<form method="post" onkeypress="doNothing()" action="admin.php?page=Form_maker_Themes" id="admin_form"
|
125 |
name="admin_form">
|
126 |
<table cellspacing="10" width="100%">
|
127 |
-
|
128 |
-
|
129 |
<tr>
|
130 |
<td style="width:80px">
|
131 |
<?php echo "<h2>" . 'Themes' . "</h2>"; ?>
|
@@ -133,9 +131,7 @@ function html_show_theme($rows, $pageNav, $sort) {
|
|
133 |
<td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input
|
134 |
type="button" value="Add a Theme" name="custom_parametrs"
|
135 |
onclick="window.location.href='admin.php?page=Form_maker_Themes&task=add_theme'"/></p></td>
|
136 |
-
<td style="text-align:right;font-size:16px;padding:20px; padding-right:50px">
|
137 |
-
|
138 |
-
</td>
|
139 |
<td colspan="11">
|
140 |
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:90%">
|
141 |
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
@@ -149,6 +145,7 @@ function html_show_theme($rows, $pageNav, $sort) {
|
|
149 |
</tr>
|
150 |
</table>
|
151 |
<?php
|
|
|
152 |
if (isset($_POST['serch_or_not'])) {
|
153 |
if (esc_html($_POST['serch_or_not']) == "search") {
|
154 |
$serch_value = esc_html($_POST['search_events_by_title']);
|
@@ -157,9 +154,6 @@ function html_show_theme($rows, $pageNav, $sort) {
|
|
157 |
$serch_value = "";
|
158 |
}
|
159 |
}
|
160 |
-
else {
|
161 |
-
$serch_value = "";
|
162 |
-
}
|
163 |
$serch_fields = '<div class="alignleft actions" style="width:180px;">
|
164 |
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
165 |
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()">
|
@@ -250,26 +244,6 @@ function html_edit_theme($row, $id) {
|
|
250 |
}
|
251 |
|
252 |
</script>
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
<table width="90%">
|
274 |
<thead>
|
275 |
<tr>
|
124 |
<form method="post" onkeypress="doNothing()" action="admin.php?page=Form_maker_Themes" id="admin_form"
|
125 |
name="admin_form">
|
126 |
<table cellspacing="10" width="100%">
|
|
|
|
|
127 |
<tr>
|
128 |
<td style="width:80px">
|
129 |
<?php echo "<h2>" . 'Themes' . "</h2>"; ?>
|
131 |
<td style="width:90px; text-align:right;"><p class="submit" style="padding:0px; text-align:left"><input
|
132 |
type="button" value="Add a Theme" name="custom_parametrs"
|
133 |
onclick="window.location.href='admin.php?page=Form_maker_Themes&task=add_theme'"/></p></td>
|
134 |
+
<td style="text-align:right;font-size:16px;padding:20px; padding-right:50px"></td>
|
|
|
|
|
135 |
<td colspan="11">
|
136 |
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:90%">
|
137 |
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
145 |
</tr>
|
146 |
</table>
|
147 |
<?php
|
148 |
+
$serch_value = '';
|
149 |
if (isset($_POST['serch_or_not'])) {
|
150 |
if (esc_html($_POST['serch_or_not']) == "search") {
|
151 |
$serch_value = esc_html($_POST['search_events_by_title']);
|
154 |
$serch_value = "";
|
155 |
}
|
156 |
}
|
|
|
|
|
|
|
157 |
$serch_fields = '<div class="alignleft actions" style="width:180px;">
|
158 |
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
159 |
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()">
|
244 |
}
|
245 |
|
246 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
<table width="90%">
|
248 |
<thead>
|
249 |
<tr>
|
css/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
css/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
css/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
css/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
css/images/ui-icons_888888_256x240.png
ADDED
Binary file
|
css/jquery-ui-spinner.css
ADDED
@@ -0,0 +1,1176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.10.3 - 2013-05-03
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
|
4 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
5 |
+
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
|
6 |
+
|
7 |
+
/* Layout helpers
|
8 |
+
----------------------------------*/
|
9 |
+
.ui-helper-hidden {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
.ui-helper-hidden-accessible {
|
13 |
+
border: 0;
|
14 |
+
clip: rect(0 0 0 0);
|
15 |
+
height: 1px;
|
16 |
+
margin: -1px;
|
17 |
+
overflow: hidden;
|
18 |
+
padding: 0;
|
19 |
+
position: absolute;
|
20 |
+
width: 1px;
|
21 |
+
}
|
22 |
+
.ui-helper-reset {
|
23 |
+
margin: 0;
|
24 |
+
padding: 0;
|
25 |
+
border: 0;
|
26 |
+
outline: 0;
|
27 |
+
line-height: 1.3;
|
28 |
+
text-decoration: none;
|
29 |
+
font-size: 100%;
|
30 |
+
list-style: none;
|
31 |
+
}
|
32 |
+
.ui-helper-clearfix:before,
|
33 |
+
.ui-helper-clearfix:after {
|
34 |
+
content: "";
|
35 |
+
display: table;
|
36 |
+
border-collapse: collapse;
|
37 |
+
}
|
38 |
+
.ui-helper-clearfix:after {
|
39 |
+
clear: both;
|
40 |
+
}
|
41 |
+
.ui-helper-clearfix {
|
42 |
+
min-height: 0; /* support: IE7 */
|
43 |
+
}
|
44 |
+
.ui-helper-zfix {
|
45 |
+
width: 100%;
|
46 |
+
height: 100%;
|
47 |
+
top: 0;
|
48 |
+
left: 0;
|
49 |
+
position: absolute;
|
50 |
+
opacity: 0;
|
51 |
+
filter:Alpha(Opacity=0);
|
52 |
+
}
|
53 |
+
|
54 |
+
.ui-front {
|
55 |
+
z-index: 100;
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
/* Interaction Cues
|
60 |
+
----------------------------------*/
|
61 |
+
.ui-state-disabled {
|
62 |
+
cursor: default !important;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
/* Icons
|
67 |
+
----------------------------------*/
|
68 |
+
|
69 |
+
/* states and images */
|
70 |
+
.ui-icon {
|
71 |
+
display: block;
|
72 |
+
text-indent: -99999px;
|
73 |
+
overflow: hidden;
|
74 |
+
background-repeat: no-repeat;
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
/* Misc visuals
|
79 |
+
----------------------------------*/
|
80 |
+
|
81 |
+
/* Overlays */
|
82 |
+
.ui-widget-overlay {
|
83 |
+
position: fixed;
|
84 |
+
top: 0;
|
85 |
+
left: 0;
|
86 |
+
width: 100%;
|
87 |
+
height: 100%;
|
88 |
+
}
|
89 |
+
.ui-accordion .ui-accordion-header {
|
90 |
+
display: block;
|
91 |
+
cursor: pointer;
|
92 |
+
position: relative;
|
93 |
+
margin-top: 2px;
|
94 |
+
padding: .5em .5em .5em .7em;
|
95 |
+
min-height: 0; /* support: IE7 */
|
96 |
+
}
|
97 |
+
.ui-accordion .ui-accordion-icons {
|
98 |
+
padding-left: 2.2em;
|
99 |
+
}
|
100 |
+
.ui-accordion .ui-accordion-noicons {
|
101 |
+
padding-left: .7em;
|
102 |
+
}
|
103 |
+
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
|
104 |
+
padding-left: 2.2em;
|
105 |
+
}
|
106 |
+
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
|
107 |
+
position: absolute;
|
108 |
+
left: .5em;
|
109 |
+
top: 50%;
|
110 |
+
margin-top: -8px;
|
111 |
+
}
|
112 |
+
.ui-accordion .ui-accordion-content {
|
113 |
+
padding: 1em 2.2em;
|
114 |
+
border-top: 0;
|
115 |
+
overflow: auto;
|
116 |
+
}
|
117 |
+
.ui-autocomplete {
|
118 |
+
position: absolute;
|
119 |
+
top: 0;
|
120 |
+
left: 0;
|
121 |
+
cursor: default;
|
122 |
+
}
|
123 |
+
.ui-button {
|
124 |
+
display: inline-block;
|
125 |
+
position: relative;
|
126 |
+
padding: 0;
|
127 |
+
line-height: normal;
|
128 |
+
margin-right: .1em;
|
129 |
+
cursor: pointer;
|
130 |
+
vertical-align: middle;
|
131 |
+
text-align: center;
|
132 |
+
overflow: visible; /* removes extra width in IE */
|
133 |
+
}
|
134 |
+
.ui-button,
|
135 |
+
.ui-button:link,
|
136 |
+
.ui-button:visited,
|
137 |
+
.ui-button:hover,
|
138 |
+
.ui-button:active {
|
139 |
+
text-decoration: none;
|
140 |
+
}
|
141 |
+
/* to make room for the icon, a width needs to be set here */
|
142 |
+
.ui-button-icon-only {
|
143 |
+
width: 2.2em;
|
144 |
+
}
|
145 |
+
/* button elements seem to need a little more width */
|
146 |
+
button.ui-button-icon-only {
|
147 |
+
width: 2.4em;
|
148 |
+
}
|
149 |
+
.ui-button-icons-only {
|
150 |
+
width: 3.4em;
|
151 |
+
}
|
152 |
+
button.ui-button-icons-only {
|
153 |
+
width: 3.7em;
|
154 |
+
}
|
155 |
+
|
156 |
+
/* button text element */
|
157 |
+
.ui-button .ui-button-text {
|
158 |
+
display: block;
|
159 |
+
line-height: normal;
|
160 |
+
}
|
161 |
+
.ui-button-text-only .ui-button-text {
|
162 |
+
padding: .4em 1em;
|
163 |
+
}
|
164 |
+
.ui-button-icon-only .ui-button-text,
|
165 |
+
.ui-button-icons-only .ui-button-text {
|
166 |
+
padding: .4em;
|
167 |
+
text-indent: -9999999px;
|
168 |
+
}
|
169 |
+
.ui-button-text-icon-primary .ui-button-text,
|
170 |
+
.ui-button-text-icons .ui-button-text {
|
171 |
+
padding: .4em 1em .4em 2.1em;
|
172 |
+
}
|
173 |
+
.ui-button-text-icon-secondary .ui-button-text,
|
174 |
+
.ui-button-text-icons .ui-button-text {
|
175 |
+
padding: .4em 2.1em .4em 1em;
|
176 |
+
}
|
177 |
+
.ui-button-text-icons .ui-button-text {
|
178 |
+
padding-left: 2.1em;
|
179 |
+
padding-right: 2.1em;
|
180 |
+
}
|
181 |
+
/* no icon support for input elements, provide padding by default */
|
182 |
+
input.ui-button {
|
183 |
+
padding: .4em 1em;
|
184 |
+
}
|
185 |
+
|
186 |
+
/* button icon element(s) */
|
187 |
+
.ui-button-icon-only .ui-icon,
|
188 |
+
.ui-button-text-icon-primary .ui-icon,
|
189 |
+
.ui-button-text-icon-secondary .ui-icon,
|
190 |
+
.ui-button-text-icons .ui-icon,
|
191 |
+
.ui-button-icons-only .ui-icon {
|
192 |
+
position: absolute;
|
193 |
+
top: 50%;
|
194 |
+
margin-top: -8px;
|
195 |
+
}
|
196 |
+
.ui-button-icon-only .ui-icon {
|
197 |
+
left: 50%;
|
198 |
+
margin-left: -8px;
|
199 |
+
}
|
200 |
+
.ui-button-text-icon-primary .ui-button-icon-primary,
|
201 |
+
.ui-button-text-icons .ui-button-icon-primary,
|
202 |
+
.ui-button-icons-only .ui-button-icon-primary {
|
203 |
+
left: .5em;
|
204 |
+
}
|
205 |
+
.ui-button-text-icon-secondary .ui-button-icon-secondary,
|
206 |
+
.ui-button-text-icons .ui-button-icon-secondary,
|
207 |
+
.ui-button-icons-only .ui-button-icon-secondary {
|
208 |
+
right: .5em;
|
209 |
+
}
|
210 |
+
|
211 |
+
/* button sets */
|
212 |
+
.ui-buttonset {
|
213 |
+
margin-right: 7px;
|
214 |
+
}
|
215 |
+
.ui-buttonset .ui-button {
|
216 |
+
margin-left: 0;
|
217 |
+
margin-right: -.3em;
|
218 |
+
}
|
219 |
+
|
220 |
+
/* workarounds */
|
221 |
+
/* reset extra padding in Firefox, see h5bp.com/l */
|
222 |
+
input.ui-button::-moz-focus-inner,
|
223 |
+
button.ui-button::-moz-focus-inner {
|
224 |
+
border: 0;
|
225 |
+
padding: 0;
|
226 |
+
}
|
227 |
+
.ui-datepicker {
|
228 |
+
width: 17em;
|
229 |
+
padding: .2em .2em 0;
|
230 |
+
display: none;
|
231 |
+
}
|
232 |
+
.ui-datepicker .ui-datepicker-header {
|
233 |
+
position: relative;
|
234 |
+
padding: .2em 0;
|
235 |
+
}
|
236 |
+
.ui-datepicker .ui-datepicker-prev,
|
237 |
+
.ui-datepicker .ui-datepicker-next {
|
238 |
+
position: absolute;
|
239 |
+
top: 2px;
|
240 |
+
width: 1.8em;
|
241 |
+
height: 1.8em;
|
242 |
+
}
|
243 |
+
.ui-datepicker .ui-datepicker-prev-hover,
|
244 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
245 |
+
top: 1px;
|
246 |
+
}
|
247 |
+
.ui-datepicker .ui-datepicker-prev {
|
248 |
+
left: 2px;
|
249 |
+
}
|
250 |
+
.ui-datepicker .ui-datepicker-next {
|
251 |
+
right: 2px;
|
252 |
+
}
|
253 |
+
.ui-datepicker .ui-datepicker-prev-hover {
|
254 |
+
left: 1px;
|
255 |
+
}
|
256 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
257 |
+
right: 1px;
|
258 |
+
}
|
259 |
+
.ui-datepicker .ui-datepicker-prev span,
|
260 |
+
.ui-datepicker .ui-datepicker-next span {
|
261 |
+
display: block;
|
262 |
+
position: absolute;
|
263 |
+
left: 50%;
|
264 |
+
margin-left: -8px;
|
265 |
+
top: 50%;
|
266 |
+
margin-top: -8px;
|
267 |
+
}
|
268 |
+
.ui-datepicker .ui-datepicker-title {
|
269 |
+
margin: 0 2.3em;
|
270 |
+
line-height: 1.8em;
|
271 |
+
text-align: center;
|
272 |
+
}
|
273 |
+
.ui-datepicker .ui-datepicker-title select {
|
274 |
+
font-size: 1em;
|
275 |
+
margin: 1px 0;
|
276 |
+
}
|
277 |
+
.ui-datepicker select.ui-datepicker-month-year {
|
278 |
+
width: 100%;
|
279 |
+
}
|
280 |
+
.ui-datepicker select.ui-datepicker-month,
|
281 |
+
.ui-datepicker select.ui-datepicker-year {
|
282 |
+
width: 49%;
|
283 |
+
}
|
284 |
+
.ui-datepicker table {
|
285 |
+
width: 100%;
|
286 |
+
font-size: .9em;
|
287 |
+
border-collapse: collapse;
|
288 |
+
margin: 0 0 .4em;
|
289 |
+
}
|
290 |
+
.ui-datepicker th {
|
291 |
+
padding: .7em .3em;
|
292 |
+
text-align: center;
|
293 |
+
font-weight: bold;
|
294 |
+
border: 0;
|
295 |
+
}
|
296 |
+
.ui-datepicker td {
|
297 |
+
border: 0;
|
298 |
+
padding: 1px;
|
299 |
+
}
|
300 |
+
.ui-datepicker td span,
|
301 |
+
.ui-datepicker td a {
|
302 |
+
display: block;
|
303 |
+
padding: .2em;
|
304 |
+
text-align: right;
|
305 |
+
text-decoration: none;
|
306 |
+
}
|
307 |
+
.ui-datepicker .ui-datepicker-buttonpane {
|
308 |
+
background-image: none;
|
309 |
+
margin: .7em 0 0 0;
|
310 |
+
padding: 0 .2em;
|
311 |
+
border-left: 0;
|
312 |
+
border-right: 0;
|
313 |
+
border-bottom: 0;
|
314 |
+
}
|
315 |
+
.ui-datepicker .ui-datepicker-buttonpane button {
|
316 |
+
float: right;
|
317 |
+
margin: .5em .2em .4em;
|
318 |
+
cursor: pointer;
|
319 |
+
padding: .2em .6em .3em .6em;
|
320 |
+
width: auto;
|
321 |
+
overflow: visible;
|
322 |
+
}
|
323 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
324 |
+
float: left;
|
325 |
+
}
|
326 |
+
|
327 |
+
/* with multiple calendars */
|
328 |
+
.ui-datepicker.ui-datepicker-multi {
|
329 |
+
width: auto;
|
330 |
+
}
|
331 |
+
.ui-datepicker-multi .ui-datepicker-group {
|
332 |
+
float: left;
|
333 |
+
}
|
334 |
+
.ui-datepicker-multi .ui-datepicker-group table {
|
335 |
+
width: 95%;
|
336 |
+
margin: 0 auto .4em;
|
337 |
+
}
|
338 |
+
.ui-datepicker-multi-2 .ui-datepicker-group {
|
339 |
+
width: 50%;
|
340 |
+
}
|
341 |
+
.ui-datepicker-multi-3 .ui-datepicker-group {
|
342 |
+
width: 33.3%;
|
343 |
+
}
|
344 |
+
.ui-datepicker-multi-4 .ui-datepicker-group {
|
345 |
+
width: 25%;
|
346 |
+
}
|
347 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
348 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
349 |
+
border-left-width: 0;
|
350 |
+
}
|
351 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
352 |
+
clear: left;
|
353 |
+
}
|
354 |
+
.ui-datepicker-row-break {
|
355 |
+
clear: both;
|
356 |
+
width: 100%;
|
357 |
+
font-size: 0;
|
358 |
+
}
|
359 |
+
|
360 |
+
/* RTL support */
|
361 |
+
.ui-datepicker-rtl {
|
362 |
+
direction: rtl;
|
363 |
+
}
|
364 |
+
.ui-datepicker-rtl .ui-datepicker-prev {
|
365 |
+
right: 2px;
|
366 |
+
left: auto;
|
367 |
+
}
|
368 |
+
.ui-datepicker-rtl .ui-datepicker-next {
|
369 |
+
left: 2px;
|
370 |
+
right: auto;
|
371 |
+
}
|
372 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
373 |
+
right: 1px;
|
374 |
+
left: auto;
|
375 |
+
}
|
376 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
377 |
+
left: 1px;
|
378 |
+
right: auto;
|
379 |
+
}
|
380 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
381 |
+
clear: right;
|
382 |
+
}
|
383 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
384 |
+
float: left;
|
385 |
+
}
|
386 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
387 |
+
.ui-datepicker-rtl .ui-datepicker-group {
|
388 |
+
float: right;
|
389 |
+
}
|
390 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
391 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
392 |
+
border-right-width: 0;
|
393 |
+
border-left-width: 1px;
|
394 |
+
}
|
395 |
+
.ui-dialog {
|
396 |
+
position: absolute;
|
397 |
+
top: 0;
|
398 |
+
left: 0;
|
399 |
+
padding: .2em;
|
400 |
+
outline: 0;
|
401 |
+
}
|
402 |
+
.ui-dialog .ui-dialog-titlebar {
|
403 |
+
padding: .4em 1em;
|
404 |
+
position: relative;
|
405 |
+
}
|
406 |
+
.ui-dialog .ui-dialog-title {
|
407 |
+
float: left;
|
408 |
+
margin: .1em 0;
|
409 |
+
white-space: nowrap;
|
410 |
+
width: 90%;
|
411 |
+
overflow: hidden;
|
412 |
+
text-overflow: ellipsis;
|
413 |
+
}
|
414 |
+
.ui-dialog .ui-dialog-titlebar-close {
|
415 |
+
position: absolute;
|
416 |
+
right: .3em;
|
417 |
+
top: 50%;
|
418 |
+
width: 21px;
|
419 |
+
margin: -10px 0 0 0;
|
420 |
+
padding: 1px;
|
421 |
+
height: 20px;
|
422 |
+
}
|
423 |
+
.ui-dialog .ui-dialog-content {
|
424 |
+
position: relative;
|
425 |
+
border: 0;
|
426 |
+
padding: .5em 1em;
|
427 |
+
background: none;
|
428 |
+
overflow: auto;
|
429 |
+
}
|
430 |
+
.ui-dialog .ui-dialog-buttonpane {
|
431 |
+
text-align: left;
|
432 |
+
border-width: 1px 0 0 0;
|
433 |
+
background-image: none;
|
434 |
+
margin-top: .5em;
|
435 |
+
padding: .3em 1em .5em .4em;
|
436 |
+
}
|
437 |
+
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
438 |
+
float: right;
|
439 |
+
}
|
440 |
+
.ui-dialog .ui-dialog-buttonpane button {
|
441 |
+
margin: .5em .4em .5em 0;
|
442 |
+
cursor: pointer;
|
443 |
+
}
|
444 |
+
.ui-dialog .ui-resizable-se {
|
445 |
+
width: 12px;
|
446 |
+
height: 12px;
|
447 |
+
right: -5px;
|
448 |
+
bottom: -5px;
|
449 |
+
background-position: 16px 16px;
|
450 |
+
}
|
451 |
+
.ui-draggable .ui-dialog-titlebar {
|
452 |
+
cursor: move;
|
453 |
+
}
|
454 |
+
.ui-menu {
|
455 |
+
list-style: none;
|
456 |
+
padding: 2px;
|
457 |
+
margin: 0;
|
458 |
+
display: block;
|
459 |
+
outline: none;
|
460 |
+
}
|
461 |
+
.ui-menu .ui-menu {
|
462 |
+
margin-top: -3px;
|
463 |
+
position: absolute;
|
464 |
+
}
|
465 |
+
.ui-menu .ui-menu-item {
|
466 |
+
margin: 0;
|
467 |
+
padding: 0;
|
468 |
+
width: 100%;
|
469 |
+
/* support: IE10, see #8844 */
|
470 |
+
list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
|
471 |
+
}
|
472 |
+
.ui-menu .ui-menu-divider {
|
473 |
+
margin: 5px -2px 5px -2px;
|
474 |
+
height: 0;
|
475 |
+
font-size: 0;
|
476 |
+
line-height: 0;
|
477 |
+
border-width: 1px 0 0 0;
|
478 |
+
}
|
479 |
+
.ui-menu .ui-menu-item a {
|
480 |
+
text-decoration: none;
|
481 |
+
display: block;
|
482 |
+
padding: 2px .4em;
|
483 |
+
line-height: 1.5;
|
484 |
+
min-height: 0; /* support: IE7 */
|
485 |
+
font-weight: normal;
|
486 |
+
}
|
487 |
+
.ui-menu .ui-menu-item a.ui-state-focus,
|
488 |
+
.ui-menu .ui-menu-item a.ui-state-active {
|
489 |
+
font-weight: normal;
|
490 |
+
margin: -1px;
|
491 |
+
}
|
492 |
+
|
493 |
+
.ui-menu .ui-state-disabled {
|
494 |
+
font-weight: normal;
|
495 |
+
margin: .4em 0 .2em;
|
496 |
+
line-height: 1.5;
|
497 |
+
}
|
498 |
+
.ui-menu .ui-state-disabled a {
|
499 |
+
cursor: default;
|
500 |
+
}
|
501 |
+
|
502 |
+
/* icon support */
|
503 |
+
.ui-menu-icons {
|
504 |
+
position: relative;
|
505 |
+
}
|
506 |
+
.ui-menu-icons .ui-menu-item a {
|
507 |
+
position: relative;
|
508 |
+
padding-left: 2em;
|
509 |
+
}
|
510 |
+
|
511 |
+
/* left-aligned */
|
512 |
+
.ui-menu .ui-icon {
|
513 |
+
position: absolute;
|
514 |
+
top: .2em;
|
515 |
+
left: .2em;
|
516 |
+
}
|
517 |
+
|
518 |
+
/* right-aligned */
|
519 |
+
.ui-menu .ui-menu-icon {
|
520 |
+
position: static;
|
521 |
+
float: right;
|
522 |
+
}
|
523 |
+
.ui-progressbar {
|
524 |
+
height: 2em;
|
525 |
+
text-align: left;
|
526 |
+
overflow: hidden;
|
527 |
+
}
|
528 |
+
.ui-progressbar .ui-progressbar-value {
|
529 |
+
margin: -1px;
|
530 |
+
height: 100%;
|
531 |
+
}
|
532 |
+
.ui-progressbar .ui-progressbar-overlay {
|
533 |
+
background: url("images/animated-overlay.gif");
|
534 |
+
height: 100%;
|
535 |
+
filter: alpha(opacity=25);
|
536 |
+
opacity: 0.25;
|
537 |
+
}
|
538 |
+
.ui-progressbar-indeterminate .ui-progressbar-value {
|
539 |
+
background-image: none;
|
540 |
+
}
|
541 |
+
.ui-resizable {
|
542 |
+
position: relative;
|
543 |
+
}
|
544 |
+
.ui-resizable-handle {
|
545 |
+
position: absolute;
|
546 |
+
font-size: 0.1px;
|
547 |
+
display: block;
|
548 |
+
}
|
549 |
+
.ui-resizable-disabled .ui-resizable-handle,
|
550 |
+
.ui-resizable-autohide .ui-resizable-handle {
|
551 |
+
display: none;
|
552 |
+
}
|
553 |
+
.ui-resizable-n {
|
554 |
+
cursor: n-resize;
|
555 |
+
height: 7px;
|
556 |
+
width: 100%;
|
557 |
+
top: -5px;
|
558 |
+
left: 0;
|
559 |
+
}
|
560 |
+
.ui-resizable-s {
|
561 |
+
cursor: s-resize;
|
562 |
+
height: 7px;
|
563 |
+
width: 100%;
|
564 |
+
bottom: -5px;
|
565 |
+
left: 0;
|
566 |
+
}
|
567 |
+
.ui-resizable-e {
|
568 |
+
cursor: e-resize;
|
569 |
+
width: 7px;
|
570 |
+
right: -5px;
|
571 |
+
top: 0;
|
572 |
+
height: 100%;
|
573 |
+
}
|
574 |
+
.ui-resizable-w {
|
575 |
+
cursor: w-resize;
|
576 |
+
width: 7px;
|
577 |
+
left: -5px;
|
578 |
+
top: 0;
|
579 |
+
height: 100%;
|
580 |
+
}
|
581 |
+
.ui-resizable-se {
|
582 |
+
cursor: se-resize;
|
583 |
+
width: 12px;
|
584 |
+
height: 12px;
|
585 |
+
right: 1px;
|
586 |
+
bottom: 1px;
|
587 |
+
}
|
588 |
+
.ui-resizable-sw {
|
589 |
+
cursor: sw-resize;
|
590 |
+
width: 9px;
|
591 |
+
height: 9px;
|
592 |
+
left: -5px;
|
593 |
+
bottom: -5px;
|
594 |
+
}
|
595 |
+
.ui-resizable-nw {
|
596 |
+
cursor: nw-resize;
|
597 |
+
width: 9px;
|
598 |
+
height: 9px;
|
599 |
+
left: -5px;
|
600 |
+
top: -5px;
|
601 |
+
}
|
602 |
+
.ui-resizable-ne {
|
603 |
+
cursor: ne-resize;
|
604 |
+
width: 9px;
|
605 |
+
height: 9px;
|
606 |
+
right: -5px;
|
607 |
+
top: -5px;
|
608 |
+
}
|
609 |
+
.ui-selectable-helper {
|
610 |
+
position: absolute;
|
611 |
+
z-index: 100;
|
612 |
+
border: 1px dotted black;
|
613 |
+
}
|
614 |
+
.ui-slider {
|
615 |
+
position: relative;
|
616 |
+
text-align: left;
|
617 |
+
}
|
618 |
+
.ui-slider .ui-slider-handle {
|
619 |
+
position: absolute;
|
620 |
+
z-index: 2;
|
621 |
+
width: 1.2em;
|
622 |
+
height: 1.2em;
|
623 |
+
cursor: default;
|
624 |
+
}
|
625 |
+
.ui-slider .ui-slider-range {
|
626 |
+
position: absolute;
|
627 |
+
z-index: 1;
|
628 |
+
font-size: .7em;
|
629 |
+
display: block;
|
630 |
+
border: 0;
|
631 |
+
background-position: 0 0;
|
632 |
+
}
|
633 |
+
|
634 |
+
/* For IE8 - See #6727 */
|
635 |
+
.ui-slider.ui-state-disabled .ui-slider-handle,
|
636 |
+
.ui-slider.ui-state-disabled .ui-slider-range {
|
637 |
+
filter: inherit;
|
638 |
+
}
|
639 |
+
|
640 |
+
.ui-slider-horizontal {
|
641 |
+
height: .8em;
|
642 |
+
}
|
643 |
+
.ui-slider-horizontal .ui-slider-handle {
|
644 |
+
top: -.3em;
|
645 |
+
margin-left: -.6em;
|
646 |
+
}
|
647 |
+
.ui-slider-horizontal .ui-slider-range {
|
648 |
+
top: 0;
|
649 |
+
height: 100%;
|
650 |
+
}
|
651 |
+
.ui-slider-horizontal .ui-slider-range-min {
|
652 |
+
left: 0;
|
653 |
+
}
|
654 |
+
.ui-slider-horizontal .ui-slider-range-max {
|
655 |
+
right: 0;
|
656 |
+
}
|
657 |
+
|
658 |
+
.ui-slider-vertical {
|
659 |
+
width: .8em;
|
660 |
+
height: 100px;
|
661 |
+
}
|
662 |
+
.ui-slider-vertical .ui-slider-handle {
|
663 |
+
left: -.3em;
|
664 |
+
margin-left: 0;
|
665 |
+
margin-bottom: -.6em;
|
666 |
+
}
|
667 |
+
.ui-slider-vertical .ui-slider-range {
|
668 |
+
left: 0;
|
669 |
+
width: 100%;
|
670 |
+
}
|
671 |
+
.ui-slider-vertical .ui-slider-range-min {
|
672 |
+
bottom: 0;
|
673 |
+
}
|
674 |
+
.ui-slider-vertical .ui-slider-range-max {
|
675 |
+
top: 0;
|
676 |
+
}
|
677 |
+
.ui-spinner {
|
678 |
+
position: relative;
|
679 |
+
display: inline-block;
|
680 |
+
overflow: hidden;
|
681 |
+
padding: 0;
|
682 |
+
vertical-align: middle;
|
683 |
+
}
|
684 |
+
.ui-spinner-input {
|
685 |
+
border: none;
|
686 |
+
background: none;
|
687 |
+
color: inherit;
|
688 |
+
padding: .2em 0 !important;
|
689 |
+
vertical-align: middle;
|
690 |
+
padding-left: .4em !important;
|
691 |
+
padding-right: 22px !important;
|
692 |
+
}
|
693 |
+
.ui-spinner-button {
|
694 |
+
width: 16px;
|
695 |
+
height: 50%;
|
696 |
+
font-size: .5em;
|
697 |
+
padding: 0;
|
698 |
+
margin: 0;
|
699 |
+
text-align: center;
|
700 |
+
position: absolute;
|
701 |
+
cursor: default;
|
702 |
+
display: block;
|
703 |
+
overflow: hidden;
|
704 |
+
right: 0;
|
705 |
+
}
|
706 |
+
/* more specificity required here to overide default borders */
|
707 |
+
.ui-spinner a.ui-spinner-button {
|
708 |
+
border-top: none;
|
709 |
+
border-bottom: none;
|
710 |
+
border-right: none;
|
711 |
+
}
|
712 |
+
/* vertical centre icon */
|
713 |
+
.ui-spinner .ui-icon {
|
714 |
+
position: absolute;
|
715 |
+
margin-top: -8px;
|
716 |
+
top: 50%;
|
717 |
+
left: 0;
|
718 |
+
}
|
719 |
+
.ui-spinner-up {
|
720 |
+
top: 0;
|
721 |
+
}
|
722 |
+
.ui-spinner-down {
|
723 |
+
bottom: 0;
|
724 |
+
}
|
725 |
+
|
726 |
+
/* TR overrides */
|
727 |
+
.ui-spinner .ui-icon-triangle-1-s {
|
728 |
+
/* need to fix icons sprite */
|
729 |
+
background-position: -65px -16px;
|
730 |
+
}
|
731 |
+
.ui-tabs {
|
732 |
+
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
733 |
+
padding: .2em;
|
734 |
+
}
|
735 |
+
.ui-tabs .ui-tabs-nav {
|
736 |
+
margin: 0;
|
737 |
+
padding: .2em .2em 0;
|
738 |
+
}
|
739 |
+
.ui-tabs .ui-tabs-nav li {
|
740 |
+
list-style: none;
|
741 |
+
float: left;
|
742 |
+
position: relative;
|
743 |
+
top: 0;
|
744 |
+
margin: 1px .2em 0 0;
|
745 |
+
border-bottom-width: 0;
|
746 |
+
padding: 0;
|
747 |
+
white-space: nowrap;
|
748 |
+
}
|
749 |
+
.ui-tabs .ui-tabs-nav li a {
|
750 |
+
float: left;
|
751 |
+
padding: .5em 1em;
|
752 |
+
text-decoration: none;
|
753 |
+
}
|
754 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
755 |
+
margin-bottom: -1px;
|
756 |
+
padding-bottom: 1px;
|
757 |
+
}
|
758 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
|
759 |
+
.ui-tabs .ui-tabs-nav li.ui-state-disabled a,
|
760 |
+
.ui-tabs .ui-tabs-nav li.ui-tabs-loading a {
|
761 |
+
cursor: text;
|
762 |
+
}
|
763 |
+
.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
764 |
+
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {
|
765 |
+
cursor: pointer;
|
766 |
+
}
|
767 |
+
.ui-tabs .ui-tabs-panel {
|
768 |
+
display: block;
|
769 |
+
border-width: 0;
|
770 |
+
padding: 1em 1.4em;
|
771 |
+
background: none;
|
772 |
+
}
|
773 |
+
.ui-tooltip {
|
774 |
+
padding: 8px;
|
775 |
+
position: absolute;
|
776 |
+
z-index: 9999;
|
777 |
+
max-width: 300px;
|
778 |
+
-webkit-box-shadow: 0 0 5px #aaa;
|
779 |
+
box-shadow: 0 0 5px #aaa;
|
780 |
+
}
|
781 |
+
body .ui-tooltip {
|
782 |
+
border-width: 2px;
|
783 |
+
}
|
784 |
+
|
785 |
+
/* Component containers
|
786 |
+
----------------------------------*/
|
787 |
+
.ui-widget {
|
788 |
+
font-family: Verdana,Arial,sans-serif;
|
789 |
+
font-size: 1.1em;
|
790 |
+
}
|
791 |
+
.ui-widget .ui-widget {
|
792 |
+
font-size: 1em;
|
793 |
+
}
|
794 |
+
.ui-widget input,
|
795 |
+
.ui-widget select,
|
796 |
+
.ui-widget textarea,
|
797 |
+
.ui-widget button {
|
798 |
+
font-family: Verdana,Arial,sans-serif;
|
799 |
+
font-size: 1em;
|
800 |
+
}
|
801 |
+
.ui-widget-content {
|
802 |
+
border: 1px solid #aaaaaa;
|
803 |
+
background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
|
804 |
+
color: #222222;
|
805 |
+
}
|
806 |
+
.ui-widget-content a {
|
807 |
+
color: #222222;
|
808 |
+
}
|
809 |
+
.ui-widget-header {
|
810 |
+
border: 1px solid #aaaaaa;
|
811 |
+
background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
|
812 |
+
color: #222222;
|
813 |
+
font-weight: bold;
|
814 |
+
}
|
815 |
+
.ui-widget-header a {
|
816 |
+
color: #222222;
|
817 |
+
}
|
818 |
+
|
819 |
+
/* Interaction states
|
820 |
+
----------------------------------*/
|
821 |
+
.ui-state-default,
|
822 |
+
.ui-widget-content .ui-state-default,
|
823 |
+
.ui-widget-header .ui-state-default {
|
824 |
+
border: 1px solid #d3d3d3;
|
825 |
+
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
|
826 |
+
font-weight: normal;
|
827 |
+
color: #555555;
|
828 |
+
}
|
829 |
+
.ui-state-default a,
|
830 |
+
.ui-state-default a:link,
|
831 |
+
.ui-state-default a:visited {
|
832 |
+
color: #555555;
|
833 |
+
text-decoration: none;
|
834 |
+
}
|
835 |
+
.ui-state-hover,
|
836 |
+
.ui-widget-content .ui-state-hover,
|
837 |
+
.ui-widget-header .ui-state-hover,
|
838 |
+
.ui-state-focus,
|
839 |
+
.ui-widget-content .ui-state-focus,
|
840 |
+
.ui-widget-header .ui-state-focus {
|
841 |
+
border: 1px solid #999999;
|
842 |
+
background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
|
843 |
+
font-weight: normal;
|
844 |
+
color: #212121;
|
845 |
+
}
|
846 |
+
.ui-state-hover a,
|
847 |
+
.ui-state-hover a:hover,
|
848 |
+
.ui-state-hover a:link,
|
849 |
+
.ui-state-hover a:visited {
|
850 |
+
color: #212121;
|
851 |
+
text-decoration: none;
|
852 |
+
}
|
853 |
+
.ui-state-active,
|
854 |
+
.ui-widget-content .ui-state-active,
|
855 |
+
.ui-widget-header .ui-state-active {
|
856 |
+
border: 1px solid #aaaaaa;
|
857 |
+
background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
|
858 |
+
font-weight: normal;
|
859 |
+
color: #212121;
|
860 |
+
}
|
861 |
+
.ui-state-active a,
|
862 |
+
.ui-state-active a:link,
|
863 |
+
.ui-state-active a:visited {
|
864 |
+
color: #212121;
|
865 |
+
text-decoration: none;
|
866 |
+
}
|
867 |
+
|
868 |
+
/* Interaction Cues
|
869 |
+
----------------------------------*/
|
870 |
+
.ui-state-highlight,
|
871 |
+
.ui-widget-content .ui-state-highlight,
|
872 |
+
.ui-widget-header .ui-state-highlight {
|
873 |
+
border: 1px solid #fcefa1;
|
874 |
+
background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
|
875 |
+
color: #363636;
|
876 |
+
}
|
877 |
+
.ui-state-highlight a,
|
878 |
+
.ui-widget-content .ui-state-highlight a,
|
879 |
+
.ui-widget-header .ui-state-highlight a {
|
880 |
+
color: #363636;
|
881 |
+
}
|
882 |
+
.ui-state-error,
|
883 |
+
.ui-widget-content .ui-state-error,
|
884 |
+
.ui-widget-header .ui-state-error {
|
885 |
+
border: 1px solid #cd0a0a;
|
886 |
+
background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
|
887 |
+
color: #cd0a0a;
|
888 |
+
}
|
889 |
+
.ui-state-error a,
|
890 |
+
.ui-widget-content .ui-state-error a,
|
891 |
+
.ui-widget-header .ui-state-error a {
|
892 |
+
color: #cd0a0a;
|
893 |
+
}
|
894 |
+
.ui-state-error-text,
|
895 |
+
.ui-widget-content .ui-state-error-text,
|
896 |
+
.ui-widget-header .ui-state-error-text {
|
897 |
+
color: #cd0a0a;
|
898 |
+
}
|
899 |
+
.ui-priority-primary,
|
900 |
+
.ui-widget-content .ui-priority-primary,
|
901 |
+
.ui-widget-header .ui-priority-primary {
|
902 |
+
font-weight: bold;
|
903 |
+
}
|
904 |
+
.ui-priority-secondary,
|
905 |
+
.ui-widget-content .ui-priority-secondary,
|
906 |
+
.ui-widget-header .ui-priority-secondary {
|
907 |
+
opacity: .7;
|
908 |
+
filter:Alpha(Opacity=70);
|
909 |
+
font-weight: normal;
|
910 |
+
}
|
911 |
+
.ui-state-disabled,
|
912 |
+
.ui-widget-content .ui-state-disabled,
|
913 |
+
.ui-widget-header .ui-state-disabled {
|
914 |
+
opacity: .35;
|
915 |
+
filter:Alpha(Opacity=35);
|
916 |
+
background-image: none;
|
917 |
+
}
|
918 |
+
.ui-state-disabled .ui-icon {
|
919 |
+
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
|
920 |
+
}
|
921 |
+
|
922 |
+
/* Icons
|
923 |
+
----------------------------------*/
|
924 |
+
|
925 |
+
/* states and images */
|
926 |
+
.ui-icon {
|
927 |
+
width: 16px;
|
928 |
+
height: 16px;
|
929 |
+
}
|
930 |
+
.ui-icon,
|
931 |
+
.ui-widget-content .ui-icon {
|
932 |
+
background-image: url(images/ui-icons_222222_256x240.png);
|
933 |
+
}
|
934 |
+
.ui-widget-header .ui-icon {
|
935 |
+
background-image: url(images/ui-icons_222222_256x240.png);
|
936 |
+
}
|
937 |
+
.ui-state-default .ui-icon {
|
938 |
+
background-image: url(images/ui-icons_888888_256x240.png) !important;
|
939 |
+
}
|
940 |
+
.ui-state-hover .ui-icon,
|
941 |
+
.ui-state-focus .ui-icon {
|
942 |
+
background-image: url(images/ui-icons_454545_256x240.png);
|
943 |
+
}
|
944 |
+
.ui-state-active .ui-icon {
|
945 |
+
background-image: url(images/ui-icons_454545_256x240.png);
|
946 |
+
}
|
947 |
+
.ui-state-highlight .ui-icon {
|
948 |
+
background-image: url(images/ui-icons_2e83ff_256x240.png);
|
949 |
+
}
|
950 |
+
.ui-state-error .ui-icon,
|
951 |
+
.ui-state-error-text .ui-icon {
|
952 |
+
background-image: url(images/ui-icons_cd0a0a_256x240.png);
|
953 |
+
}
|
954 |
+
|
955 |
+
/* positioning */
|
956 |
+
.ui-icon-blank { background-position: 16px 16px; }
|
957 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
958 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
959 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
960 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
961 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
962 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
963 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
964 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
965 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
966 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
967 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
968 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
969 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
970 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
971 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
972 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
973 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
974 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
975 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
976 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
977 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
978 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
979 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
980 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
981 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
982 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
983 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
984 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
985 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
986 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
987 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
988 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
989 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
990 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
991 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
992 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
993 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
994 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
995 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
996 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
997 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
998 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
999 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
1000 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
1001 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
1002 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
1003 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
1004 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
1005 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
1006 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
1007 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
1008 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
1009 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
1010 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
1011 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
1012 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
1013 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
1014 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
1015 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
1016 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
1017 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
1018 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
1019 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
1020 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
1021 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
1022 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
1023 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
1024 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
1025 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
1026 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
1027 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
1028 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
1029 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
1030 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
1031 |
+
.ui-icon-document { background-position: -32px -96px; }
|
1032 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
1033 |
+
.ui-icon-note { background-position: -64px -96px; }
|
1034 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
1035 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
1036 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
1037 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
1038 |
+
.ui-icon-person { background-position: -144px -96px; }
|
1039 |
+
.ui-icon-print { background-position: -160px -96px; }
|
1040 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
1041 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
1042 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
1043 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
1044 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
1045 |
+
.ui-icon-home { background-position: 0 -112px; }
|
1046 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
1047 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
1048 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
1049 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
1050 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
1051 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
1052 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
1053 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
1054 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
1055 |
+
.ui-icon-search { background-position: -160px -112px; }
|
1056 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
1057 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
1058 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
1059 |
+
.ui-icon-star { background-position: -224px -112px; }
|
1060 |
+
.ui-icon-link { background-position: -240px -112px; }
|
1061 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
1062 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
1063 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
1064 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
1065 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
1066 |
+
.ui-icon-close { background-position: -80px -128px; }
|
1067 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
1068 |
+
.ui-icon-key { background-position: -112px -128px; }
|
1069 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
1070 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
1071 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
1072 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
1073 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
1074 |
+
.ui-icon-image { background-position: -208px -128px; }
|
1075 |
+
.ui-icon-video { background-position: -224px -128px; }
|
1076 |
+
.ui-icon-script { background-position: -240px -128px; }
|
1077 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
1078 |
+
.ui-icon-info { background-position: -16px -144px; }
|
1079 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
1080 |
+
.ui-icon-help { background-position: -48px -144px; }
|
1081 |
+
.ui-icon-check { background-position: -64px -144px; }
|
1082 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
1083 |
+
.ui-icon-radio-on { background-position: -96px -144px; }
|
1084 |
+
.ui-icon-radio-off { background-position: -112px -144px; }
|
1085 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
1086 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
1087 |
+
.ui-icon-play { background-position: 0 -160px; }
|
1088 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
1089 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
1090 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
1091 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
1092 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
1093 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
1094 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
1095 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
1096 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
1097 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
1098 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
1099 |
+
.ui-icon-power { background-position: 0 -176px; }
|
1100 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
1101 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
1102 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
1103 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
1104 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
1105 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
1106 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
1107 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
1108 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
1109 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
1110 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
1111 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
1112 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
1113 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
1114 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
1115 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
1116 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
1117 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
1118 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
1119 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
1120 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
1121 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
1122 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
1123 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
1124 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
1125 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
1126 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
1127 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
1128 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
1129 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
1130 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
1131 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
1132 |
+
|
1133 |
+
|
1134 |
+
/* Misc visuals
|
1135 |
+
----------------------------------*/
|
1136 |
+
|
1137 |
+
/* Corner radius */
|
1138 |
+
.ui-corner-all,
|
1139 |
+
.ui-corner-top,
|
1140 |
+
.ui-corner-left,
|
1141 |
+
.ui-corner-tl {
|
1142 |
+
border-top-left-radius: 4px;
|
1143 |
+
}
|
1144 |
+
.ui-corner-all,
|
1145 |
+
.ui-corner-top,
|
1146 |
+
.ui-corner-right,
|
1147 |
+
.ui-corner-tr {
|
1148 |
+
border-top-right-radius: 4px;
|
1149 |
+
}
|
1150 |
+
.ui-corner-all,
|
1151 |
+
.ui-corner-bottom,
|
1152 |
+
.ui-corner-left,
|
1153 |
+
.ui-corner-bl {
|
1154 |
+
border-bottom-left-radius: 4px;
|
1155 |
+
}
|
1156 |
+
.ui-corner-all,
|
1157 |
+
.ui-corner-bottom,
|
1158 |
+
.ui-corner-right,
|
1159 |
+
.ui-corner-br {
|
1160 |
+
border-bottom-right-radius: 4px;
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
/* Overlays */
|
1164 |
+
.ui-widget-overlay {
|
1165 |
+
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
1166 |
+
opacity: .3;
|
1167 |
+
filter: Alpha(Opacity=30);
|
1168 |
+
}
|
1169 |
+
.ui-widget-shadow {
|
1170 |
+
margin: -8px 0 0 -8px;
|
1171 |
+
padding: 8px;
|
1172 |
+
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
|
1173 |
+
opacity: .3;
|
1174 |
+
filter: Alpha(Opacity=30);
|
1175 |
+
border-radius: 8px;
|
1176 |
+
}
|
css/style.css
CHANGED
@@ -1,54 +1,47 @@
|
|
1 |
-
.field_buttons
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
width:87px;
|
9 |
-
cursor:pointer;
|
10 |
}
|
11 |
-
|
12 |
-
{
|
13 |
-
vertical-align:top;
|
14 |
}
|
15 |
|
16 |
-
#edit_div>table>tr>td
|
17 |
-
|
18 |
-
|
19 |
-
padding-bottom:10px;
|
20 |
}
|
21 |
|
22 |
-
.field_buttons:hover
|
23 |
-
|
24 |
-
background-color:#0E83EB;
|
25 |
}
|
26 |
|
27 |
-
.element_toolbar
|
28 |
-
|
29 |
-
margin:0px;
|
30 |
-
padding:0px;
|
31 |
-
background-color:#F0F0F0
|
32 |
}
|
33 |
|
34 |
-
.element_toolbar img
|
35 |
-
|
36 |
-
margin:2px;
|
37 |
}
|
38 |
-
|
39 |
-
{
|
40 |
-
|
41 |
-
float:left;
|
42 |
-
|
43 |
}
|
44 |
|
45 |
-
.toolbar_padding
|
46 |
-
|
47 |
-
padding-right: 20px;
|
48 |
}
|
49 |
|
50 |
-
.page_toolbar
|
51 |
-
|
52 |
-
width:30px;
|
53 |
-
|
54 |
-
}
|
1 |
+
.field_buttons {
|
2 |
+
background-color: #00AAF1;
|
3 |
+
border-radius: 0px;
|
4 |
+
cursor: pointer;
|
5 |
+
height: 75px;
|
6 |
+
margin: 1px;
|
7 |
+
padding: 2px;
|
8 |
+
width: 87px;
|
|
|
9 |
}
|
10 |
+
|
11 |
+
#edit_div>table>tr {
|
12 |
+
vertical-align: top;
|
13 |
}
|
14 |
|
15 |
+
#edit_div>table>tr>td {
|
16 |
+
border-bottom: 1px dotted #D1C8C8;
|
17 |
+
padding-bottom: 10px;
|
|
|
18 |
}
|
19 |
|
20 |
+
.field_buttons:hover {
|
21 |
+
background-color: #0E83EB;
|
|
|
22 |
}
|
23 |
|
24 |
+
.element_toolbar {
|
25 |
+
background-color:#F0F0F0
|
26 |
+
margin: 0px;
|
27 |
+
padding: 0px;
|
|
|
28 |
}
|
29 |
|
30 |
+
.element_toolbar img {
|
31 |
+
margin: 2px;
|
|
|
32 |
}
|
33 |
+
|
34 |
+
.no_spacing {
|
35 |
+
border-spacing: 0px;
|
36 |
+
float: left;
|
37 |
+
padding-right: 10px !important;
|
38 |
}
|
39 |
|
40 |
+
.toolbar_padding {
|
41 |
+
padding-right: 20px;
|
|
|
42 |
}
|
43 |
|
44 |
+
.page_toolbar {
|
45 |
+
cursor:pointer;
|
46 |
+
width:30px;
|
47 |
+
}
|
|
form_ajax_functions.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* @package Form Maker
|
5 |
* @author Web-Dorado
|
6 |
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
7 |
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
**/
|
9 |
-
|
10 |
-
|
|
|
11 |
function form_maker_generete_csv() {
|
12 |
if (function_exists('current_user_can')) {
|
13 |
if (!current_user_can('manage_options')) {
|
@@ -20,7 +20,7 @@ function form_maker_generete_csv() {
|
|
20 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakergeneretecsv') {
|
21 |
global $wpdb;
|
22 |
$form_id = $_REQUEST['form_id'];
|
23 |
-
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d", $form_id);
|
24 |
$rows = $wpdb->get_results($query);
|
25 |
$n = count($rows);
|
26 |
$labels = array();
|
@@ -45,7 +45,6 @@ function form_maker_generete_csv() {
|
|
45 |
$label_order = array();
|
46 |
$label_order_original = array();
|
47 |
$label_type = array();
|
48 |
-
///stexic
|
49 |
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
50 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
51 |
foreach ($label_all as $key => $label_each) {
|
@@ -58,14 +57,14 @@ function form_maker_generete_csv() {
|
|
58 |
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
59 |
array_push($label_order, $label_temp);
|
60 |
array_push($label_type, $label_oder_each[1]);
|
61 |
-
//echo $label."<br>";
|
62 |
}
|
63 |
-
foreach ($label_id as $key => $label)
|
64 |
if (in_array($label, $labels)) {
|
65 |
array_push($sorted_labels, $label_order[$key]);
|
66 |
array_push($sorted_labels_id, $label);
|
67 |
array_push($label_titles, $label_order_original[$key]);
|
68 |
}
|
|
|
69 |
}
|
70 |
$m = count($sorted_labels);
|
71 |
$group_id_s = array();
|
@@ -97,7 +96,6 @@ function form_maker_generete_csv() {
|
|
97 |
$data_temp['Submit date'] = $date;
|
98 |
$data_temp['Ip'] = $ip;
|
99 |
$ttt = count($temp);
|
100 |
-
// var_dump($temp);
|
101 |
for ($h = 0; $h < $m; $h++) {
|
102 |
$data_temp[$label_titles[$h]] = '';
|
103 |
for ($g = 0; $g < $ttt; $g++) {
|
@@ -114,6 +112,88 @@ function form_maker_generete_csv() {
|
|
114 |
elseif (strpos($t->element_value, "***map***")) {
|
115 |
$data_temp[$label_titles[$h]] = 'Longitude:' . substr(str_replace("***map***", ', Latitude:', $t->element_value), 0, -2);
|
116 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
else {
|
118 |
$val = htmlspecialchars_decode($t->element_value);
|
119 |
$val = stripslashes(str_replace(''', "'", $val));
|
@@ -130,13 +210,11 @@ function form_maker_generete_csv() {
|
|
130 |
if (strstr($str, '"'))
|
131 |
$str = '"' . str_replace('"', '""', $str) . '"';
|
132 |
}
|
133 |
-
|
134 |
-
// file name for download
|
135 |
$filename = $title . "_" . date('Ymd') . ".csv";
|
136 |
header('Content-Encoding: Windows-1252');
|
137 |
header('Content-type: text/csv; charset=Windows-1252');
|
138 |
header("Content-Disposition: attachment; filename=\"$filename\"");
|
139 |
-
echo chr(239) . chr(187) . chr(191);
|
140 |
$flag = FALSE;
|
141 |
foreach ($data as $row) {
|
142 |
if (!$flag) {
|
@@ -156,8 +234,7 @@ function form_maker_generete_csv() {
|
|
156 |
}
|
157 |
}
|
158 |
|
159 |
-
|
160 |
-
///////////////////////////////////////////////////////////////////////////// generete XML
|
161 |
function form_maker_generete_xml() {
|
162 |
if (function_exists('current_user_can')) {
|
163 |
if (!current_user_can('manage_options')) {
|
@@ -170,7 +247,7 @@ function form_maker_generete_xml() {
|
|
170 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakergeneretexml') {
|
171 |
global $wpdb;
|
172 |
$form_id = $_REQUEST['form_id'];
|
173 |
-
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d", $form_id);
|
174 |
$rows = $wpdb->get_results($query);
|
175 |
$n = count($rows);
|
176 |
$labels = array();
|
@@ -195,7 +272,6 @@ function form_maker_generete_xml() {
|
|
195 |
$label_order = array();
|
196 |
$label_order_original = array();
|
197 |
$label_type = array();
|
198 |
-
///stexic
|
199 |
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
200 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
201 |
foreach ($label_all as $key => $label_each) {
|
@@ -209,23 +285,25 @@ function form_maker_generete_xml() {
|
|
209 |
array_push($label_order, $label_temp);
|
210 |
array_push($label_type, $label_oder_each[1]);
|
211 |
}
|
212 |
-
foreach ($label_id as $key => $label)
|
213 |
if (in_array($label, $labels)) {
|
214 |
array_push($sorted_labels, $label_order[$key]);
|
215 |
array_push($sorted_labels_id, $label);
|
216 |
array_push($label_titles, $label_order_original[$key]);
|
217 |
}
|
|
|
218 |
}
|
219 |
$m = count($sorted_labels);
|
220 |
$group_id_s = array();
|
221 |
$l = 0;
|
222 |
-
if (count($rows) > 0 and $m)
|
223 |
for ($i = 0; $i < count($rows); $i++) {
|
224 |
$row = &$rows[$i];
|
225 |
if (!in_array($row->group_id, $group_id_s)) {
|
226 |
array_push($group_id_s, $row->group_id);
|
227 |
}
|
228 |
}
|
|
|
229 |
$data = array();
|
230 |
$temp_all = array();
|
231 |
for ($j = 0; $j < $n; $j++) {
|
@@ -261,6 +339,88 @@ function form_maker_generete_xml() {
|
|
261 |
elseif (strpos($t->element_value, "***map***")) {
|
262 |
$data_temp[$label_titles[$h]] = 'Longitude:' . substr(str_replace("***map***", ', Latitude:', $t->element_value), 0, -2);
|
263 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
else {
|
265 |
$val = str_replace('&', "&", $t->element_value);
|
266 |
$val = stripslashes(str_replace(''', "'", $t->element_value));
|
@@ -283,7 +443,6 @@ function form_maker_generete_xml() {
|
|
283 |
header("Content-Type:text/xml, charset=utf-8");
|
284 |
$flag = FALSE;
|
285 |
echo '<?xml version="1.0" encoding="utf-8" ?>
|
286 |
-
|
287 |
<form title="' . $title . '">';
|
288 |
foreach ($data as $key1 => $value1) {
|
289 |
echo '<submission>';
|
@@ -299,31 +458,30 @@ function form_maker_generete_xml() {
|
|
299 |
}
|
300 |
}
|
301 |
|
302 |
-
|
303 |
-
///////////////////////////////////////////////////////////////////// wd_captcha
|
304 |
function form_maker_wd_captcha() {
|
305 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha') {
|
306 |
if (isset($_GET["i"])) {
|
307 |
-
$i = (int)$_GET["i"];
|
308 |
}
|
309 |
else {
|
310 |
$i = '';
|
311 |
}
|
312 |
if (isset($_GET['r2'])) {
|
313 |
-
$r2 = (int)$_GET['r2'];
|
314 |
}
|
315 |
else {
|
316 |
$r2 = 0;
|
317 |
}
|
318 |
if (isset($_GET['r'])) {
|
319 |
-
$rrr = (int)$_GET['r'];
|
320 |
}
|
321 |
else {
|
322 |
$rrr = 0;
|
323 |
}
|
324 |
$randNum = 0 + $r2 + $rrr;
|
325 |
if (isset($_GET["digit"])) {
|
326 |
-
$digit = (int)$_GET["digit"];
|
327 |
}
|
328 |
else {
|
329 |
$digit = 6;
|
@@ -376,15 +534,16 @@ function form_maker_wd_captcha() {
|
|
376 |
'z'
|
377 |
);
|
378 |
$main = array();
|
379 |
-
if ($_digital)
|
380 |
$main = array_merge($main, $dig);
|
381 |
-
|
|
|
382 |
$main = array_merge($main, $lat);
|
|
|
383 |
shuffle($main);
|
384 |
$pass = substr(implode('', $main), 0, $_length);
|
385 |
return $pass;
|
386 |
}
|
387 |
-
|
388 |
$l = rand($cap_length_min, $cap_length_max);
|
389 |
$code = code_generic($l, $cap_digital, $cap_latin_char);
|
390 |
@session_start();
|
@@ -414,8 +573,7 @@ function form_maker_wd_captcha() {
|
|
414 |
}
|
415 |
}
|
416 |
|
417 |
-
|
418 |
-
////////////////////////////////////////////////////////////////////// function post or page window php
|
419 |
function form_maker_window_php() {
|
420 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwindow') {
|
421 |
global $wpdb;
|
@@ -459,7 +617,7 @@ function form_maker_window_php() {
|
|
459 |
<td style="vertical-align:top">
|
460 |
<select name="Form_Makername" id="Form_Makername" style="width:250px; text-align:center">
|
461 |
<option style="text-align:center" value="- Select Form -" selected="selected">- Select a Form -</option>
|
462 |
-
<?php
|
463 |
foreach ($ids_Form_Maker as $arr_Form_Maker) {
|
464 |
?>
|
465 |
<option value="<?php echo $arr_Form_Maker->id; ?>"><?php echo $arr_Form_Maker->title; ?></option>
|
@@ -521,9 +679,23 @@ function form_maker_form_preview_product_option() {
|
|
521 |
function html_form_maker_form_preview_product_option($css, $form) {
|
522 |
$cmpnt_js_path = plugins_url('js', __FILE__);
|
523 |
$id = 'form_id_temp';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
524 |
?>
|
525 |
<script src="<?php echo $cmpnt_js_path . "/if_gmap_back_end.js"; ?>"></script>
|
526 |
<script src="<?php echo $cmpnt_js_path . "/main.js"; ?>"></script>
|
|
|
|
|
|
|
|
|
|
|
527 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
528 |
<style>
|
529 |
<?php
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* @package Form Maker
|
4 |
* @author Web-Dorado
|
5 |
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
6 |
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
7 |
**/
|
8 |
+
|
9 |
+
// Direct access must be allowed.
|
10 |
+
// Generete CSV.
|
11 |
function form_maker_generete_csv() {
|
12 |
if (function_exists('current_user_can')) {
|
13 |
if (!current_user_can('manage_options')) {
|
20 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakergeneretecsv') {
|
21 |
global $wpdb;
|
22 |
$form_id = $_REQUEST['form_id'];
|
23 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d ORDER BY date ASC", $form_id);
|
24 |
$rows = $wpdb->get_results($query);
|
25 |
$n = count($rows);
|
26 |
$labels = array();
|
45 |
$label_order = array();
|
46 |
$label_order_original = array();
|
47 |
$label_type = array();
|
|
|
48 |
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
49 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
50 |
foreach ($label_all as $key => $label_each) {
|
57 |
$label_temp = preg_replace($ptn, $rpltxt, $label_oder_each[0]);
|
58 |
array_push($label_order, $label_temp);
|
59 |
array_push($label_type, $label_oder_each[1]);
|
|
|
60 |
}
|
61 |
+
foreach ($label_id as $key => $label) {
|
62 |
if (in_array($label, $labels)) {
|
63 |
array_push($sorted_labels, $label_order[$key]);
|
64 |
array_push($sorted_labels_id, $label);
|
65 |
array_push($label_titles, $label_order_original[$key]);
|
66 |
}
|
67 |
+
}
|
68 |
}
|
69 |
$m = count($sorted_labels);
|
70 |
$group_id_s = array();
|
96 |
$data_temp['Submit date'] = $date;
|
97 |
$data_temp['Ip'] = $ip;
|
98 |
$ttt = count($temp);
|
|
|
99 |
for ($h = 0; $h < $m; $h++) {
|
100 |
$data_temp[$label_titles[$h]] = '';
|
101 |
for ($g = 0; $g < $ttt; $g++) {
|
112 |
elseif (strpos($t->element_value, "***map***")) {
|
113 |
$data_temp[$label_titles[$h]] = 'Longitude:' . substr(str_replace("***map***", ', Latitude:', $t->element_value), 0, -2);
|
114 |
}
|
115 |
+
elseif (strpos($t->element_value,"***star_rating***")) {
|
116 |
+
$element = str_replace("***star_rating***", '', $t->element_value);
|
117 |
+
$element = explode("***", $element);
|
118 |
+
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
119 |
+
}
|
120 |
+
elseif (strpos($t->element_value, "***grading***")) {
|
121 |
+
$element = str_replace("***grading***", '', $t->element_value);
|
122 |
+
$grading = explode(":", $element);
|
123 |
+
$items_count = sizeof($grading) - 1;
|
124 |
+
$items = "";
|
125 |
+
$total = "";
|
126 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
127 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
128 |
+
$total += $grading[$k];
|
129 |
+
}
|
130 |
+
$items .= "Total: " . $total;
|
131 |
+
$data_temp[$label_titles[$h]] = $items;
|
132 |
+
}
|
133 |
+
elseif (strpos($t->element_value, "***matrix***")) {
|
134 |
+
$element = str_replace("***matrix***", '', $t->element_value);
|
135 |
+
$matrix_value = explode('***', $element);
|
136 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
137 |
+
$mat_rows = $matrix_value[0];
|
138 |
+
$mat_columns = $matrix_value[$mat_rows + 1];
|
139 |
+
$matrix = "";
|
140 |
+
$aaa = Array();
|
141 |
+
$var_checkbox = 1;
|
142 |
+
$selected_value = "";
|
143 |
+
$selected_value_yes = "";
|
144 |
+
$selected_value_no = "";
|
145 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
146 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
147 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
148 |
+
$checked = "0";
|
149 |
+
$aaa[1] = "";
|
150 |
+
}
|
151 |
+
else {
|
152 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
153 |
+
}
|
154 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
155 |
+
if ($aaa[1] == $l) {
|
156 |
+
$checked = '1';
|
157 |
+
}
|
158 |
+
else {
|
159 |
+
$checked = '0';
|
160 |
+
}
|
161 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
162 |
+
}
|
163 |
+
}
|
164 |
+
else {
|
165 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
166 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
167 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1) {
|
168 |
+
$checked = '1';
|
169 |
+
}
|
170 |
+
else {
|
171 |
+
$checked = '0';
|
172 |
+
}
|
173 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
174 |
+
$var_checkbox++;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
else {
|
178 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
179 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
180 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
181 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
182 |
+
$var_checkbox++;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
else {
|
186 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
187 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
188 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
189 |
+
$var_checkbox++;
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}
|
194 |
+
}
|
195 |
+
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
196 |
+
}
|
197 |
else {
|
198 |
$val = htmlspecialchars_decode($t->element_value);
|
199 |
$val = stripslashes(str_replace(''', "'", $val));
|
210 |
if (strstr($str, '"'))
|
211 |
$str = '"' . str_replace('"', '""', $str) . '"';
|
212 |
}
|
213 |
+
// File name for download.
|
|
|
214 |
$filename = $title . "_" . date('Ymd') . ".csv";
|
215 |
header('Content-Encoding: Windows-1252');
|
216 |
header('Content-type: text/csv; charset=Windows-1252');
|
217 |
header("Content-Disposition: attachment; filename=\"$filename\"");
|
|
|
218 |
$flag = FALSE;
|
219 |
foreach ($data as $row) {
|
220 |
if (!$flag) {
|
234 |
}
|
235 |
}
|
236 |
|
237 |
+
// Generete XML.
|
|
|
238 |
function form_maker_generete_xml() {
|
239 |
if (function_exists('current_user_can')) {
|
240 |
if (!current_user_can('manage_options')) {
|
247 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakergeneretexml') {
|
248 |
global $wpdb;
|
249 |
$form_id = $_REQUEST['form_id'];
|
250 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d ORDER BY date ASC", $form_id);
|
251 |
$rows = $wpdb->get_results($query);
|
252 |
$n = count($rows);
|
253 |
$labels = array();
|
272 |
$label_order = array();
|
273 |
$label_order_original = array();
|
274 |
$label_type = array();
|
|
|
275 |
$label_all = explode('#****#', $rows_lable[0]->label_order);
|
276 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
277 |
foreach ($label_all as $key => $label_each) {
|
285 |
array_push($label_order, $label_temp);
|
286 |
array_push($label_type, $label_oder_each[1]);
|
287 |
}
|
288 |
+
foreach ($label_id as $key => $label) {
|
289 |
if (in_array($label, $labels)) {
|
290 |
array_push($sorted_labels, $label_order[$key]);
|
291 |
array_push($sorted_labels_id, $label);
|
292 |
array_push($label_titles, $label_order_original[$key]);
|
293 |
}
|
294 |
+
}
|
295 |
}
|
296 |
$m = count($sorted_labels);
|
297 |
$group_id_s = array();
|
298 |
$l = 0;
|
299 |
+
if (count($rows) > 0 and $m) {
|
300 |
for ($i = 0; $i < count($rows); $i++) {
|
301 |
$row = &$rows[$i];
|
302 |
if (!in_array($row->group_id, $group_id_s)) {
|
303 |
array_push($group_id_s, $row->group_id);
|
304 |
}
|
305 |
}
|
306 |
+
}
|
307 |
$data = array();
|
308 |
$temp_all = array();
|
309 |
for ($j = 0; $j < $n; $j++) {
|
339 |
elseif (strpos($t->element_value, "***map***")) {
|
340 |
$data_temp[$label_titles[$h]] = 'Longitude:' . substr(str_replace("***map***", ', Latitude:', $t->element_value), 0, -2);
|
341 |
}
|
342 |
+
elseif (strpos($t->element_value,"***star_rating***")) {
|
343 |
+
$element = str_replace("***star_rating***", '', $t->element_value);
|
344 |
+
$element = explode("***", $element);
|
345 |
+
$data_temp[stripslashes($label_titles[$h])] = ' ' . $element[1] . '/' . $element[0];
|
346 |
+
}
|
347 |
+
elseif (strpos($t->element_value, "***grading***")) {
|
348 |
+
$element = str_replace("***grading***", '', $t->element_value);
|
349 |
+
$grading = explode(":", $element);
|
350 |
+
$items_count = sizeof($grading) - 1;
|
351 |
+
$items = "";
|
352 |
+
$total = "";
|
353 |
+
for ($k = 0; $k < $items_count / 2; $k++) {
|
354 |
+
$items .= $grading[$items_count / 2 + $k] . ": " . $grading[$k] . ", ";
|
355 |
+
$total += $grading[$k];
|
356 |
+
}
|
357 |
+
$items .= "Total: " . $total;
|
358 |
+
$data_temp[$label_titles[$h]] = $items;
|
359 |
+
}
|
360 |
+
elseif (strpos($t->element_value, "***matrix***")) {
|
361 |
+
$element = str_replace("***matrix***", '', $t->element_value);
|
362 |
+
$matrix_value = explode('***', $element);
|
363 |
+
$matrix_value = array_slice($matrix_value, 0, count($matrix_value) - 1);
|
364 |
+
$mat_rows = $matrix_value[0];
|
365 |
+
$mat_columns = $matrix_value[$mat_rows + 1];
|
366 |
+
$matrix = "";
|
367 |
+
$aaa = Array();
|
368 |
+
$var_checkbox = 1;
|
369 |
+
$selected_value = "";
|
370 |
+
$selected_value_yes = "";
|
371 |
+
$selected_value_no = "";
|
372 |
+
for ($k = 1; $k <= $mat_rows; $k++) {
|
373 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2] == "radio") {
|
374 |
+
if ($matrix_value[$mat_rows + $mat_columns + 2 + $k] == 0) {
|
375 |
+
$checked = "0";
|
376 |
+
$aaa[1] = "";
|
377 |
+
}
|
378 |
+
else {
|
379 |
+
$aaa = explode("_", $matrix_value[$mat_rows + $mat_columns + 2 + $k]);
|
380 |
+
}
|
381 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
382 |
+
if ($aaa[1] == $l) {
|
383 |
+
$checked = '1';
|
384 |
+
}
|
385 |
+
else {
|
386 |
+
$checked = '0';
|
387 |
+
}
|
388 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
389 |
+
}
|
390 |
+
}
|
391 |
+
else {
|
392 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "checkbox") {
|
393 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
394 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox] == 1) {
|
395 |
+
$checked = '1';
|
396 |
+
}
|
397 |
+
else {
|
398 |
+
$checked = '0';
|
399 |
+
}
|
400 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$checked."; ";
|
401 |
+
$var_checkbox++;
|
402 |
+
}
|
403 |
+
}
|
404 |
+
else {
|
405 |
+
if ($matrix_value[$mat_rows+$mat_columns + 2] == "text") {
|
406 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
407 |
+
$text_value = $matrix_value[$mat_rows+$mat_columns+2+$var_checkbox];
|
408 |
+
$matrix .='['.$matrix_value[$k].','.$matrix_value[$mat_rows+1+$l].']='.$text_value."; ";
|
409 |
+
$var_checkbox++;
|
410 |
+
}
|
411 |
+
}
|
412 |
+
else {
|
413 |
+
for ($l = 1; $l <= $mat_columns; $l++) {
|
414 |
+
$selected_text = $matrix_value[$mat_rows+$mat_columns + 2 + $var_checkbox];
|
415 |
+
$matrix .= '['.$matrix_value[$k].','.$matrix_value[$mat_rows + 1 + $l].']='.$selected_text."; ";
|
416 |
+
$var_checkbox++;
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
}
|
421 |
+
}
|
422 |
+
$data_temp[stripslashes($label_titles[$h])] = $matrix;
|
423 |
+
}
|
424 |
else {
|
425 |
$val = str_replace('&', "&", $t->element_value);
|
426 |
$val = stripslashes(str_replace(''', "'", $t->element_value));
|
443 |
header("Content-Type:text/xml, charset=utf-8");
|
444 |
$flag = FALSE;
|
445 |
echo '<?xml version="1.0" encoding="utf-8" ?>
|
|
|
446 |
<form title="' . $title . '">';
|
447 |
foreach ($data as $key1 => $value1) {
|
448 |
echo '<submission>';
|
458 |
}
|
459 |
}
|
460 |
|
461 |
+
// Captcha.
|
|
|
462 |
function form_maker_wd_captcha() {
|
463 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha') {
|
464 |
if (isset($_GET["i"])) {
|
465 |
+
$i = (int) $_GET["i"];
|
466 |
}
|
467 |
else {
|
468 |
$i = '';
|
469 |
}
|
470 |
if (isset($_GET['r2'])) {
|
471 |
+
$r2 = (int) $_GET['r2'];
|
472 |
}
|
473 |
else {
|
474 |
$r2 = 0;
|
475 |
}
|
476 |
if (isset($_GET['r'])) {
|
477 |
+
$rrr = (int) $_GET['r'];
|
478 |
}
|
479 |
else {
|
480 |
$rrr = 0;
|
481 |
}
|
482 |
$randNum = 0 + $r2 + $rrr;
|
483 |
if (isset($_GET["digit"])) {
|
484 |
+
$digit = (int) $_GET["digit"];
|
485 |
}
|
486 |
else {
|
487 |
$digit = 6;
|
534 |
'z'
|
535 |
);
|
536 |
$main = array();
|
537 |
+
if ($_digital) {
|
538 |
$main = array_merge($main, $dig);
|
539 |
+
}
|
540 |
+
if ($_latin_char) {
|
541 |
$main = array_merge($main, $lat);
|
542 |
+
}
|
543 |
shuffle($main);
|
544 |
$pass = substr(implode('', $main), 0, $_length);
|
545 |
return $pass;
|
546 |
}
|
|
|
547 |
$l = rand($cap_length_min, $cap_length_max);
|
548 |
$code = code_generic($l, $cap_digital, $cap_latin_char);
|
549 |
@session_start();
|
573 |
}
|
574 |
}
|
575 |
|
576 |
+
// Function post or page window php.
|
|
|
577 |
function form_maker_window_php() {
|
578 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwindow') {
|
579 |
global $wpdb;
|
617 |
<td style="vertical-align:top">
|
618 |
<select name="Form_Makername" id="Form_Makername" style="width:250px; text-align:center">
|
619 |
<option style="text-align:center" value="- Select Form -" selected="selected">- Select a Form -</option>
|
620 |
+
<?php $ids_Form_Maker = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE `id` NOT IN(" . get_option('contact_form_forms', 0) . ") order by `id` DESC", 0);
|
621 |
foreach ($ids_Form_Maker as $arr_Form_Maker) {
|
622 |
?>
|
623 |
<option value="<?php echo $arr_Form_Maker->id; ?>"><?php echo $arr_Form_Maker->title; ?></option>
|
679 |
function html_form_maker_form_preview_product_option($css, $form) {
|
680 |
$cmpnt_js_path = plugins_url('js', __FILE__);
|
681 |
$id = 'form_id_temp';
|
682 |
+
echo "<input type='hidden' value='" . plugins_url("", __FILE__) . "' id='form_plugins_url' />";
|
683 |
+
echo '<script type="text/javascript">
|
684 |
+
if (document.getElementById("form_plugins_url")) {
|
685 |
+
var plugin_url = document.getElementById("form_plugins_url").value;
|
686 |
+
}
|
687 |
+
else {
|
688 |
+
var plugin_url = "";
|
689 |
+
}
|
690 |
+
</script>';
|
691 |
?>
|
692 |
<script src="<?php echo $cmpnt_js_path . "/if_gmap_back_end.js"; ?>"></script>
|
693 |
<script src="<?php echo $cmpnt_js_path . "/main.js"; ?>"></script>
|
694 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery-1.9.1.js"; ?>"></script>
|
695 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery-ui.js"; ?>"></script>
|
696 |
+
<script src="<?php echo $cmpnt_js_path . "/jquery.ui.slider.js"; ?>"></script>
|
697 |
+
<script src="<?php echo $cmpnt_js_path . "/main_front_end.js"; ?>"></script>
|
698 |
+
<link media="all" type="text/css" href="<?php echo plugins_url('', __FILE__) . "/css/jquery-ui-spinner.css"; ?>" rel="stylesheet">
|
699 |
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
700 |
<style>
|
701 |
<?php
|
form_maker_functions.html.php
CHANGED
@@ -1,3231 +1,3592 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
if
|
4 |
-
|
5 |
}
|
|
|
6 |
function html_update_form_maker($row, $labels, $themes) {
|
7 |
-
|
8 |
@session_start();
|
9 |
$all_updates = $_SESSION['all_updates'];
|
10 |
$current_updates = $_SESSION['current_updates'] - 1;
|
11 |
$perc = (int)(($current_updates / $all_updates) * 100);
|
12 |
-
|
13 |
-
<br/>
|
14 |
-
<br/>
|
15 |
-
<style>
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
</style>
|
48 |
-
|
49 |
-
<div style=""
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
addr_id++;
|
89 |
-
tox = tox + addr_id + '#**id**#' + 'Postal' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
90 |
-
addr_id++;
|
91 |
-
tox = tox + addr_id + '#**id**#' + 'Country' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
92 |
}
|
93 |
-
else
|
94 |
-
tox = tox + tr.id + '#**id**#' + l_label + '#**label**#' + tr.getAttribute('type') + '#****#';
|
95 |
}
|
96 |
}
|
97 |
}
|
|
|
98 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
document.getElementById('pagination').value = document.getElementById('pages').getAttribute("type");
|
104 |
-
document.getElementById('show_title').value = document.getElementById('pages').getAttribute("show_title");
|
105 |
-
document.getElementById('show_numbers').value = document.getElementById('pages').getAttribute("show_numbers");
|
106 |
-
submitform(pressbutton);
|
107 |
-
}
|
108 |
-
function submitform(pressbutton) {
|
109 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
110 |
-
document.getElementById('adminForm').submit();
|
111 |
-
}
|
112 |
-
function remove_whitespace(node) {
|
113 |
-
for (ttt = 0; ttt < node.childNodes.length; ttt++) {
|
114 |
-
if (node.childNodes[ttt].nodeType == '3') {
|
115 |
-
if (!node.childNodes[ttt])
|
116 |
-
node.removeChild(node.childNodes[ttt]);
|
117 |
-
}
|
118 |
-
else {
|
119 |
-
if (node.childNodes[ttt].childNodes.length)
|
120 |
-
remove_whitespace(node.childNodes[ttt]);
|
121 |
}
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
gen = document.getElementById('counter').value;
|
129 |
-
n = gen;
|
130 |
-
for (i = 0; i < n; i++) {
|
131 |
-
if (document.getElementById(i)) {
|
132 |
-
for (z = 0; z < document.getElementById(i).childNodes.length; z++)
|
133 |
-
if (document.getElementById(i).childNodes[z].nodeType == 3)
|
134 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
|
135 |
-
|
136 |
-
if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
|
137 |
-
if (document.getElementById(i).childNodes[10]) {
|
138 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
139 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
140 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
141 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
142 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
143 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
144 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
145 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
146 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
147 |
}
|
148 |
else {
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
153 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
154 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
155 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
156 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
157 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
158 |
}
|
159 |
-
continue;
|
160 |
-
}
|
161 |
-
|
162 |
-
if (document.getElementById(i).childNodes[10]) {
|
163 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
164 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
165 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
166 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
167 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
168 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
169 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
170 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
171 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
172 |
-
}
|
173 |
-
else {
|
174 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
175 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
176 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
177 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
178 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
179 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
180 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
181 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
182 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
183 |
}
|
|
|
184 |
}
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
}
|
232 |
-
|
233 |
-
case "type_name":
|
234 |
-
{
|
235 |
-
|
236 |
-
if (document.getElementById(i + "_element_titleform_id_temp")) {
|
237 |
-
remove_add_(i + "_element_titleform_id_temp");
|
238 |
-
remove_add_(i + "_element_firstform_id_temp");
|
239 |
-
remove_add_(i + "_element_lastform_id_temp");
|
240 |
-
remove_add_(i + "_element_middleform_id_temp");
|
241 |
}
|
242 |
else {
|
243 |
-
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
246 |
-
break;
|
247 |
-
|
248 |
-
}
|
249 |
-
|
250 |
-
case "type_phone":
|
251 |
-
{
|
252 |
-
|
253 |
-
remove_add_(i + "_element_firstform_id_temp");
|
254 |
-
remove_add_(i + "_element_lastform_id_temp");
|
255 |
-
break;
|
256 |
-
|
257 |
}
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
|
|
279 |
}
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
}
|
286 |
-
|
287 |
-
case "type_button":
|
288 |
-
{
|
289 |
-
for (j = 0; j < 100; j++)
|
290 |
-
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
291 |
-
remove_add_(i + "_elementform_id_temp" + j);
|
292 |
}
|
293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
}
|
295 |
-
|
296 |
-
|
297 |
-
{
|
298 |
-
if (document.getElementById(
|
299 |
-
|
300 |
-
remove_add_(i + "_mmform_id_temp");
|
301 |
-
remove_add_(i + "_hhform_id_temp");
|
302 |
}
|
303 |
-
|
304 |
-
|
305 |
-
remove_add_(i + "_hhform_id_temp");
|
306 |
-
|
307 |
}
|
308 |
-
|
309 |
-
|
310 |
-
}
|
311 |
-
|
312 |
-
case "type_date":
|
313 |
-
{
|
314 |
-
remove_add_(i + "_elementform_id_temp");
|
315 |
-
remove_add_(i + "_buttonform_id_temp");
|
316 |
-
|
317 |
-
break;
|
318 |
-
}
|
319 |
-
case "type_date_fields":
|
320 |
-
{
|
321 |
-
remove_add_(i + "_dayform_id_temp");
|
322 |
-
remove_add_(i + "_monthform_id_temp");
|
323 |
-
remove_add_(i + "_yearform_id_temp");
|
324 |
-
break;
|
325 |
}
|
326 |
}
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
if (form_view_element.childNodes[q].nodeType != 3)
|
349 |
-
if (!form_view_element.childNodes[q].id) {
|
350 |
-
del = true;
|
351 |
-
GLOBAL_tr = form_view_element.childNodes[q];
|
352 |
-
|
353 |
-
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
354 |
-
|
355 |
-
table = GLOBAL_tr.firstChild.childNodes[x];
|
356 |
-
tbody = table.firstChild;
|
357 |
-
|
358 |
-
if (tbody.childNodes.length)
|
359 |
-
del = false;
|
360 |
-
}
|
361 |
-
|
362 |
-
if (del) {
|
363 |
-
form_view_element.removeChild(form_view_element.childNodes[q]);
|
364 |
}
|
365 |
-
|
366 |
}
|
|
|
|
|
367 |
}
|
|
|
368 |
}
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
380 |
-
if (document.getElementsByTagName("iframe")[iiiii]) {
|
381 |
-
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
382 |
-
id_ifr_editor = iiiii;
|
383 |
-
break;
|
384 |
}
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
document.getElementById('formMakerDiv').style.display = (document.getElementById('formMakerDiv').style.display == 'block' ? 'none' : 'block');
|
394 |
-
document.getElementById('formMakerDiv1').style.display = (document.getElementById('formMakerDiv1').style.display == 'block' ? 'none' : 'block');
|
395 |
-
if (document.getElementById('formMakerDiv').offsetWidth)
|
396 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
397 |
-
document.getElementById('when_edit').style.display = 'none';
|
398 |
-
}
|
399 |
-
|
400 |
-
function enable2() {
|
401 |
-
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
402 |
-
if (document.getElementsByTagName("iframe")[iiiii]) {
|
403 |
-
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
404 |
-
id_ifr_editor = iiiii;
|
405 |
-
break;
|
406 |
}
|
|
|
407 |
}
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
document.getElementById('formMakerDiv').style.display = (document.getElementById('formMakerDiv').style.display == 'block' ? 'none' : 'block');
|
416 |
-
document.getElementById('formMakerDiv1').style.display = (document.getElementById('formMakerDiv1').style.display == 'block' ? 'none' : 'block');
|
417 |
-
if (document.getElementById('formMakerDiv').offsetWidth)
|
418 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
419 |
-
document.getElementById('when_edit').style.display = 'block';
|
420 |
-
if (document.getElementById('field_types').offsetWidth)
|
421 |
-
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
422 |
-
|
423 |
-
if (document.getElementById('field_types').offsetHeight)
|
424 |
-
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
425 |
-
|
426 |
-
//document.getElementById('when_edit').style.position='none';
|
427 |
-
|
428 |
-
}
|
429 |
-
|
430 |
-
function set_preview() {
|
431 |
-
appWidth = parseInt(document.body.offsetWidth);
|
432 |
-
appHeight = parseInt(document.body.offsetHeight);
|
433 |
-
//document.getElementById('toolbar-popup-preview').childNodes[1].href='index.php?option=com_formmaker&task=preview&tmpl=component&theme='+document.getElementById('theme').value;
|
434 |
-
//document.getElementById('toolbar-popup-preview').childNodes[1].setAttribute('rel',"{handler: 'iframe', size: {x:"+(appWidth-100)+", y: "+531+"}}");
|
435 |
-
}
|
436 |
-
</script>
|
437 |
-
<style>
|
438 |
-
#when_edit {
|
439 |
-
position: absolute;
|
440 |
-
background-color: #666;
|
441 |
-
z-index: 101;
|
442 |
-
display: none;
|
443 |
-
width: 100%;
|
444 |
-
height: 100%;
|
445 |
-
opacity: 0.7;
|
446 |
-
filter: alpha(opacity = 70);
|
447 |
-
}
|
448 |
-
|
449 |
-
#formMakerDiv {
|
450 |
-
position: fixed;
|
451 |
-
background-color: #666;
|
452 |
-
z-index: 100;
|
453 |
-
display: none;
|
454 |
-
left: 0;
|
455 |
-
top: 0;
|
456 |
-
width: 100%;
|
457 |
-
height: 100%;
|
458 |
-
opacity: 0.7;
|
459 |
-
filter: alpha(opacity = 70);
|
460 |
-
}
|
461 |
-
|
462 |
-
#formMakerDiv1 {
|
463 |
-
position: fixed;
|
464 |
-
z-index: 100;
|
465 |
-
background-color: transparent;
|
466 |
-
top: 0;
|
467 |
-
left: 0;
|
468 |
-
display: none;
|
469 |
-
margin-left: 30px;
|
470 |
-
margin-top: 15px;
|
471 |
-
}
|
472 |
-
|
473 |
-
|
474 |
-
</style>
|
475 |
-
|
476 |
-
<form action="admin.php?page=Form_maker&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm"
|
477 |
-
enctype="multipart/form-data">
|
478 |
-
<table style="border:6px #00aeef solid; background-color:#00aeef" width="100%" cellpadding="0" cellspacing="0">
|
479 |
-
<tr>
|
480 |
-
|
481 |
-
|
482 |
-
<td align="left" valign="middle" rowspan="3" style="padding:10px;">
|
483 |
-
<img src="<?php echo $form_file_url; ?>/images/formmaker.png"/>
|
484 |
-
</td>
|
485 |
-
|
486 |
-
<td width="70" align="right" valign="middle">
|
487 |
-
|
488 |
-
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
489 |
-
|
490 |
-
</td>
|
491 |
-
|
492 |
-
<td width="153" align="center" valign="middle">
|
493 |
-
|
494 |
-
<div style="background-image:url(<?php echo $form_file_url; ?>/images/input.png);">
|
495 |
-
|
496 |
-
<input id="title" name="title" <?php echo 'value="' . htmlspecialchars($row->title) . '"' ?>
|
497 |
-
style="background:none; width:151px; height:17px; border:none; font-size:11px"/>
|
498 |
-
|
499 |
-
</div>
|
500 |
-
|
501 |
-
</td>
|
502 |
-
|
503 |
-
</tr>
|
504 |
-
<tr>
|
505 |
-
|
506 |
-
<td width="300" align="right" valign="middle">
|
507 |
-
|
508 |
-
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Email to send submissions to: </span>
|
509 |
-
|
510 |
-
</td>
|
511 |
-
|
512 |
-
<td width="153" align="center" valign="middle">
|
513 |
-
|
514 |
-
<div style="background-image:url(<?php echo $form_file_url; ?>/images/input.png);">
|
515 |
-
|
516 |
-
<input id="mail" name="mail" <?php echo 'value="' . $row->mail . '"' ?>
|
517 |
-
style="background:none; width:151px; height:17px; border:none; font-size:11px"/>
|
518 |
-
|
519 |
-
</div>
|
520 |
-
|
521 |
-
</td>
|
522 |
-
|
523 |
-
</tr>
|
524 |
-
|
525 |
-
<tr>
|
526 |
-
|
527 |
-
<td width="300" align="right" valign="middle">
|
528 |
-
|
529 |
-
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Theme: </span>
|
530 |
-
|
531 |
-
</td>
|
532 |
-
|
533 |
-
<td width="153" align="center" valign="middle">
|
534 |
-
|
535 |
-
<div style="height:19px">
|
536 |
-
|
537 |
-
<select id="theme" name="theme"
|
538 |
-
style="background:transparent; width:151px; height:19px; border:none; font-size:11px"
|
539 |
-
onChange="set_preview()">
|
540 |
-
|
541 |
-
<?php
|
542 |
-
$form_theme = '';
|
543 |
-
foreach ($themes as $theme) {
|
544 |
-
if ($theme->id == $row->theme) {
|
545 |
-
echo '<option value="' . $theme->id . '" selected>' . $theme->title . '</option>';
|
546 |
-
$form_theme = $theme->css;
|
547 |
-
}
|
548 |
-
else
|
549 |
-
echo '<option value="' . $theme->id . '">' . $theme->title . '</option>';
|
550 |
}
|
551 |
-
|
552 |
-
</select>
|
553 |
-
|
554 |
-
</div>
|
555 |
-
|
556 |
-
</td>
|
557 |
-
|
558 |
-
</tr>
|
559 |
-
|
560 |
-
<tr>
|
561 |
-
<td align="left" colspan="3">
|
562 |
-
|
563 |
-
<img src="<?php echo $form_file_url; ?>/images/addanewfield.png" onclick="enable(); Enable()"
|
564 |
-
style="cursor:pointer;margin:10px;"/>
|
565 |
-
|
566 |
-
</td>
|
567 |
-
</tr>
|
568 |
-
</table>
|
569 |
-
|
570 |
-
<div id="formMakerDiv" onclick="close_window()"></div>
|
571 |
-
<div id="formMakerDiv1" align="center">
|
572 |
-
|
573 |
-
|
574 |
-
<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%"
|
575 |
-
style="border:6px #00aeef solid; background-color:#FFF">
|
576 |
-
<tr>
|
577 |
-
<td style="padding:0px">
|
578 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
579 |
-
<tr valign="top">
|
580 |
-
<td width="15%" height="100%" style="border-right:dotted black 1px;" id="field_types">
|
581 |
-
<div id="when_edit" style="display:none"></div>
|
582 |
-
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
583 |
-
<tr>
|
584 |
-
<td align="center" onClick="addRow('customHTML')" class="field_buttons" id="table_editor"><img
|
585 |
-
src="<?php echo $form_file_url; ?>/images/customHTML.png" style="margin:5px" id="img_customHTML"/>
|
586 |
-
</td>
|
587 |
-
|
588 |
-
<td align="center" onClick="addRow('text')" class="field_buttons" id="table_text"><img
|
589 |
-
src="<?php echo $form_file_url; ?>/images/text.png" style="margin:5px" id="img_text"/></td>
|
590 |
-
</tr>
|
591 |
-
<tr>
|
592 |
-
<td align="center" onClick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
|
593 |
-
<img src="<?php echo $form_file_url; ?>/images/time_and_date.png" style="margin:5px"
|
594 |
-
id="img_time_and_date"/></td>
|
595 |
-
|
596 |
-
<td align="center" onClick="addRow('select')" class="field_buttons" id="table_select"><img
|
597 |
-
src="<?php echo $form_file_url; ?>/images/select.png" style="margin:5px" id="img_select"/></td>
|
598 |
-
</tr>
|
599 |
-
<tr>
|
600 |
-
<td align="center" onClick="addRow('checkbox')" class="field_buttons" id="table_checkbox"><img
|
601 |
-
src="<?php echo $form_file_url; ?>/images/checkbox.png" style="margin:5px" id="img_checkbox"/></td>
|
602 |
-
|
603 |
-
<td align="center" onClick="addRow('radio')" class="field_buttons" id="table_radio"><img
|
604 |
-
src="<?php echo $form_file_url; ?>/images/radio.png" style="margin:5px" id="img_radio"/></td>
|
605 |
-
</tr>
|
606 |
-
<tr>
|
607 |
-
<td align="center"
|
608 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
609 |
-
style="background-color: rgb(114, 113, 113) !important;" class="field_buttons"
|
610 |
-
id="table_file_upload"><img src="<?php echo $form_file_url; ?>/images/file_upload.png"
|
611 |
-
style="margin:5px" id="img_file_upload"/></td>
|
612 |
-
|
613 |
-
<td align="center" onClick="addRow('captcha')" class="field_buttons" id="table_captcha"><img
|
614 |
-
src="<?php echo $form_file_url; ?>/images/captcha.png" style="margin:5px" id="img_captcha"/></td>
|
615 |
-
</tr>
|
616 |
-
<tr>
|
617 |
-
<td align="center" onClick="addRow('page_break')" class="field_buttons" id="table_page_break"><img
|
618 |
-
src="<?php echo $form_file_url; ?>/images/page_break.png" style="margin:5px" id="img_page_break"/>
|
619 |
-
</td>
|
620 |
-
|
621 |
-
<td align="center" onClick="addRow('section_break')" class="field_buttons" id="table_section_break">
|
622 |
-
<img src="<?php echo $form_file_url; ?>/images/section_break.png" style="margin:5px"
|
623 |
-
id="img_section_break"/></td>
|
624 |
-
</tr>
|
625 |
-
<tr>
|
626 |
-
<td align="center"
|
627 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
628 |
-
style="background-color: rgb(114, 113, 113) !important;" class="field_buttons" id="table_map"><img
|
629 |
-
src="<?php echo $form_file_url; ?>/images/map.png" style="margin:5px" id="img_map"/></td>
|
630 |
-
|
631 |
-
<td align="center" onClick="addRow('button')" class="field_buttons" id="table_button"><img
|
632 |
-
src="<?php echo $form_file_url; ?>/images/button.png" style="margin:5px" id="img_button"/></td>
|
633 |
-
</tr>
|
634 |
-
</table>
|
635 |
-
|
636 |
-
</td>
|
637 |
-
<td width="35%" height="100%" align="left">
|
638 |
-
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:531px"></div>
|
639 |
-
</td>
|
640 |
-
|
641 |
-
<td align="center" valign="top"
|
642 |
-
style="background:url(<?php echo $form_file_url; ?>/images/border2.png) repeat-y;"> </td>
|
643 |
-
<td style="padding:15px">
|
644 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
645 |
-
|
646 |
-
<tr>
|
647 |
-
<td align="right"><input type="radio" value="end" name="el_pos" checked="checked" id="pos_end"
|
648 |
-
onclick="Disable()"/>
|
649 |
-
At The End
|
650 |
-
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
651 |
-
At The Beginning
|
652 |
-
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
653 |
-
Before
|
654 |
-
<select style="width:100px; margin-left:5px" id="sel_el_pos" disabled="disabled">
|
655 |
-
</select>
|
656 |
-
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px"
|
657 |
-
src="<?php echo $form_file_url; ?>/images/save.png" onClick="add(0)"/>
|
658 |
-
<img alt="CANCEL" title="cancel" style=" cursor:pointer; vertical-align:middle; margin:5px"
|
659 |
-
src="<?php echo $form_file_url; ?>/images/cancel_but.png" onClick="close_window()"/>
|
660 |
-
|
661 |
-
<hr style=" margin-bottom:10px"/>
|
662 |
-
</td>
|
663 |
-
</tr>
|
664 |
-
|
665 |
-
<tr height="100%" valign="top">
|
666 |
-
<td id="show_table"></td>
|
667 |
-
</tr>
|
668 |
-
|
669 |
-
</table>
|
670 |
-
</td>
|
671 |
-
</tr>
|
672 |
-
</table>
|
673 |
-
</td>
|
674 |
-
</tr>
|
675 |
-
</table>
|
676 |
-
</div>
|
677 |
-
<input type="hidden" id="old"/>
|
678 |
-
<input type="hidden" id="old_selected"/>
|
679 |
-
<input type="hidden" id="element_type"/>
|
680 |
-
<input type="hidden" id="editing_id"/>
|
681 |
-
|
682 |
-
<div id="main_editor"
|
683 |
-
style="position:absolute; display:none; z-index:140;"><?php if (function_exists('the_editor') || function_exists('wp_editor')) {
|
684 |
-
if (get_bloginfo('version') < '3.3') { ?>
|
685 |
-
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
686 |
-
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"
|
687 |
-
class="postarea"><?php the_editor("", "form_maker_editor", "title", $media_buttons = TRUE, $tab_index = 1, $extended = TRUE); ?>
|
688 |
-
</div>
|
689 |
-
</div>
|
690 |
-
<?php
|
691 |
-
}
|
692 |
-
else {
|
693 |
-
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>";
|
694 |
-
wp_editor("", "form_maker_editor");
|
695 |
-
}
|
696 |
-
}
|
697 |
-
else {
|
698 |
-
?>
|
699 |
-
<textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="6" style="width: 450px; height: 350px; "
|
700 |
-
class="mce_editable" aria-hidden="true"></textarea>
|
701 |
-
<?php
|
702 |
-
}
|
703 |
-
?></div>
|
704 |
-
|
705 |
-
|
706 |
-
<br/>
|
707 |
-
<br/>
|
708 |
-
|
709 |
-
<fieldset>
|
710 |
-
|
711 |
-
<legend>
|
712 |
-
|
713 |
-
<h2 style="color:#00aeef">Form</h2>
|
714 |
-
|
715 |
-
</legend>
|
716 |
-
|
717 |
-
<?php
|
718 |
-
global $first_css;
|
719 |
-
echo '<style>' . $first_css . '</style>';
|
720 |
-
|
721 |
-
?>
|
722 |
-
<table width="100%" style="margin:8px">
|
723 |
-
<tr id="page_navigation">
|
724 |
-
<td align="center" width="90%" id="pages" show_title="<?php echo $row->show_title; ?>"
|
725 |
-
show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>"></td>
|
726 |
-
<td align="left" id="edit_page_navigation"></td>
|
727 |
-
</tr>
|
728 |
-
</table>
|
729 |
-
<div id="take" class="main">
|
730 |
-
<table cellpadding="4" cellspacing="0" class="wdform_table1" style="border-top:0px solid black;">
|
731 |
-
<tbody id="form_id_tempform_view1" class="wdform_tbody1" page_title="Untitled page" next_title="Next"
|
732 |
-
next_type="button" next_class="wdform_page_button" next_checkable="false" previous_title="Previous"
|
733 |
-
previous_type="button" previous_class="wdform_page_button" previous_checkable="false">
|
734 |
-
<tr class="wdform_tr1">
|
735 |
-
<td class="wdform_td1">
|
736 |
-
<table class="wdform_table2">
|
737 |
-
<tbody class="wdform_tbody2"></tbody>
|
738 |
-
</table>
|
739 |
-
</td>
|
740 |
-
</tr>
|
741 |
-
<tr class="wdform_footer">
|
742 |
-
<td colspan="100" valign="top">
|
743 |
-
<table width="100%" style="padding-right:170px">
|
744 |
-
<tbody>
|
745 |
-
<tr id="form_id_temppage_nav1"></tr>
|
746 |
-
</tbody>
|
747 |
-
</table>
|
748 |
-
</td>
|
749 |
-
</tr>
|
750 |
-
<tbody id="form_id_tempform_view_img1" style="float:right ;">
|
751 |
-
<tr>
|
752 |
-
<td width="0%"></td>
|
753 |
-
<td align="right"><img src="<?php echo $form_file_url; ?>/images/minus.png" title="Show or hide the page"
|
754 |
-
class="page_toolbar" onclick="show_or_hide('1')" id="show_page_img_1"/></td>
|
755 |
-
<td><img src="<?php echo $form_file_url; ?>/images/page_delete.png" title="Delete the page" class="page_toolbar"
|
756 |
-
onclick="remove_page('1')"/></td>
|
757 |
-
<td><img src="<?php echo $form_file_url; ?>/images/page_delete_all.png" title="Delete the page with fields"
|
758 |
-
class="page_toolbar" onclick="remove_page_all('1')"/></td>
|
759 |
-
<td><img src="<?php echo $form_file_url; ?>/images/page_edit.png" title="Edit the page" class="page_toolbar"
|
760 |
-
onclick="edit_page_break('1')"/></td>
|
761 |
-
</tr>
|
762 |
-
</tbody>
|
763 |
-
</table>
|
764 |
-
</div>
|
765 |
-
|
766 |
-
<div id="take_old" style="display:none">
|
767 |
-
<?php
|
768 |
-
echo $row->form;
|
769 |
-
|
770 |
-
?> </div>
|
771 |
-
|
772 |
-
</fieldset>
|
773 |
-
|
774 |
-
<input type="hidden" name="form" id="form">
|
775 |
-
<input type="hidden" name="form_front" id="form_front">
|
776 |
-
<input type="hidden" value="<?php echo plugins_url("", __FILE__) ?>" id="form_plugins_url"/>
|
777 |
-
<input type="hidden" name="pagination" id="pagination"/>
|
778 |
-
<input type="hidden" name="show_title" id="show_title"/>
|
779 |
-
<input type="hidden" name="show_numbers" id="show_numbers"/>
|
780 |
-
|
781 |
-
<input type="hidden" name="public_key" id="public_key"/>
|
782 |
-
<input type="hidden" name="private_key" id="private_key"/>
|
783 |
-
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme"/>
|
784 |
-
|
785 |
-
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order;?>"/>
|
786 |
-
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter;?>">
|
787 |
-
|
788 |
-
<script type="text/javascript">
|
789 |
-
form_view = 1;
|
790 |
-
form_view_count = 1;
|
791 |
-
form_view_max = 1;
|
792 |
-
|
793 |
-
function formOnload() {
|
794 |
-
//enable maps
|
795 |
-
form_view = document.getElementById('form_view');
|
796 |
-
GLOBAL_tr = form_view.firstChild;
|
797 |
-
|
798 |
-
for (qqq = 0; qqq < GLOBAL_tr.childNodes.length; qqq++) {
|
799 |
-
td = GLOBAL_tr.childNodes[qqq];
|
800 |
-
tbody = td.firstChild.firstChild;
|
801 |
-
for (yyy = 0; yyy < tbody.childNodes.length; yyy++) {
|
802 |
-
|
803 |
-
|
804 |
-
tr = tbody.childNodes[yyy];
|
805 |
-
l_id = tr.id;
|
806 |
-
add_new_field(l_id);
|
807 |
-
td = GLOBAL_tr.childNodes[qqq];
|
808 |
-
tbody = td.firstChild.firstChild;
|
809 |
-
for (zzz = 0; zzz < qqq; zzz++) {
|
810 |
-
right_row(l_id);
|
811 |
}
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
}
|
817 |
-
|
818 |
-
function formAddToOnload() {
|
819 |
-
if (formOldFunctionOnLoad) {
|
820 |
-
formOldFunctionOnLoad();
|
821 |
-
}
|
822 |
-
formOnload();
|
823 |
-
}
|
824 |
-
|
825 |
-
function formLoadBody() {
|
826 |
-
|
827 |
-
formOldFunctionOnLoad = window.onload;
|
828 |
-
window.onload = formAddToOnload;
|
829 |
-
}
|
830 |
-
|
831 |
-
var formOldFunctionOnLoad = null;
|
832 |
-
formLoadBody();
|
833 |
-
|
834 |
-
function add_new_field(id) {
|
835 |
-
enable2();
|
836 |
-
type = document.getElementById(id).getAttribute('type');
|
837 |
-
//////////////////////////////parameter take
|
838 |
-
if (document.getElementById(id + '_element_label').innerHTML)
|
839 |
-
w_field_label = document.getElementById(id + '_element_label').innerHTML;
|
840 |
-
|
841 |
-
w_choices = new Array();
|
842 |
-
w_choices_checked = new Array();
|
843 |
-
w_choices_disabled = new Array();
|
844 |
-
w_allow_other_num = 0;
|
845 |
-
|
846 |
-
if (document.getElementById(id + '_label_and_element_section'))
|
847 |
-
w_field_label_pos = "top";
|
848 |
-
else
|
849 |
-
w_field_label_pos = "left";
|
850 |
-
|
851 |
-
if (document.getElementById(id + "_element")) {
|
852 |
-
s = document.getElementById(id + "_element").style.width;
|
853 |
-
w_size = s.substring(0, s.length - 2);
|
854 |
-
}
|
855 |
-
|
856 |
-
if (document.getElementById(id + "_required"))
|
857 |
-
w_required = document.getElementById(id + "_required").value;
|
858 |
-
|
859 |
-
if (document.getElementById(id + '_label_section')) {
|
860 |
-
w_class = document.getElementById(id + '_label_section').getAttribute("class");
|
861 |
-
if (!w_class)
|
862 |
-
w_class = "";
|
863 |
-
}
|
864 |
-
|
865 |
-
t = 0;
|
866 |
-
gen = id;
|
867 |
-
switch (type) {
|
868 |
-
case 'type_editor':
|
869 |
-
{
|
870 |
-
w_editor = document.getElementById(id + "_element_section").innerHTML;
|
871 |
-
type_editor(gen, w_editor);
|
872 |
-
add(0);
|
873 |
-
break;
|
874 |
-
}
|
875 |
-
case 'type_text':
|
876 |
-
{
|
877 |
-
w_first_val = document.getElementById(id + "_element").value;
|
878 |
-
w_title = document.getElementById(id + "_element").title;
|
879 |
-
atrs = return_attributes(id + '_element');
|
880 |
-
w_attr_name = atrs[0];
|
881 |
-
w_attr_value = atrs[1];
|
882 |
-
type_text(gen, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_required, 'no', w_class, w_attr_name, w_attr_value);
|
883 |
-
add(0);
|
884 |
-
break;
|
885 |
-
}
|
886 |
-
case 'type_password':
|
887 |
-
{
|
888 |
-
atrs = return_attributes(id + '_element');
|
889 |
-
w_attr_name = atrs[0];
|
890 |
-
w_attr_value = atrs[1];
|
891 |
-
if (w_class == '')
|
892 |
-
w_class = 'wdform_input';
|
893 |
-
type_password(gen, w_field_label, w_field_label_pos, w_size, w_required, 'no', w_class, w_attr_name, w_attr_value);
|
894 |
-
add(0);
|
895 |
-
break;
|
896 |
-
}
|
897 |
-
case 'type_textarea':
|
898 |
-
{
|
899 |
-
w_first_val = document.getElementById(id + "_element").value;
|
900 |
-
w_title = document.getElementById(id + "_element").title;
|
901 |
-
s = document.getElementById(id + "_element").style.height;
|
902 |
-
w_size_h = s.substring(0, s.length - 2);
|
903 |
-
|
904 |
-
atrs = return_attributes(id + '_element');
|
905 |
-
w_attr_name = atrs[0];
|
906 |
-
w_attr_value = atrs[1];
|
907 |
-
type_textarea(gen, w_field_label, w_field_label_pos, w_size, w_size_h, w_first_val, w_title, w_required, 'no', w_class, w_attr_name, w_attr_value);
|
908 |
-
add(0);
|
909 |
-
break;
|
910 |
-
}
|
911 |
-
case 'type_name':
|
912 |
-
{
|
913 |
-
if (document.getElementById(id + '_element_middle'))
|
914 |
-
w_name_format = "extended";
|
915 |
-
else
|
916 |
-
w_name_format = "normal";
|
917 |
-
|
918 |
-
w_first_val = ['', ''];
|
919 |
-
w_title = ['', ''];
|
920 |
-
|
921 |
-
|
922 |
-
s = document.getElementById(id + "_element_first").style.width;
|
923 |
-
w_size = s.substring(0, s.length - 2);
|
924 |
-
atrs = return_attributes(id + '_element_first');
|
925 |
-
w_attr_name = atrs[0];
|
926 |
-
w_attr_value = atrs[1];
|
927 |
-
type_name(gen, w_field_label, w_field_label_pos, w_first_val, w_title, w_size, w_name_format, w_required, 'no', w_class, w_attr_name, w_attr_value);
|
928 |
-
add(0);
|
929 |
-
break;
|
930 |
-
}
|
931 |
-
|
932 |
-
case 'type_submitter_mail':
|
933 |
-
{
|
934 |
-
w_first_val = document.getElementById(id + "_element").value;
|
935 |
-
w_title = document.getElementById(id + "_element").title;
|
936 |
-
w_send = document.getElementById(id + "_send").value;
|
937 |
-
|
938 |
-
atrs = return_attributes(id + '_element');
|
939 |
-
w_attr_name = atrs[0];
|
940 |
-
w_attr_value = atrs[1];
|
941 |
-
type_submitter_mail(gen, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_send, w_required, 'no', w_class, w_attr_name, w_attr_value);
|
942 |
-
add(0);
|
943 |
-
break;
|
944 |
-
}
|
945 |
-
case 'type_checkbox':
|
946 |
-
{
|
947 |
-
|
948 |
-
if (document.getElementById(id + '_hor'))
|
949 |
-
w_flow = "hor"
|
950 |
-
else
|
951 |
-
w_flow = "ver";
|
952 |
-
|
953 |
-
v = 0;
|
954 |
-
for (k = 0; k < 100; k++)
|
955 |
-
if (document.getElementById(id + "_element" + k)) {
|
956 |
-
if (document.getElementById(id + "_element" + k).getAttribute('other'))
|
957 |
-
if (document.getElementById(id + "_element" + k).getAttribute('other') == '1')
|
958 |
-
w_allow_other_num = t;
|
959 |
-
w_choices[t] = document.getElementById(id + "_element" + k).value;
|
960 |
-
w_choices_checked[t] = document.getElementById(id + "_element" + k).checked;
|
961 |
-
t++;
|
962 |
-
v = k;
|
963 |
-
}
|
964 |
-
atrs = return_attributes(id + '_element' + v);
|
965 |
-
w_attr_name = atrs[0];
|
966 |
-
w_attr_value = atrs[1];
|
967 |
-
type_checkbox(gen, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_required, 'no', 'no', '0', w_class, w_attr_name, w_attr_value);
|
968 |
-
add(0);
|
969 |
-
break;
|
970 |
-
}
|
971 |
-
case 'type_radio':
|
972 |
-
{
|
973 |
-
if (document.getElementById(id + '_hor'))
|
974 |
-
w_flow = "hor"
|
975 |
-
else
|
976 |
-
w_flow = "ver";
|
977 |
-
|
978 |
-
|
979 |
-
v = 0;
|
980 |
-
for (k = 0; k < 100; k++)
|
981 |
-
if (document.getElementById(id + "_element" + k)) {
|
982 |
-
w_choices[t] = document.getElementById(id + "_element" + k).value;
|
983 |
-
w_choices_checked[t] = document.getElementById(id + "_element" + k).checked;
|
984 |
-
t++;
|
985 |
-
v = k;
|
986 |
-
}
|
987 |
-
atrs = return_attributes(id + '_element' + v);
|
988 |
-
w_attr_name = atrs[0];
|
989 |
-
w_attr_value = atrs[1];
|
990 |
-
type_radio(gen, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_required, 'no', 'no', 0, w_class, w_attr_name, w_attr_value);
|
991 |
-
add(0);
|
992 |
-
break;
|
993 |
-
}
|
994 |
-
case 'type_time':
|
995 |
-
{
|
996 |
-
atrs = return_attributes(id + '_hh');
|
997 |
-
w_attr_name = atrs[0];
|
998 |
-
w_attr_value = atrs[1];
|
999 |
-
w_hh = document.getElementById(id + '_hh').value;
|
1000 |
-
w_mm = document.getElementById(id + '_mm').value;
|
1001 |
-
if (document.getElementById(id + '_ss')) {
|
1002 |
-
w_ss = document.getElementById(id + '_ss').value;
|
1003 |
-
w_sec = "1";
|
1004 |
}
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
|
|
1008 |
}
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
}
|
1013 |
-
|
1014 |
-
|
1015 |
-
w_time_type = "24";
|
1016 |
-
}
|
1017 |
-
type_time(gen, w_field_label, w_field_label_pos, w_time_type, w_am_pm, w_sec, w_hh, w_mm, w_ss, w_required, w_class, w_attr_name, w_attr_value);
|
1018 |
-
add(0);
|
1019 |
-
break;
|
1020 |
-
}
|
1021 |
-
case 'type_date':
|
1022 |
-
{
|
1023 |
-
atrs = return_attributes(id + '_element');
|
1024 |
-
w_attr_name = atrs[0];
|
1025 |
-
w_attr_value = atrs[1];
|
1026 |
-
w_date = document.getElementById(id + '_element').value;
|
1027 |
-
w_format = document.getElementById(id + '_button').getAttribute("format");
|
1028 |
-
w_but_val = document.getElementById(id + '_button').value;
|
1029 |
-
type_date(gen, w_field_label, w_field_label_pos, w_date, w_required, w_class, w_format, w_but_val, w_attr_name, w_attr_value);
|
1030 |
-
add(0);
|
1031 |
-
break;
|
1032 |
-
}
|
1033 |
-
case 'type_date_fields':
|
1034 |
-
{
|
1035 |
-
atrs = return_attributes(id + '_day');
|
1036 |
-
w_attr_name = atrs[0];
|
1037 |
-
w_attr_value = atrs[1];
|
1038 |
-
w_day = document.getElementById(id + '_day').value;
|
1039 |
-
w_month = document.getElementById(id + '_month').value;
|
1040 |
-
w_year = document.getElementById(id + '_year').value;
|
1041 |
-
w_day_type = document.getElementById(id + '_day').tagName;
|
1042 |
-
w_month_type = document.getElementById(id + '_month').tagName;
|
1043 |
-
w_year_type = document.getElementById(id + '_year').tagName;
|
1044 |
-
w_day_label = document.getElementById(id + '_day_label').innerHTML;
|
1045 |
-
w_month_label = document.getElementById(id + '_month_label').innerHTML;
|
1046 |
-
w_year_label = document.getElementById(id + '_year_label').innerHTML;
|
1047 |
-
|
1048 |
-
s = document.getElementById(id + '_day').style.width;
|
1049 |
-
w_day_size = s.substring(0, s.length - 2);
|
1050 |
-
|
1051 |
-
s = document.getElementById(id + '_month').style.width;
|
1052 |
-
w_month_size = s.substring(0, s.length - 2);
|
1053 |
-
|
1054 |
-
s = document.getElementById(id + '_year').style.width;
|
1055 |
-
w_year_size = s.substring(0, s.length - 2);
|
1056 |
-
|
1057 |
-
if (w_year_type == 'SELECT') {
|
1058 |
-
w_from = document.getElementById(id + '_year').getAttribute('from');
|
1059 |
-
w_to = document.getElementById(id + '_year').getAttribute('to');
|
1060 |
}
|
1061 |
-
else {
|
1062 |
-
w_from = '1901';
|
1063 |
-
w_to = '2012';
|
1064 |
-
}
|
1065 |
-
w_divider = document.getElementById(id + '_separator1').innerHTML;
|
1066 |
-
type_date_fields(gen, w_field_label, w_field_label_pos, w_day, w_month, w_year, w_day_type, w_month_type, w_year_type, w_day_label, w_month_label, w_year_label, w_day_size, w_month_size, w_year_size, w_required, w_class, w_from, w_to, w_divider, w_attr_name, w_attr_value);
|
1067 |
-
add(0);
|
1068 |
-
break;
|
1069 |
-
}
|
1070 |
-
case 'type_own_select':
|
1071 |
-
{
|
1072 |
-
for (k = 0; k < 100; k++)
|
1073 |
-
if (document.getElementById(id + "_option" + k)) {
|
1074 |
-
w_choices[t] = document.getElementById(id + "_option" + k).innerHTML;
|
1075 |
-
w_choices_checked[t] = document.getElementById(id + "_option" + k).selected;
|
1076 |
-
if (document.getElementById(id + "_option" + k).value == "")
|
1077 |
-
w_choices_disabled[t] = true;
|
1078 |
-
else
|
1079 |
-
w_choices_disabled[t] = false;
|
1080 |
-
t++;
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
atrs = return_attributes(id + '_element');
|
1084 |
-
w_attr_name = atrs[0];
|
1085 |
-
w_attr_value = atrs[1];
|
1086 |
-
type_own_select(gen, w_field_label, w_field_label_pos, w_size, w_choices, w_choices_checked, w_required, w_class, w_attr_name, w_attr_value, w_choices_disabled);
|
1087 |
-
add(0);
|
1088 |
-
break;
|
1089 |
}
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
n = select_.childNodes.length;
|
1096 |
-
for (i = 0; i < n; i++) {
|
1097 |
-
w_countries.push(select_.childNodes[i].value);
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
atrs = return_attributes(id + '_element');
|
1101 |
-
w_attr_name = atrs[0];
|
1102 |
-
w_attr_value = atrs[1];
|
1103 |
-
type_country(gen, w_field_label, w_countries, w_field_label_pos, w_size, w_required, w_class, w_attr_name, w_attr_value);
|
1104 |
-
add(0);
|
1105 |
-
break;
|
1106 |
-
}
|
1107 |
-
case 'type_file_upload':
|
1108 |
-
{
|
1109 |
-
w_destination = document.getElementById(id + "_destination").value.replace("***destinationverj" + id + "***", "").replace("***destinationskizb" + id + "***", "");
|
1110 |
-
w_extension = document.getElementById(id + "_extension").value.replace("***extensionverj" + id + "***", "").replace("***extensionskizb" + id + "***", "");
|
1111 |
-
w_max_size = document.getElementById(id + "_max_size").value.replace("***max_sizeverj" + id + "***", "").replace("***max_sizeskizb" + id + "***", "");
|
1112 |
-
|
1113 |
-
atrs = return_attributes(id + '_element');
|
1114 |
-
w_attr_name = atrs[0];
|
1115 |
-
w_attr_value = atrs[1];
|
1116 |
-
type_file_upload(gen, w_field_label, w_field_label_pos, w_destination, w_extension, w_max_size, w_required, w_class, w_attr_name, w_attr_value);
|
1117 |
-
add(0);
|
1118 |
-
break;
|
1119 |
-
}
|
1120 |
-
case 'type_map':
|
1121 |
-
{
|
1122 |
-
|
1123 |
-
w_lat = [];
|
1124 |
-
w_long = [];
|
1125 |
-
w_info = [];
|
1126 |
-
|
1127 |
-
w_zoom = document.getElementById(id + "_element").getAttribute("zoom");
|
1128 |
-
w_width = parseInt(document.getElementById(id + "_element").style.width);
|
1129 |
-
w_height = parseInt(document.getElementById(id + "_element").style.height);
|
1130 |
-
|
1131 |
-
|
1132 |
-
w_lat.push(document.getElementById(id + "_element").getAttribute("lat"));
|
1133 |
-
w_long.push(document.getElementById(id + "_element").getAttribute("long"));
|
1134 |
-
w_info.push(document.getElementById(id + "_element").getAttribute("info"));
|
1135 |
-
|
1136 |
-
atrs = return_attributes(id + '_element');
|
1137 |
-
w_attr_name = atrs[0];
|
1138 |
-
w_attr_value = atrs[1];
|
1139 |
-
type_map(gen, w_long, w_lat, w_long, w_lat, w_zoom, w_width, w_height, w_class, w_info, w_attr_name, w_attr_value);
|
1140 |
-
add(0);
|
1141 |
-
break;
|
1142 |
-
}
|
1143 |
-
case 'type_submit_reset':
|
1144 |
-
{
|
1145 |
-
atrs = return_attributes(id + '_element_submit');
|
1146 |
-
w_act = !(document.getElementById(id + "_element_reset").style.display == "none");
|
1147 |
-
w_attr_name = atrs[0];
|
1148 |
-
w_attr_value = atrs[1];
|
1149 |
-
w_submit_title = document.getElementById(id + "_element_submit").value;
|
1150 |
-
w_reset_title = document.getElementById(id + "_element_reset").value;
|
1151 |
-
type_submit_reset(gen, w_submit_title, w_reset_title, w_class, w_act, w_attr_name, w_attr_value);
|
1152 |
-
add(0);
|
1153 |
-
break;
|
1154 |
-
}
|
1155 |
-
|
1156 |
-
case 'type_button':
|
1157 |
-
{
|
1158 |
-
w_title = new Array();
|
1159 |
-
|
1160 |
-
w_func = new Array();
|
1161 |
-
t = 0;
|
1162 |
-
v = 0;
|
1163 |
-
for (k = 0; k < 100; k++)
|
1164 |
-
if (document.getElementById(id + "_element" + k)) {
|
1165 |
-
w_title[t] = document.getElementById(id + "_element" + k).value;
|
1166 |
-
w_func[t] = document.getElementById(id + "_element" + k).getAttribute("onclick");
|
1167 |
-
t++;
|
1168 |
-
v = k;
|
1169 |
-
}
|
1170 |
-
atrs = return_attributes(id + '_element' + v);
|
1171 |
-
w_attr_name = atrs[0];
|
1172 |
-
w_attr_value = atrs[1];
|
1173 |
-
type_button(gen, w_title, w_func, w_class, w_attr_name, w_attr_value);
|
1174 |
-
add(0);
|
1175 |
-
break;
|
1176 |
-
}
|
1177 |
-
case 'type_hidden':
|
1178 |
-
{
|
1179 |
-
w_value = document.getElementById(id + "_element").value;
|
1180 |
-
w_name = document.getElementById(id + "_element").name;
|
1181 |
-
|
1182 |
-
atrs = return_attributes(id + '_element');
|
1183 |
-
w_attr_name = atrs[0];
|
1184 |
-
w_attr_value = atrs[1];
|
1185 |
-
type_hidden(gen, w_name, w_value, w_attr_name, w_attr_value);
|
1186 |
-
add(0);
|
1187 |
-
break;
|
1188 |
-
}
|
1189 |
-
|
1190 |
-
case 'type_captcha':
|
1191 |
-
{
|
1192 |
-
w_digit = document.getElementById("wd_captcha").getAttribute("digit");
|
1193 |
-
atrs = return_attributes('wd_captcha');
|
1194 |
-
w_attr_name = atrs[0];
|
1195 |
-
w_attr_value = atrs[1];
|
1196 |
-
type_captcha(gen, w_field_label, w_field_label_pos, w_digit, w_class, w_attr_name, w_attr_value);
|
1197 |
-
add(0);
|
1198 |
-
break;
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
|
1202 |
-
}
|
1203 |
-
|
1204 |
-
|
1205 |
-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
1206 |
-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
1207 |
-
}
|
1208 |
-
|
1209 |
-
plugin_url = document.getElementById('form_plugins_url').value;
|
1210 |
-
|
1211 |
-
</script>
|
1212 |
-
|
1213 |
-
<input type="hidden" name="option" value="com_formmaker"/>
|
1214 |
-
|
1215 |
-
<input type="hidden" name="id" value="<?php echo $row->id?>"/>
|
1216 |
-
|
1217 |
-
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>"/>
|
1218 |
-
|
1219 |
-
<input type="hidden" name="task" value=""/>
|
1220 |
-
<input type="hidden" id="araqel" value="0"/>
|
1221 |
-
|
1222 |
-
</form>
|
1223 |
-
|
1224 |
-
<?php
|
1225 |
-
}
|
1226 |
-
|
1227 |
-
function html_forchrome_update() {
|
1228 |
-
?>
|
1229 |
-
<script type="text/javascript">
|
1230 |
-
|
1231 |
-
|
1232 |
-
window.onload = val;
|
1233 |
-
|
1234 |
-
function val() {
|
1235 |
-
var form = document.adminForm;
|
1236 |
-
submitform();
|
1237 |
-
}
|
1238 |
-
function submitform(pressbutton) {
|
1239 |
-
|
1240 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=update";
|
1241 |
-
document.getElementById('adminForm').submit();
|
1242 |
-
|
1243 |
-
}
|
1244 |
-
</script>
|
1245 |
-
<form action="admin.php?page=Form_maker&id=<?php echo $id; ?>" method="post" id="adminForm" name="adminForm">
|
1246 |
-
|
1247 |
-
|
1248 |
-
</form>
|
1249 |
-
<?php
|
1250 |
-
}
|
1251 |
-
|
1252 |
-
function update_complete() {
|
1253 |
-
?>
|
1254 |
-
|
1255 |
-
<div class="updated"><p><strong><?php _e('All forms are updated!'); ?></strong></p></div>
|
1256 |
-
<?php
|
1257 |
-
}
|
1258 |
-
|
1259 |
-
function html_display_form_lists($rows, $pageNav, $sort, $old_version, $can_update_form) {
|
1260 |
-
global $wpdb;
|
1261 |
-
?>
|
1262 |
-
<script language="javascript">
|
1263 |
-
function confirmation(href, title) {
|
1264 |
-
var answer = confirm("Are you sure you want to delete '" + title + "'?")
|
1265 |
-
if (answer) {
|
1266 |
-
document.getElementById('admin_form').action = href;
|
1267 |
-
document.getElementById('admin_form').submit();
|
1268 |
}
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
if (!e) var e = window.event;
|
1281 |
-
|
1282 |
-
e.cancelBubble = true;
|
1283 |
-
e.returnValue = false;
|
1284 |
-
|
1285 |
-
if (e.stopPropagation) {
|
1286 |
-
e.stopPropagation();
|
1287 |
-
e.preventDefault();
|
1288 |
-
}
|
1289 |
}
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
<br />
|
1302 |
-
This section allows you to create forms.
|
1303 |
-
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1304 |
-
</div>
|
1305 |
-
<table cellspacing="10" width="100%">
|
1306 |
-
<tr>
|
1307 |
-
<td style="width:50px">
|
1308 |
-
<img src="<?php echo plugins_url("images/formmakerLogo-48.png", __FILE__); ?>"/>
|
1309 |
-
</td>
|
1310 |
-
<td style="width:140px;">
|
1311 |
-
<h2 style="vertical-align:top;">Form Maker</h2></td>
|
1312 |
-
<td style="width:90px; text-align:right;"><input class="button-secondary action" type="button" value="Add a Form"
|
1313 |
-
name="custom_parametrs"
|
1314 |
-
onclick="window.location.href='admin.php?page=Form_maker&task=add_form'"/>
|
1315 |
-
</td>
|
1316 |
-
<?php if ($old_version && $can_update_form) { ?>
|
1317 |
-
<td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms"
|
1318 |
-
name="update_forms"
|
1319 |
-
onclick="window.location.href='admin.php?page=Form_maker&task=update'"/>
|
1320 |
-
</td><?php } if (!$can_update_form && $old_version) { ?>
|
1321 |
-
<td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms"
|
1322 |
-
name="update_forms"
|
1323 |
-
onclick="alert('You cant update the forms of pro version with the free version. Please get the pro version')"/>
|
1324 |
-
</td><?php }?>
|
1325 |
-
<td>
|
1326 |
-
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:90%">
|
1327 |
-
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
1328 |
-
style="color:red; text-decoration:none;">
|
1329 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="www.web-dorado.com"
|
1330 |
-
width="215"><br>
|
1331 |
-
Get the full version
|
1332 |
-
</a>
|
1333 |
-
</div>
|
1334 |
-
</td>
|
1335 |
-
</tr>
|
1336 |
-
</table>
|
1337 |
-
<?php
|
1338 |
-
$serch_value = "";
|
1339 |
-
if (isset($_POST['serch_or_not'])) {
|
1340 |
-
if (esc_html($_POST['serch_or_not']) == "search") {
|
1341 |
-
$serch_value = esc_html($_POST['search_events_by_title']);
|
1342 |
}
|
1343 |
-
|
1344 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1345 |
}
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1350 |
</div>
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
1357 |
-
|
1358 |
-
?>
|
1359 |
-
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
1360 |
-
<thead>
|
1361 |
-
<TR>
|
1362 |
-
<th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id")
|
1363 |
-
echo $sort["custom_style"];
|
1364 |
-
else echo $sort["default_style"]; ?>" style="width:110px"><a
|
1365 |
-
href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id")
|
1366 |
-
echo $sort["1_or_2"];
|
1367 |
-
else echo "1"; ?>)"><span>ID</span><span class="sorting-indicator"></span></a></th>
|
1368 |
-
<th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title")
|
1369 |
-
echo $sort["custom_style"];
|
1370 |
-
else echo $sort["default_style"]; ?>" style=""><a
|
1371 |
-
href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title")
|
1372 |
-
echo $sort["1_or_2"];
|
1373 |
-
else echo "1"; ?>)"><span>Title</span><span class="sorting-indicator"></span></a></th>
|
1374 |
-
<th scope="col" id="mail" class="<?php if ($sort["sortid_by"] == "mail")
|
1375 |
-
echo $sort["custom_style"];
|
1376 |
-
else echo $sort["default_style"]; ?>"><a href="javascript:ordering('mail',<?php if ($sort["sortid_by"] == "mail")
|
1377 |
-
echo $sort["1_or_2"];
|
1378 |
-
else echo "1"; ?>)"><span>Email to send submissions to</span><span class="sorting-indicator"></span></a></th>
|
1379 |
-
<th style="width:80px">Edit</th>
|
1380 |
-
<th style="width:80px">Delete</th>
|
1381 |
-
</TR>
|
1382 |
-
</thead>
|
1383 |
-
<tbody>
|
1384 |
-
<?php for ($i = 0; $i < count($rows); $i++) { ?>
|
1385 |
-
<tr>
|
1386 |
<?php
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
<td><?php if (!$old_version) { ?><a
|
1396 |
-
href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>"><?php echo $rows[$i]->id; ?></a><?php }
|
1397 |
-
else { ?> <p style="color:red; cursor:pointer; margin:0px"
|
1398 |
-
onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->id; ?></p><?php }?></td>
|
1399 |
-
<td><?php if (!$old_version) { ?><a
|
1400 |
-
href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>"><?php echo $rows[$i]->title; ?></a><?php }
|
1401 |
-
else { ?> <p style="color:red; cursor:pointer; margin:0px"
|
1402 |
-
onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->title; ?></p><?php }?></td>
|
1403 |
-
<td><?php echo $rows[$i]->mail; ?></td>
|
1404 |
-
<td><?php if (!$old_version) { ?><a href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>">Edit</a><?php }
|
1405 |
-
else { ?> <p style="color:red; cursor:pointer; margin:0px" onclick="alert('Update forms to new version!')">
|
1406 |
-
Edit</p><?php }?></td>
|
1407 |
-
<td><a
|
1408 |
-
href="javascript:confirmation('admin.php?page=Form_maker&task=remove_form&id=<?php echo $rows[$i]->id?>','<?php echo $rows[$i]->title; ?>')">Delete</a>
|
1409 |
-
</td>
|
1410 |
-
</tr>
|
1411 |
-
<?php } ?>
|
1412 |
-
</tbody>
|
1413 |
-
</table>
|
1414 |
-
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc']))
|
1415 |
-
echo esc_html($_POST['asc_or_desc']);?>"/>
|
1416 |
-
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by']))
|
1417 |
-
echo esc_html($_POST['order_by']);?>"/>
|
1418 |
-
|
1419 |
-
<?php
|
1420 |
-
?>
|
1421 |
-
|
1422 |
-
|
1423 |
-
</form>
|
1424 |
-
<?php
|
1425 |
-
}
|
1426 |
-
|
1427 |
-
function html_add_form($themes) {
|
1428 |
-
?>
|
1429 |
-
<script type="text/javascript">
|
1430 |
-
var thickDims, tbWidth, tbHeight;
|
1431 |
-
jQuery(document).ready(function ($) {
|
1432 |
-
thickDims = function () {
|
1433 |
-
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
1434 |
-
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
1435 |
-
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
1436 |
-
if (tbWindow.size()) {
|
1437 |
-
tbWindow.width(w).height(h);
|
1438 |
-
$('#TB_iframeContent').width(w).height(h - 27);
|
1439 |
-
tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'});
|
1440 |
-
if (typeof document.body.style.maxWidth != 'undefined')
|
1441 |
-
tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'});
|
1442 |
-
}
|
1443 |
-
};
|
1444 |
-
thickDims();
|
1445 |
-
$(window).resize(function () {
|
1446 |
-
thickDims()
|
1447 |
-
});
|
1448 |
-
|
1449 |
-
$('a.thickbox-preview').click(function () {
|
1450 |
-
tb_click.call(this);
|
1451 |
-
|
1452 |
-
var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
|
1453 |
-
|
1454 |
-
if (tbWidth = href.match(/&tbWidth=[0-9]+/))
|
1455 |
-
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
1456 |
-
else
|
1457 |
-
tbWidth = $(window).width() - 120;
|
1458 |
-
|
1459 |
-
if (tbHeight = href.match(/&tbHeight=[0-9]+/))
|
1460 |
-
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
1461 |
-
else
|
1462 |
-
tbHeight = $(window).height() - 120;
|
1463 |
-
|
1464 |
-
if (alink.length) {
|
1465 |
-
url = alink.attr('href') || '';
|
1466 |
-
text = alink.attr('title') || '';
|
1467 |
-
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
1468 |
-
} else {
|
1469 |
-
text = $(this).attr('title') || '';
|
1470 |
-
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
1471 |
-
}
|
1472 |
-
$('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'});
|
1473 |
-
$('#TB_closeAjaxWindow').css({'float':'left'});
|
1474 |
-
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
1475 |
-
$('#TB_iframeContent').width('100%');
|
1476 |
-
thickDims();
|
1477 |
-
return false;
|
1478 |
-
});
|
1479 |
-
|
1480 |
-
// Theme details
|
1481 |
-
$('.theme-detail').click(function () {
|
1482 |
-
$(this).siblings('.themedetaildiv').toggle();
|
1483 |
-
return false;
|
1484 |
-
});
|
1485 |
-
|
1486 |
-
});
|
1487 |
-
var already_submitted = false;
|
1488 |
-
function refresh_() {
|
1489 |
-
document.getElementById('form').value = document.getElementById('take').innerHTML;
|
1490 |
-
document.getElementById('counter').value = gen;
|
1491 |
-
n = gen;
|
1492 |
-
for (i = 0; i < n; i++) {
|
1493 |
-
if (document.getElementById(i)) {
|
1494 |
-
for (z = 0; z < document.getElementById(i).childNodes.length; z++)
|
1495 |
-
if (document.getElementById(i).childNodes[z].nodeType == 3)
|
1496 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
|
1497 |
-
if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
|
1498 |
-
if (document.getElementById(i).childNodes[10]) {
|
1499 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1500 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1501 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1502 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1503 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1504 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1505 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1506 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1507 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1508 |
}
|
1509 |
else {
|
1510 |
-
|
1511 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1512 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1513 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1514 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1515 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1516 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1517 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1518 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1519 |
}
|
1520 |
-
continue;
|
1521 |
}
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1528 |
}
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1535 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1536 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1537 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1538 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1539 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1540 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1541 |
}
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1546 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1547 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1548 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1549 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1550 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1551 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1552 |
}
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
case "type_number":
|
1562 |
-
case "type_password":
|
1563 |
-
case "type_submitter_mail":
|
1564 |
-
case "type_own_select":
|
1565 |
-
case "type_country":
|
1566 |
-
case "type_hidden":
|
1567 |
-
case "type_map":
|
1568 |
-
{
|
1569 |
-
remove_add_(i + "_elementform_id_temp");
|
1570 |
-
break;
|
1571 |
}
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
break;
|
1579 |
}
|
1580 |
-
|
1581 |
-
|
1582 |
-
{
|
1583 |
-
remove_add_("_wd_captchaform_id_temp");
|
1584 |
-
remove_add_("_element_refreshform_id_temp");
|
1585 |
-
remove_add_("_wd_captcha_inputform_id_temp");
|
1586 |
-
break;
|
1587 |
}
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
1592 |
-
document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
|
1593 |
-
document.getElementById("recaptcha_theme").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("theme");
|
1594 |
-
document.getElementById('wd_recaptchaform_id_temp').innerHTML = '';
|
1595 |
-
remove_add_("wd_recaptchaform_id_temp");
|
1596 |
-
break;
|
1597 |
}
|
1598 |
-
|
1599 |
-
|
1600 |
-
{
|
1601 |
-
remove_add_(i + "_elementform_id_temp");
|
1602 |
-
break;
|
1603 |
}
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
break;
|
1610 |
}
|
1611 |
-
|
1612 |
-
|
1613 |
-
{
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
remove_add_(i + "_element_firstform_id_temp");
|
1618 |
-
remove_add_(i + "_element_lastform_id_temp");
|
1619 |
-
remove_add_(i + "_element_middleform_id_temp");
|
1620 |
}
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
|
|
|
|
|
|
1625 |
}
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
break;
|
1649 |
-
|
1650 |
-
}
|
1651 |
-
|
1652 |
-
case "type_checkbox":
|
1653 |
-
case "type_radio":
|
1654 |
-
{
|
1655 |
-
is = true;
|
1656 |
-
for (j = 0; j < 100; j++)
|
1657 |
-
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1658 |
-
remove_add_(i + "_elementform_id_temp" + j);
|
1659 |
}
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
case "type_button":
|
1664 |
-
{
|
1665 |
-
for (j = 0; j < 100; j++)
|
1666 |
-
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1667 |
-
remove_add_(i + "_elementform_id_temp" + j);
|
1668 |
}
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
remove_add_(i + "_hhform_id_temp");
|
1678 |
}
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
|
|
|
|
|
|
|
|
|
|
1682 |
}
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
remove_add_(i + "_yearform_id_temp");
|
1698 |
-
break;
|
1699 |
-
}
|
1700 |
-
}
|
1701 |
-
}
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
for (i = 1; i <= form_view_max; i++)
|
1705 |
-
if (document.getElementById('form_id_tempform_view' + i)) {
|
1706 |
-
if (document.getElementById('page_next_' + i))
|
1707 |
-
document.getElementById('page_next_' + i).removeAttribute('src');
|
1708 |
-
if (document.getElementById('page_previous_' + i))
|
1709 |
-
document.getElementById('page_previous_' + i).removeAttribute('src');
|
1710 |
-
document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
|
1711 |
-
document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
|
1712 |
-
}
|
1713 |
-
|
1714 |
-
document.getElementById('form_front').value = document.getElementById('take').innerHTML;
|
1715 |
-
|
1716 |
-
}
|
1717 |
-
|
1718 |
-
function submitform(pressbutton) {
|
1719 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
1720 |
-
document.getElementById('adminForm').submit();
|
1721 |
-
}
|
1722 |
-
|
1723 |
-
|
1724 |
-
function submitbutton(pressbutton) {
|
1725 |
-
var form = document.adminForm;
|
1726 |
-
if (already_submitted) {
|
1727 |
-
submitform(pressbutton);
|
1728 |
-
return;
|
1729 |
-
}
|
1730 |
-
if (pressbutton == 'cancel') {
|
1731 |
-
submitform(pressbutton);
|
1732 |
-
return;
|
1733 |
-
}
|
1734 |
-
if (form.title.value == "") {
|
1735 |
-
alert("The form must have a title.");
|
1736 |
-
return;
|
1737 |
-
}
|
1738 |
-
tox = '';
|
1739 |
-
for (t = 1; t <= form_view_max; t++) {
|
1740 |
-
if (document.getElementById('form_id_tempform_view' + t)) {
|
1741 |
-
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
1742 |
-
n = form_view_element.childNodes.length - 2;
|
1743 |
-
|
1744 |
-
for (z = 0; z <= n; z++) {
|
1745 |
-
if (form_view_element.childNodes[z].nodeType != 3)
|
1746 |
-
if (!form_view_element.childNodes[z].id) {
|
1747 |
-
GLOBAL_tr = form_view_element.childNodes[z];
|
1748 |
-
//////////////////////////////////////////////////////////////////////////////////////////
|
1749 |
-
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
1750 |
-
table = GLOBAL_tr.firstChild.childNodes[x];
|
1751 |
-
tbody = table.firstChild;
|
1752 |
-
for (y = 0; y < tbody.childNodes.length; y++) {
|
1753 |
-
tr = tbody.childNodes[y];
|
1754 |
-
l_label = document.getElementById(tr.id + '_element_labelform_id_temp').innerHTML;
|
1755 |
-
l_label = l_label.replace(/(\r\n|\n|\r)/gm, " ");
|
1756 |
-
|
1757 |
-
if (tr.getAttribute('type') == "type_address") {
|
1758 |
-
addr_id = parseInt(tr.id);
|
1759 |
-
tox = tox + addr_id + '#**id**#' + 'Street Line' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1760 |
-
addr_id++;
|
1761 |
-
tox = tox + addr_id + '#**id**#' + 'Street Line2' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1762 |
-
addr_id++;
|
1763 |
-
tox = tox + addr_id + '#**id**#' + 'City' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1764 |
-
addr_id++;
|
1765 |
-
tox = tox + addr_id + '#**id**#' + 'State' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1766 |
-
addr_id++;
|
1767 |
-
tox = tox + addr_id + '#**id**#' + 'Postal' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1768 |
-
addr_id++;
|
1769 |
-
tox = tox + addr_id + '#**id**#' + 'Country' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1770 |
}
|
1771 |
-
|
1772 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1773 |
}
|
1774 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1775 |
}
|
|
|
1776 |
}
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
already_submitted = true;
|
1787 |
-
submitform(pressbutton);
|
1788 |
-
|
1789 |
-
}
|
1790 |
-
gen = 1;
|
1791 |
-
form_view = 1;
|
1792 |
-
form_view_max = 1;
|
1793 |
-
form_view_count = 1;
|
1794 |
-
|
1795 |
-
function set_preview() {
|
1796 |
-
appWidth = parseInt(document.body.offsetWidth);
|
1797 |
-
appHeight = parseInt(document.body.offsetHeight);
|
1798 |
-
document.getElementById('preview_form').href = '<?php echo admin_url('admin-ajax.php'); ?>?action=frommakerpreview&id=' + document.getElementById('theme').value + '&TB_iframe=1';
|
1799 |
}
|
1800 |
|
1801 |
-
|
1802 |
-
function
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
}
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
else {
|
1819 |
-
jQuery('#formMakerDiv').slideToggle(400);
|
1820 |
-
}
|
1821 |
-
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1822 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1823 |
-
}
|
1824 |
-
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1825 |
-
jQuery('#formMakerDiv1').slideToggle(200);
|
1826 |
-
}
|
1827 |
-
else {
|
1828 |
-
jQuery('#formMakerDiv1').slideToggle(400);
|
1829 |
-
}
|
1830 |
-
document.getElementById('when_edit').style.display = 'none';
|
1831 |
}
|
1832 |
|
1833 |
-
function
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
}
|
1838 |
-
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1839 |
-
jQuery('#formMakerDiv').slideToggle(200);
|
1840 |
-
}
|
1841 |
-
else {
|
1842 |
-
jQuery('#formMakerDiv').slideToggle(400);
|
1843 |
-
}
|
1844 |
-
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1845 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1846 |
-
}
|
1847 |
-
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1848 |
-
jQuery('#formMakerDiv1').slideToggle(200);
|
1849 |
-
}
|
1850 |
-
else {
|
1851 |
-
jQuery('#formMakerDiv1').slideToggle(400);
|
1852 |
-
}
|
1853 |
-
document.getElementById('when_edit').style.display = 'block';
|
1854 |
-
if (document.getElementById('field_types').offsetWidth)
|
1855 |
-
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
1856 |
-
if (document.getElementById('field_types').offsetHeight)
|
1857 |
-
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
1858 |
}
|
1859 |
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
if (typeof document.body.style.maxWidth != 'undefined')
|
1872 |
-
tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'});
|
1873 |
-
}
|
1874 |
-
};
|
1875 |
-
thickDims();
|
1876 |
-
$(window).resize(function () {
|
1877 |
-
thickDims()
|
1878 |
-
});
|
1879 |
-
$('a.thickbox-preview').click(function () {
|
1880 |
-
tb_click.call(this);
|
1881 |
-
var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
|
1882 |
-
if (tbWidth = href.match(/&tbWidth=[0-9]+/))
|
1883 |
-
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
1884 |
-
else
|
1885 |
-
tbWidth = $(window).width() - 120;
|
1886 |
-
|
1887 |
-
if (tbHeight = href.match(/&tbHeight=[0-9]+/))
|
1888 |
-
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
1889 |
-
else
|
1890 |
-
tbHeight = $(window).height() - 120;
|
1891 |
-
|
1892 |
-
if (alink.length) {
|
1893 |
-
url = alink.attr('href') || '';
|
1894 |
-
text = alink.attr('title') || '';
|
1895 |
-
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
1896 |
-
} else {
|
1897 |
-
text = $(this).attr('title') || '';
|
1898 |
-
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
1899 |
-
}
|
1900 |
-
$('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'});
|
1901 |
-
$('#TB_closeAjaxWindow').css({'float':'left'});
|
1902 |
-
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
1903 |
-
$('#TB_iframeContent').width('100%');
|
1904 |
-
thickDims();
|
1905 |
-
return false;
|
1906 |
-
});
|
1907 |
-
|
1908 |
-
// Theme details
|
1909 |
-
$('.theme-detail').click(function () {
|
1910 |
-
$(this).siblings('.themedetaildiv').toggle();
|
1911 |
-
return false;
|
1912 |
-
});
|
1913 |
-
|
1914 |
-
});
|
1915 |
-
|
1916 |
-
</script>
|
1917 |
-
<style>
|
1918 |
-
.calendar .button {
|
1919 |
-
display: table-cell !important;
|
1920 |
-
}
|
1921 |
-
#when_edit {
|
1922 |
-
position: absolute;
|
1923 |
-
background-color: #666;
|
1924 |
-
z-index: 101;
|
1925 |
-
display: none;
|
1926 |
-
width: 100%;
|
1927 |
-
height: 100%;
|
1928 |
-
opacity: 0.7;
|
1929 |
-
filter: alpha(opacity = 70);
|
1930 |
-
}
|
1931 |
-
#formMakerDiv {
|
1932 |
-
position: fixed;
|
1933 |
-
background-color: #666;
|
1934 |
-
z-index: 100;
|
1935 |
-
display: none;
|
1936 |
-
left: 0;
|
1937 |
-
top: 0;
|
1938 |
-
width: 100%;
|
1939 |
-
height: 100%;
|
1940 |
-
opacity: 0.7;
|
1941 |
-
filter: alpha(opacity = 70);
|
1942 |
-
}
|
1943 |
-
#formMakerDiv1 {
|
1944 |
-
padding-top: 15px;
|
1945 |
-
position: fixed;
|
1946 |
-
z-index: 100;
|
1947 |
-
background-color: transparent;
|
1948 |
-
top: 0;
|
1949 |
-
left: 0;
|
1950 |
-
display: none;
|
1951 |
-
margin-left: 30px;
|
1952 |
-
margin-top: 15px;
|
1953 |
-
}
|
1954 |
-
.formmaker_table input {
|
1955 |
-
border-radius: 3px;
|
1956 |
-
padding: 2px;
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
.formmaker_table {
|
1960 |
-
border-radius: 8px;
|
1961 |
-
border: 6px #00aeef solid;
|
1962 |
-
background-color: #00aeef;
|
1963 |
-
height: 120px;
|
1964 |
-
width: 98%;
|
1965 |
-
}
|
1966 |
-
</style>
|
1967 |
-
<?php
|
1968 |
-
foreach ($themes as $theme) {
|
1969 |
-
if ($theme->default == 1) {
|
1970 |
-
$my_selected_theme = $theme->id;
|
1971 |
}
|
1972 |
-
|
1973 |
-
|
|
|
|
|
1974 |
}
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
</td>
|
1997 |
-
</tr>
|
1998 |
-
</thead>
|
1999 |
-
<tr>
|
2000 |
-
<td width="100%"><?php echo "<h2>Form Maker</h2>"; ?></td>
|
2001 |
-
<td><a id="preview_form"
|
2002 |
-
href="<?php echo admin_url('admin-ajax.php') . '?action=frommakerpreview&id=' . $my_selected_theme . '&TB_iframe=1'; ?>"
|
2003 |
-
class="thickbox-preview" title="Form Preview" onclick="return false;"><input type="button" value="preview"
|
2004 |
-
class="button-primary"/></a>
|
2005 |
-
</td>
|
2006 |
-
<td><input type="button" onclick="submitbutton('form_options')" value="Form options" class="button-primary" /></td>
|
2007 |
-
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"/>
|
2008 |
-
</td>
|
2009 |
-
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply"
|
2010 |
-
class="button-secondary action"/></td>
|
2011 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=Form_maker'" value="Cancel"
|
2012 |
-
class="button-secondary action"/></td>
|
2013 |
-
</tr>
|
2014 |
-
</table>
|
2015 |
-
<br/>
|
2016 |
-
|
2017 |
-
<form action="admin.php?page=Form_maker" method="post" id="adminForm" name="adminForm" enctype="multipart/form-data">
|
2018 |
-
<div class="formmaker_table" width="100%">
|
2019 |
-
<div style="float:left; text-align:center">
|
2020 |
-
</br>
|
2021 |
-
<img src="<?php echo plugins_url("images/formmaker.png",__FILE__) ?>"/>
|
2022 |
-
</br>
|
2023 |
-
</br>
|
2024 |
-
<img src="<?php echo plugins_url("images/logo.png",__FILE__) ?>"/>
|
2025 |
-
</div>
|
2026 |
-
<div style="float:right">
|
2027 |
-
<span style="font-size:16.76pt; font-family:tahoma; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
2028 |
-
<input type="hidden" value="<?php echo plugins_url("",__FILE__) ?>" id="form_plugins_url" />
|
2029 |
-
<input id="title" name="title" style="width:160px; height:19px; border:none; font-size:11px;" value=""/>
|
2030 |
-
<br />
|
2031 |
-
<img src="<?php echo plugins_url("images/formoptions.png",__FILE__) ?>" onclick="submitbutton('form_options')" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
2032 |
-
<br />
|
2033 |
-
<br />
|
2034 |
<br />
|
2035 |
-
<
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
<
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
</tr>
|
2144 |
-
</table>
|
2145 |
</td>
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
<div id="main_editor"
|
2156 |
-
style="position:absolute; display:none; z-index:140;"><?php if (function_exists('the_editor') || function_exists('wp_editor')) {
|
2157 |
-
if (get_bloginfo('version') < '3.3') { ?>
|
2158 |
-
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
2159 |
-
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"
|
2160 |
-
class="postarea"><?php the_editor("", "form_maker_editor", "title", $media_buttons = TRUE, $tab_index = 1, $extended = TRUE); ?>
|
2161 |
-
</div>
|
2162 |
-
</div>
|
2163 |
-
|
2164 |
-
<?php
|
2165 |
-
}
|
2166 |
-
else {
|
2167 |
-
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>";
|
2168 |
-
wp_editor("", "form_maker_editor");
|
2169 |
-
}
|
2170 |
-
}
|
2171 |
-
else {
|
2172 |
-
?>
|
2173 |
-
<textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="6" style="width: 450px; height: 350px; "
|
2174 |
-
class="mce_editable" aria-hidden="true"></textarea>
|
2175 |
-
<?php
|
2176 |
-
}
|
2177 |
-
?></div>
|
2178 |
-
|
2179 |
-
|
2180 |
-
</div>
|
2181 |
-
|
2182 |
-
<?php if (!function_exists('the_editor'))
|
2183 |
-
?>
|
2184 |
-
<iframe id="tinymce" style="display:none"></iframe>
|
2185 |
-
|
2186 |
<?php
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
|
2191 |
-
|
2192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2193 |
|
2194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2195 |
|
2196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2197 |
|
2198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2199 |
|
2200 |
-
|
|
|
|
|
|
|
|
|
2201 |
|
2202 |
-
|
2203 |
-
|
|
|
2204 |
|
2205 |
-
|
2206 |
-
|
2207 |
-
<td align="center" width="90%" id="pages" show_title="false" show_numbers="true" type="none"></td>
|
2208 |
-
<td align="left" id="edit_page_navigation"></td>
|
2209 |
-
</tr>
|
2210 |
-
</table>
|
2211 |
-
<div id="take" class="main">
|
2212 |
-
<table cellpadding="4" cellspacing="0" class="wdform_table1" style="border-top:0px solid black;">
|
2213 |
-
<tbody id="form_id_tempform_view1" class="wdform_tbody1" page_title="Untitled page" next_title="Next"
|
2214 |
-
next_type="button" next_class="wdform_page_button" next_checkable="false" previous_title="Previous"
|
2215 |
-
previous_type="button" previous_class="wdform_page_button" previous_checkable="false">
|
2216 |
-
<tr class="wdform_tr1">
|
2217 |
-
<td class="wdform_td1">
|
2218 |
-
<table class="wdform_table2">
|
2219 |
-
<tbody class="wdform_tbody2"></tbody>
|
2220 |
-
</table>
|
2221 |
-
</td>
|
2222 |
-
</tr>
|
2223 |
-
<tr class="wdform_footer">
|
2224 |
-
<td colspan="100" valign="top">
|
2225 |
-
<table width="100%" style="padding-right:170px">
|
2226 |
-
<tbody>
|
2227 |
-
<tr id="form_id_temppage_nav1"></tr>
|
2228 |
-
</tbody>
|
2229 |
-
</table>
|
2230 |
-
</td>
|
2231 |
-
</tr>
|
2232 |
-
<tbody id="form_id_tempform_view_img1" style="float:right !important ;">
|
2233 |
-
<tr>
|
2234 |
-
<td width="0%"></td>
|
2235 |
-
<td align="right"><img src="<?php echo plugins_url("images/minus.png", __FILE__); ?>"
|
2236 |
-
title="Show or hide the page" class="page_toolbar" onclick="show_or_hide('1')"
|
2237 |
-
id="show_page_img_1"/></td>
|
2238 |
-
<td><img src="<?php echo plugins_url("images/page_delete.png", __FILE__); ?>" title="Delete the page"
|
2239 |
-
class="page_toolbar" onclick="remove_page('1')"/></td>
|
2240 |
-
<td><img src="<?php echo plugins_url("images/page_delete_all.png", __FILE__); ?>"
|
2241 |
-
title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all('1')"/></td>
|
2242 |
-
<td><img src="<?php echo plugins_url("images/page_edit.png", __FILE__); ?>" title="Edit the page"
|
2243 |
-
class="page_toolbar" onclick="edit_page_break('1')"/></td>
|
2244 |
-
</tr>
|
2245 |
-
</tbody>
|
2246 |
-
</table>
|
2247 |
-
</div>
|
2248 |
-
</fieldset>
|
2249 |
-
<input type="hidden" name="form_front" id="form_front"/>
|
2250 |
-
<input type="hidden" name="form" id="form"/>
|
2251 |
-
<input type="hidden" name="counter" id="counter"/>
|
2252 |
-
<input type="hidden" name="pagination" id="pagination"/>
|
2253 |
-
<input type="hidden" name="show_title" id="show_title"/>
|
2254 |
-
<input type="hidden" name="show_numbers" id="show_numbers"/>
|
2255 |
-
<input type="hidden" name="public_key" id="public_key"/>
|
2256 |
-
<input type="hidden" name="private_key" id="private_key"/>
|
2257 |
-
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme"/>
|
2258 |
-
<input type="hidden" name="script_mail" id="script_mail" value="%all%"/>
|
2259 |
-
<input type="hidden" name="script_mail_user" id="script_mail_user" value="%all%"/>
|
2260 |
-
<input type="hidden" name="label_order" id="label_order"/>
|
2261 |
-
<input type="hidden" name="label_order_current" id="label_order_current"/>
|
2262 |
-
<input type="hidden" name="option" value="com_formmaker"/>
|
2263 |
-
<input type="hidden" name="task" value=""/>
|
2264 |
-
</form>
|
2265 |
-
<script>
|
2266 |
-
plugin_url = document.getElementById('form_plugins_url').value;
|
2267 |
-
</script>
|
2268 |
-
<?php
|
2269 |
-
}
|
2270 |
|
2271 |
-
|
2272 |
-
|
2273 |
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
tbWidth = $(window).width() - 120;
|
2284 |
-
|
2285 |
-
if (tbHeight = href.match(/&tbHeight=[0-9]+/))
|
2286 |
-
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
2287 |
-
else
|
2288 |
-
tbHeight = $(window).height() - 120;
|
2289 |
-
|
2290 |
-
if (alink.length) {
|
2291 |
-
url = alink.attr('href') || '';
|
2292 |
-
text = alink.attr('title') || '';
|
2293 |
-
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
2294 |
-
} else {
|
2295 |
-
text = $(vvvv).attr('title') || '';
|
2296 |
-
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
2297 |
-
}
|
2298 |
|
2299 |
-
|
2300 |
-
|
2301 |
-
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
2302 |
|
2303 |
-
|
2304 |
-
thickDims();
|
2305 |
|
2306 |
-
|
2307 |
-
|
2308 |
|
|
|
|
|
2309 |
|
2310 |
-
|
2311 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
2312 |
-
document.getElementById('adminForm').submit();
|
2313 |
-
}
|
2314 |
-
function submitbutton(pressbutton) {
|
2315 |
-
if (!document.getElementById('araqel')) {
|
2316 |
-
alert('Please wait while page loading');
|
2317 |
-
return;
|
2318 |
-
}
|
2319 |
-
else if (document.getElementById('araqel').value == '0') {
|
2320 |
-
alert('Please wait while page loading');
|
2321 |
-
return;
|
2322 |
-
}
|
2323 |
-
var form = document.adminForm;
|
2324 |
|
2325 |
-
|
2326 |
|
2327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2328 |
|
2329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2330 |
|
2331 |
-
|
2332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2333 |
|
2334 |
-
|
2335 |
-
return;
|
2336 |
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2347 |
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
z++;
|
2375 |
-
l_id_removed[z] = false;
|
2376 |
-
z++;
|
2377 |
-
l_id_removed[z] = false;
|
2378 |
-
z++;
|
2379 |
-
l_id_removed[z] = false;
|
2380 |
-
z++;
|
2381 |
-
l_id_removed[z] = false;
|
2382 |
-
z++;
|
2383 |
-
l_id_removed[z] = false;
|
2384 |
-
}
|
2385 |
-
}
|
2386 |
}
|
2387 |
-
|
2388 |
-
|
2389 |
-
addr_id = parseInt(tr.id);
|
2390 |
-
tox = tox + addr_id + '#**id**#' + 'Street Line' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2391 |
-
addr_id++;
|
2392 |
-
tox = tox + addr_id + '#**id**#' + 'Street Line2' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2393 |
-
addr_id++;
|
2394 |
-
tox = tox + addr_id + '#**id**#' + 'City' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2395 |
-
addr_id++;
|
2396 |
-
tox = tox + addr_id + '#**id**#' + 'State' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2397 |
-
addr_id++;
|
2398 |
-
tox = tox + addr_id + '#**id**#' + 'Postal' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2399 |
-
addr_id++;
|
2400 |
-
tox = tox + addr_id + '#**id**#' + 'Country' + '#**label**#' + tr.getAttribute('type') + '#****#';
|
2401 |
}
|
2402 |
-
else
|
2403 |
-
tox = tox + l_id + '#**id**#' + l_label + '#**label**#' + l_type + '#****#';
|
2404 |
-
|
2405 |
-
|
2406 |
}
|
2407 |
}
|
2408 |
}
|
|
|
2409 |
}
|
2410 |
}
|
|
|
2411 |
}
|
2412 |
-
|
2413 |
-
|
2414 |
-
if (
|
2415 |
-
|
|
|
2416 |
}
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
}
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2431 |
}
|
2432 |
-
|
2433 |
-
if (node.childNodes[ttt].childNodes.length)
|
2434 |
-
remove_whitespace(node.childNodes[ttt]);
|
2435 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2436 |
}
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2458 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2459 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2460 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2461 |
}
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2472 |
}
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
}
|
2482 |
-
|
2483 |
-
|
2484 |
-
if (document.getElementById(i).childNodes[10]) {
|
2485 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2486 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2487 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2488 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2489 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2490 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2491 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2492 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2493 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2494 |
-
}
|
2495 |
-
else {
|
2496 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2497 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2498 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2499 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2500 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2501 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2502 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2503 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2504 |
-
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2505 |
-
}
|
2506 |
-
}
|
2507 |
-
}
|
2508 |
-
|
2509 |
-
for (i = 0; i <= n; i++) {
|
2510 |
-
if (document.getElementById(i)) {
|
2511 |
-
type = document.getElementById(i).getAttribute("type");
|
2512 |
-
switch (type) {
|
2513 |
-
case "type_text":
|
2514 |
-
case "type_number":
|
2515 |
-
case "type_password":
|
2516 |
-
case "type_submitter_mail":
|
2517 |
-
case "type_own_select":
|
2518 |
-
case "type_country":
|
2519 |
-
case "type_hidden":
|
2520 |
-
case "type_map":
|
2521 |
-
{
|
2522 |
-
remove_add_(i + "_elementform_id_temp");
|
2523 |
-
break;
|
2524 |
}
|
2525 |
-
|
2526 |
-
|
2527 |
-
{
|
2528 |
-
remove_add_(i + "_element_submitform_id_temp");
|
2529 |
-
if (document.getElementById(i + "_element_resetform_id_temp"))
|
2530 |
-
remove_add_(i + "_element_resetform_id_temp");
|
2531 |
-
break;
|
2532 |
}
|
2533 |
-
|
2534 |
-
|
2535 |
-
{
|
2536 |
-
remove_add_("_wd_captchaform_id_temp");
|
2537 |
-
remove_add_("_element_refreshform_id_temp");
|
2538 |
-
remove_add_("_wd_captcha_inputform_id_temp");
|
2539 |
-
break;
|
2540 |
}
|
2541 |
-
|
2542 |
-
|
2543 |
-
{
|
2544 |
-
document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
2545 |
-
document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
|
2546 |
-
document.getElementById("recaptcha_theme").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("theme");
|
2547 |
-
document.getElementById('wd_recaptchaform_id_temp').innerHTML = '';
|
2548 |
-
remove_add_("wd_recaptchaform_id_temp");
|
2549 |
-
break;
|
2550 |
}
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
break;
|
2557 |
}
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
remove_add_(i + "_elementform_id_temp");
|
2562 |
-
|
2563 |
-
break;
|
2564 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2565 |
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2574 |
}
|
2575 |
else {
|
2576 |
-
|
2577 |
-
remove_add_(i + "_element_lastform_id_temp");
|
2578 |
}
|
2579 |
-
break;
|
2580 |
-
|
2581 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2582 |
|
2583 |
-
|
2584 |
-
{
|
2585 |
-
|
2586 |
-
remove_add_(i + "_element_firstform_id_temp");
|
2587 |
-
remove_add_(i + "_element_lastform_id_temp");
|
2588 |
-
break;
|
2589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2590 |
}
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
break;
|
2601 |
}
|
2602 |
-
|
2603 |
-
|
2604 |
-
{
|
2605 |
-
is = true;
|
2606 |
-
for (j = 0; j < 100; j++)
|
2607 |
-
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
2608 |
-
remove_add_(i + "_elementform_id_temp" + j);
|
2609 |
-
}
|
2610 |
-
break;
|
2611 |
}
|
2612 |
-
|
2613 |
-
|
2614 |
-
{
|
2615 |
-
for (j = 0; j < 100; j++)
|
2616 |
-
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
2617 |
-
remove_add_(i + "_elementform_id_temp" + j);
|
2618 |
-
}
|
2619 |
-
break;
|
2620 |
}
|
2621 |
-
|
2622 |
-
|
2623 |
-
{
|
2624 |
-
if (document.getElementById(i + "_ssform_id_temp")) {
|
2625 |
-
remove_add_(i + "_ssform_id_temp");
|
2626 |
-
remove_add_(i + "_mmform_id_temp");
|
2627 |
-
remove_add_(i + "_hhform_id_temp");
|
2628 |
-
}
|
2629 |
-
else {
|
2630 |
-
remove_add_(i + "_mmform_id_temp");
|
2631 |
-
remove_add_(i + "_hhform_id_temp");
|
2632 |
-
|
2633 |
-
}
|
2634 |
-
break;
|
2635 |
-
|
2636 |
}
|
2637 |
-
|
2638 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2639 |
{
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
break;
|
2644 |
}
|
2645 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2646 |
{
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2651 |
}
|
2652 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2653 |
}
|
2654 |
-
}
|
2655 |
-
|
2656 |
-
for (i = 1; i <= form_view_max; i++) {
|
2657 |
-
if (document.getElementById('form_id_tempform_view' + i)) {
|
2658 |
-
if (document.getElementById('page_next_' + i))
|
2659 |
-
document.getElementById('page_next_' + i).removeAttribute('src');
|
2660 |
-
if (document.getElementById('page_previous_' + i))
|
2661 |
-
document.getElementById('page_previous_' + i).removeAttribute('src');
|
2662 |
-
|
2663 |
-
document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
|
2664 |
-
document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
|
2665 |
-
}
|
2666 |
-
}
|
2667 |
-
|
2668 |
-
|
2669 |
-
document.getElementById('form_front').value = document.getElementById('take').innerHTML;
|
2670 |
-
|
2671 |
-
}
|
2672 |
-
|
2673 |
-
function set_preview() {
|
2674 |
-
appWidth = parseInt(document.body.offsetWidth);
|
2675 |
-
appHeight = parseInt(document.body.offsetHeight);
|
2676 |
-
document.getElementById('preview_form').href = '<?php echo admin_url('admin-ajax.php'); ?>?action=frommakerpreview&id=' + document.getElementById('theme').value + '&TB_iframe=1';
|
2677 |
-
}
|
2678 |
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
|
|
|
|
|
|
|
|
|
|
2686 |
}
|
|
|
2687 |
}
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
|
2694 |
-
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
}
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
2724 |
-
}
|
2725 |
-
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
2726 |
-
jQuery('#formMakerDiv1').slideToggle(200);
|
2727 |
-
}
|
2728 |
-
else {
|
2729 |
-
jQuery('#formMakerDiv1').slideToggle(400);
|
2730 |
-
}
|
2731 |
-
document.getElementById('when_edit').style.display = 'block';
|
2732 |
-
if (document.getElementById('field_types').offsetWidth)
|
2733 |
-
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
2734 |
-
if (document.getElementById('field_types').offsetHeight) {
|
2735 |
-
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
2736 |
-
}
|
2737 |
-
}
|
2738 |
-
|
2739 |
-
var thickDims, tbWidth, tbHeight;
|
2740 |
-
jQuery(document).ready(function ($) {
|
2741 |
-
|
2742 |
-
thickDims = function () {
|
2743 |
-
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
2744 |
-
|
2745 |
-
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
2746 |
-
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
2747 |
-
|
2748 |
-
if (tbWindow.size()) {
|
2749 |
-
tbWindow.width(w).height(h);
|
2750 |
-
$('#TB_iframeContent').width(w).height(h - 27);
|
2751 |
-
tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'});
|
2752 |
-
if (typeof document.body.style.maxWidth != 'undefined')
|
2753 |
-
tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'});
|
2754 |
-
}
|
2755 |
-
};
|
2756 |
-
|
2757 |
-
thickDims();
|
2758 |
-
$(window).resize(function () {
|
2759 |
-
thickDims()
|
2760 |
-
});
|
2761 |
-
|
2762 |
-
$('a.thickbox-preview').click(function () {
|
2763 |
-
tb_click.call(this);
|
2764 |
-
|
2765 |
-
var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
|
2766 |
-
|
2767 |
-
if (tbWidth = href.match(/&tbWidth=[0-9]+/))
|
2768 |
-
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
2769 |
-
else
|
2770 |
-
tbWidth = $(window).width() - 120;
|
2771 |
-
|
2772 |
-
if (tbHeight = href.match(/&tbHeight=[0-9]+/))
|
2773 |
-
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
2774 |
-
else
|
2775 |
-
tbHeight = $(window).height() - 120;
|
2776 |
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
2784 |
-
}
|
2785 |
|
2786 |
-
$('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'});
|
2787 |
-
$('#TB_closeAjaxWindow').css({'float':'left'});
|
2788 |
-
$('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
2789 |
|
2790 |
-
|
2791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2792 |
|
2793 |
-
|
2794 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2795 |
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
|
|
|
|
2801 |
|
2802 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2803 |
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
display: none;
|
2814 |
-
width: 100%;
|
2815 |
-
height: 100%;
|
2816 |
-
opacity: 0.7;
|
2817 |
-
filter: alpha(opacity = 70);
|
2818 |
-
}
|
2819 |
-
#formMakerDiv {
|
2820 |
-
position: fixed;
|
2821 |
-
background-color: #666;
|
2822 |
-
z-index: 100;
|
2823 |
-
display: none;
|
2824 |
-
left: 0;
|
2825 |
-
top: 0;
|
2826 |
-
width: 100%;
|
2827 |
-
height: 100%;
|
2828 |
-
opacity: 0.7;
|
2829 |
-
filter: alpha(opacity = 70);
|
2830 |
-
}
|
2831 |
-
#formMakerDiv1 {
|
2832 |
-
padding-top: 15px;
|
2833 |
-
position: fixed;
|
2834 |
-
z-index: 100;
|
2835 |
-
background-color: transparent;
|
2836 |
-
top: 0;
|
2837 |
-
left: 0;
|
2838 |
-
display: none;
|
2839 |
-
margin-left: 30px;
|
2840 |
-
margin-top: 15px;
|
2841 |
-
}
|
2842 |
-
.formmaker_table input {
|
2843 |
-
border-radius: 3px;
|
2844 |
-
padding: 2px;
|
2845 |
-
}
|
2846 |
-
.formmaker_table {
|
2847 |
-
border-radius: 8px;
|
2848 |
-
border: 6px #00aeef solid;
|
2849 |
-
background-color: #00aeef;
|
2850 |
-
height: 120px;
|
2851 |
-
width: 98%;
|
2852 |
-
}
|
2853 |
-
.formMakerDiv1_table {
|
2854 |
-
border: 6px #00aeef solid;
|
2855 |
-
background-color: #FFF;
|
2856 |
-
border-radius: 8px;
|
2857 |
-
}
|
2858 |
-
</style>
|
2859 |
-
<div style="font-size:14px; font-weight:bold">
|
2860 |
-
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
2861 |
-
<br />
|
2862 |
-
This section allows you to add fields to your form.
|
2863 |
-
<a href="http://web-dorado.com/wordpress-form-maker-guide-4.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
2864 |
-
</div>
|
2865 |
-
<table width="95%">
|
2866 |
-
<thead>
|
2867 |
-
<tr>
|
2868 |
-
<td colspan="11">
|
2869 |
-
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%">
|
2870 |
-
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
2871 |
-
style="color:red; text-decoration:none;">
|
2872 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="www.web-dorado.com"
|
2873 |
-
width="215"><br>
|
2874 |
-
Get the full version
|
2875 |
-
</a>
|
2876 |
-
</div>
|
2877 |
-
</td>
|
2878 |
-
</tr>
|
2879 |
-
</thead>
|
2880 |
-
<tr>
|
2881 |
-
<td width="100%"><?php echo "<h2>Form Maker</h2>"; ?></td>
|
2882 |
-
<td><a id="preview_form"
|
2883 |
-
href="<?php echo admin_url('admin-ajax.php') . '?action=frommakerpreview&id=' . $row->theme . '&TB_iframe=1'; ?>"
|
2884 |
-
class="thickbox-preview" title="Form Preview" onclick="return false;"><input type="button" value="preview"
|
2885 |
-
class="button-primary"/></a>
|
2886 |
-
</td>
|
2887 |
-
<td><input type="button" onclick="submitbutton('form_options')" value="Form options" class="button-primary" /></td>
|
2888 |
-
<td style="width:300px"><input type="button" onclick="submitbutton('save_as_copy')" value="Save As Copy" class="button-secondary action" /> </td>
|
2889 |
-
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"/>
|
2890 |
-
</td>
|
2891 |
-
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply"
|
2892 |
-
class="button-secondary action"/></td>
|
2893 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=Form_maker'" value="Cancel"
|
2894 |
-
class="button-secondary action"/></td>
|
2895 |
-
</tr>
|
2896 |
-
</table>
|
2897 |
-
<br/>
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
<form action="admin.php?page=Form_maker&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm"
|
2902 |
-
enctype="multipart/form-data">
|
2903 |
-
<div class="formmaker_table" width="100%">
|
2904 |
-
<div style="float:left; text-align:center">
|
2905 |
-
</br>
|
2906 |
-
<img src="<?php echo plugins_url("images/formmaker.png",__FILE__) ?>"/>
|
2907 |
-
</br>
|
2908 |
-
</br>
|
2909 |
-
<img src="<?php echo plugins_url("images/logo.png",__FILE__) ?>"/>
|
2910 |
-
</div>
|
2911 |
-
<div style="float:right">
|
2912 |
-
<span style="font-size:16.76pt; font-family:tahoma; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
2913 |
-
<input id="title" name="title" style="width:160px; height:19px; border:none; font-size:11px;" value="<?php echo $row->title; ?>"/>
|
2914 |
-
<br />
|
2915 |
-
<img src="<?php echo plugins_url("images/formoptions.png",__FILE__) ?>" onclick="submitbutton('form_options')" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
2916 |
-
<br />
|
2917 |
-
<br />
|
2918 |
-
<br />
|
2919 |
-
<img src="<?php echo plugins_url("images/addanewfield.png",__FILE__) ?>" onclick="enable(); Enable()" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
2920 |
-
</div>
|
2921 |
-
</div>
|
2922 |
-
<div id="formMakerDiv" onclick="close_window()"></div>
|
2923 |
-
<div id="formMakerDiv1" style="padding-top:20px" align="center">
|
2924 |
|
|
|
|
|
|
|
2925 |
|
2926 |
-
|
2927 |
-
|
2928 |
-
<tr>
|
2929 |
-
<td style="padding:0px">
|
2930 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
2931 |
-
<tr valign="top">
|
2932 |
-
<td width="15%" height="100%" style="border-right:dotted black 1px;" id="field_types">
|
2933 |
-
<div id="when_edit" style="display:none"></div>
|
2934 |
-
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
2935 |
-
<tr>
|
2936 |
-
<td align="center" onClick="addRow('customHTML')" style="cursor:pointer" id="table_editor"
|
2937 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/customHTML.png", __FILE__) ?>"
|
2938 |
-
style="margin:5px" id="img_customHTML"/></td>
|
2939 |
-
|
2940 |
-
<td align="center" onClick="addRow('text')" style="cursor:pointer" id="table_text"
|
2941 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/text.png", __FILE__) ?>"
|
2942 |
-
style="margin:5px" id="img_text"/></td>
|
2943 |
-
</tr>
|
2944 |
-
<tr>
|
2945 |
-
<td align="center" onClick="addRow('time_and_date')" style="cursor:pointer" id="table_time_and_date"
|
2946 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/time_and_date.png", __FILE__) ?>"
|
2947 |
-
style="margin:5px" id="img_time_and_date"/></td>
|
2948 |
-
|
2949 |
-
<td align="center" onClick="addRow('select')" style="cursor:pointer" id="table_select"
|
2950 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/select.png", __FILE__) ?>"
|
2951 |
-
style="margin:5px" id="img_select"/></td>
|
2952 |
-
</tr>
|
2953 |
-
<tr>
|
2954 |
-
<td align="center" onClick="addRow('checkbox')" style="cursor:pointer" id="table_checkbox"
|
2955 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/checkbox.png", __FILE__) ?>"
|
2956 |
-
style="margin:5px" id="img_checkbox"/></td>
|
2957 |
-
|
2958 |
-
<td align="center" onClick="addRow('radio')" style="cursor:pointer" id="table_radio"
|
2959 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/radio.png", __FILE__) ?>"
|
2960 |
-
style="margin:5px" id="img_radio"/></td>
|
2961 |
-
</tr>
|
2962 |
-
<tr>
|
2963 |
-
<td align="center"
|
2964 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
2965 |
-
style="background-color: rgb(114, 113, 113) !important; cursor:pointer" id="table_file_upload"
|
2966 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/file_upload.png", __FILE__) ?>"
|
2967 |
-
style="margin:5px" id="img_file_upload"/></td>
|
2968 |
-
|
2969 |
-
<td align="center" onClick="addRow('captcha')" style="cursor:pointer" id="table_captcha"
|
2970 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/captcha.png", __FILE__) ?>"
|
2971 |
-
style="margin:5px" id="img_captcha"/></td>
|
2972 |
-
</tr>
|
2973 |
-
<tr>
|
2974 |
-
<td align="center" onClick="addRow('page_break')" style="cursor:pointer" id="table_page_break"
|
2975 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/page_break.png", __FILE__) ?>"
|
2976 |
-
style="margin:5px" id="img_page_break"/></td>
|
2977 |
-
|
2978 |
-
<td align="center" onClick="addRow('section_break')" style="cursor:pointer" id="table_section_break"
|
2979 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/section_break.png", __FILE__) ?>"
|
2980 |
-
style="margin:5px" id="img_section_break"/></td>
|
2981 |
-
</tr>
|
2982 |
-
<tr>
|
2983 |
-
<td align="center"
|
2984 |
-
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
2985 |
-
style="background-color: rgb(114, 113, 113) !important; cursor:pointer" id="table_map"
|
2986 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/map.png", __FILE__) ?>"
|
2987 |
-
style="margin:5px" id="img_map"/></td>
|
2988 |
-
<td align="center" onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" style="background-color: rgb(114, 113, 113) !important; id="table_paypal" class="field_buttons">
|
2989 |
-
<img src="<?php echo plugins_url("images/paypal.png",__FILE__) ?>" style="margin:5px" id="img_paypal"/>
|
2990 |
-
</td>
|
2991 |
-
</tr>
|
2992 |
-
<tr>
|
2993 |
-
<td align="center" onClick="addRow('button')" colspan=2 style="cursor:pointer" id="table_button"
|
2994 |
-
class="field_buttons"><img src="<?php echo plugins_url("images/button.png", __FILE__) ?>"
|
2995 |
-
style="margin:5px" id="img_button"/></td>
|
2996 |
-
</tr>
|
2997 |
-
</table>
|
2998 |
-
|
2999 |
-
</td>
|
3000 |
-
<td width="35%" height="100%" align="left">
|
3001 |
-
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:531px"></div>
|
3002 |
-
</td>
|
3003 |
-
|
3004 |
-
<td align="center" valign="top"
|
3005 |
-
style="background:url(<?php echo plugins_url("images/border2.png", __FILE__) ?>) repeat-y;"> </td>
|
3006 |
-
<td style="padding:15px">
|
3007 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
3008 |
-
|
3009 |
-
<tr>
|
3010 |
-
<td align="right"><input type="radio" value="end" name="el_pos" checked="checked" id="pos_end"
|
3011 |
-
onclick="Disable()"/>
|
3012 |
-
At The End
|
3013 |
-
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
3014 |
-
At The Beginning
|
3015 |
-
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
3016 |
-
Before
|
3017 |
-
<select style="width:100px; margin-left:5px" id="sel_el_pos" disabled="disabled">
|
3018 |
-
</select>
|
3019 |
-
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px"
|
3020 |
-
src="<?php echo plugins_url("images/save.png", __FILE__) ?>" onClick="add(0)"/>
|
3021 |
-
<img alt="CANCEL" title="cancel" style=" cursor:pointer; vertical-align:middle; margin:5px"
|
3022 |
-
src="<?php echo plugins_url("images/cancel_but.png", __FILE__) ?>" onClick="close_window()"/>
|
3023 |
-
|
3024 |
-
<hr style=" margin-bottom:10px"/>
|
3025 |
-
</td>
|
3026 |
-
</tr>
|
3027 |
-
|
3028 |
-
<tr height="100%" valign="top">
|
3029 |
-
<td id="show_table"></td>
|
3030 |
-
</tr>
|
3031 |
-
|
3032 |
-
</table>
|
3033 |
-
</td>
|
3034 |
-
</tr>
|
3035 |
-
</table>
|
3036 |
-
</td>
|
3037 |
-
</tr>
|
3038 |
-
</table>
|
3039 |
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
<input type="hidden" id="editing_id"/>
|
3044 |
-
<input type="hidden" value="<?php echo plugins_url("", __FILE__) ?>" id="form_plugins_url"/>
|
3045 |
|
3046 |
-
|
3047 |
-
|
3048 |
-
if (get_bloginfo('version') < '3.3') {
|
3049 |
-
?>
|
3050 |
-
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
3051 |
-
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"
|
3052 |
-
class="postarea"><?php the_editor("", "form_maker_editor", "title", $media_buttons = TRUE, $tab_index = 1, $extended = TRUE); ?>
|
3053 |
-
</div>
|
3054 |
-
</div>
|
3055 |
-
<?php
|
3056 |
-
}
|
3057 |
-
else {
|
3058 |
-
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>";
|
3059 |
-
wp_editor("", "form_maker_editor");
|
3060 |
-
}
|
3061 |
-
}
|
3062 |
-
else {
|
3063 |
-
?>
|
3064 |
-
<textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="6" style="width: 440px; height: 350px; "
|
3065 |
-
class="mce_editable" aria-hidden="true"></textarea>
|
3066 |
-
<?php
|
3067 |
-
}
|
3068 |
-
?></div>
|
3069 |
-
</div>
|
3070 |
|
3071 |
-
|
3072 |
-
|
3073 |
-
<iframe id="tinymce" style="display:none"></iframe>
|
3074 |
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3078 |
|
|
|
3079 |
|
|
|
|
|
3080 |
|
3081 |
-
|
3082 |
-
|
|
|
3083 |
|
3084 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3085 |
|
3086 |
-
|
3087 |
|
3088 |
-
<h2 style="color:#00aeef">Form</h2>
|
3089 |
|
3090 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3091 |
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3095 |
|
3096 |
-
|
3097 |
-
|
3098 |
-
<tr id="page_navigation">
|
3099 |
-
<td align="center" width="90%" id="pages" show_title="<?php echo $row->show_title; ?>"
|
3100 |
-
show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>"></td>
|
3101 |
-
<td align="left" id="edit_page_navigation"></td>
|
3102 |
-
</tr>
|
3103 |
-
</table>
|
3104 |
-
<div id="take"><?php
|
3105 |
-
|
3106 |
-
if ($row->form)
|
3107 |
-
echo $row->form;
|
3108 |
-
else
|
3109 |
-
|
3110 |
-
echo '<table border="0" cellpadding="4" cellspacing="0" class="wdform_table1" width="100%" style="border-top:0px solid black;"><tbody id="form_view1" style="float:left;" page_title="Untitled page" next_title="Next" next_type="button" next_class="" next_checkable="true" previous_title="Previous" previous_type="button" previous_class="" previous_checkable="true"><tr><td valign="top"><table class="wdform_table2"><tbody></tbody></table></td></tr><tr><td colspan="100" valign="top"><table width="100%" style="padding-right:170px"><tbody><tr id="page_nav1"></tr></tbody></table></td></tr><tbody id="form_view_img1" style="float:right ;display:none" ><tr><td width="0%"></td><td align="right"><img src="' . plugins_url("images/minus.png", __FILE__) . '" title="Show or hide the page" class="page_toolbar" onclick="show_or_hide("1")" id="show_page_img_1" /></td><td><img src="' . plugins_url("images/page_delete.png", __FILE__) . '" title="Delete the page" class="page_toolbar" onclick="remove_page("1")" /></td><td><img src="' . plugins_url("images/page_delete_all.png", __FILE__) . '" title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all("1")" /></td><td><img src="' . plugins_url("images/page_edit.png", __FILE__) . '" title="Edit the page" class="page_toolbar" onclick="edit_page_break("1")" /></td></tr></tbody></table>';
|
3111 |
-
?></div>
|
3112 |
-
</fieldset>
|
3113 |
-
<input type="hidden" name="form" id="form">
|
3114 |
-
<input type="hidden" name="form_front" id="form_front">
|
3115 |
-
<input type="hidden" name="pagination" id="pagination"/>
|
3116 |
-
<input type="hidden" name="show_title" id="show_title"/>
|
3117 |
-
<input type="hidden" name="show_numbers" id="show_numbers"/>
|
3118 |
-
<input type="hidden" name="public_key" id="public_key"/>
|
3119 |
-
<input type="hidden" name="private_key" id="private_key"/>
|
3120 |
-
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme"/>
|
3121 |
-
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order;?>"/>
|
3122 |
-
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter;?>">
|
3123 |
-
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current;?>"/>
|
3124 |
-
<script type="text/javascript">
|
3125 |
-
|
3126 |
-
function formOnload() {
|
3127 |
-
//enable maps
|
3128 |
-
for (t = 0; t <<?php echo $row->counter;?>; t++)
|
3129 |
-
if (document.getElementById(t + "_typeform_id_temp")) {
|
3130 |
-
if (document.getElementById(t + "_typeform_id_temp").value == "type_map" || document.getElementById(t + "_typeform_id_temp").value == "type_mark_map") {
|
3131 |
-
if_gmap_init(t);
|
3132 |
-
for (q = 0; q < 20; q++)
|
3133 |
-
if (document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q)) {
|
3134 |
-
|
3135 |
-
w_long = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q));
|
3136 |
-
w_lat = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("lat" + q));
|
3137 |
-
w_info = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("info" + q));
|
3138 |
-
add_marker_on_map(t, q, w_long, w_lat, w_info, false);
|
3139 |
-
}
|
3140 |
-
}
|
3141 |
-
else if (document.getElementById(t + "_typeform_id_temp").value == "type_date")
|
3142 |
-
Calendar.setup({
|
3143 |
-
inputField:t + "_elementform_id_temp",
|
3144 |
-
ifFormat:document.getElementById(t + "_buttonform_id_temp").getAttribute('format'),
|
3145 |
-
button:t + "_buttonform_id_temp",
|
3146 |
-
align:"Tl",
|
3147 |
-
singleClick:true,
|
3148 |
-
firstDay:0
|
3149 |
-
});
|
3150 |
|
3151 |
-
|
3152 |
|
|
|
|
|
|
|
|
|
3153 |
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
|
|
|
|
|
|
|
|
|
|
3160 |
}
|
3161 |
-
}
|
3162 |
|
3163 |
-
if (form_view_count > 1) {
|
3164 |
for (i = 1; i <= form_view_max; i++) {
|
3165 |
if (document.getElementById('form_id_tempform_view' + i)) {
|
3166 |
-
|
3167 |
-
|
|
|
|
|
|
|
|
|
|
|
3168 |
}
|
3169 |
}
|
3170 |
-
form_view = form_view_max;
|
3171 |
-
|
3172 |
-
generate_page_nav(first_form_view);
|
3173 |
-
|
3174 |
-
var img_EDIT = document.createElement("img");
|
3175 |
-
img_EDIT.setAttribute("src", "<?php echo plugins_url('', __FILE__) ?>/images/edit.png");
|
3176 |
-
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
3177 |
-
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
3178 |
-
|
3179 |
-
var td_EDIT = document.getElementById("edit_page_navigation");
|
3180 |
-
td_EDIT.appendChild(img_EDIT);
|
3181 |
-
|
3182 |
-
document.getElementById('page_navigation').appendChild(td_EDIT);
|
3183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3185 |
}
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
if (formOldFunctionOnLoad) {
|
3191 |
-
formOldFunctionOnLoad();
|
3192 |
}
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3227 |
}
|
3228 |
|
|
|
3229 |
function html_form_options($row, $themes) {
|
3230 |
$label_id = array();
|
3231 |
$label_label = array();
|
@@ -3367,12 +3728,12 @@ function html_form_options($row, $themes) {
|
|
3367 |
var thickDims, tbWidth, tbHeight;
|
3368 |
jQuery(document).ready(function($) {
|
3369 |
thickDims = function() {
|
3370 |
-
var tbWindow =
|
3371 |
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
3372 |
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
3373 |
if (tbWindow.size()) {
|
3374 |
tbWindow.width(w).height(h);
|
3375 |
-
|
3376 |
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
3377 |
if (typeof document.body.style.maxWidth != 'undefined') {
|
3378 |
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
@@ -3380,21 +3741,21 @@ function html_form_options($row, $themes) {
|
|
3380 |
}
|
3381 |
};
|
3382 |
thickDims();
|
3383 |
-
|
3384 |
-
|
3385 |
tb_click.call(this);
|
3386 |
-
var alink =
|
3387 |
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
3388 |
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
3389 |
}
|
3390 |
else {
|
3391 |
-
tbWidth =
|
3392 |
}
|
3393 |
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
3394 |
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
3395 |
}
|
3396 |
else {
|
3397 |
-
tbHeight =
|
3398 |
}
|
3399 |
if (alink.length) {
|
3400 |
url = alink.attr('href') || '';
|
@@ -3402,19 +3763,19 @@ function html_form_options($row, $themes) {
|
|
3402 |
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
3403 |
}
|
3404 |
else {
|
3405 |
-
text =
|
3406 |
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
3407 |
}
|
3408 |
-
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
thickDims();
|
3413 |
return false;
|
3414 |
});
|
3415 |
// Theme details.
|
3416 |
-
|
3417 |
-
|
3418 |
return false;
|
3419 |
});
|
3420 |
});
|
@@ -3723,7 +4084,7 @@ function html_form_options($row, $themes) {
|
|
3723 |
<label for="mail">Email to send submissions to</label>
|
3724 |
</td>
|
3725 |
<td>
|
3726 |
-
<input id="mail" name="mail" value="<?php echo $row->mail ?>" style="width:250px;"/>
|
3727 |
</td>
|
3728 |
</tr>
|
3729 |
<tr valign="top">
|
1 |
<?php
|
2 |
|
3 |
+
if(!current_user_can('manage_options')) {
|
4 |
+
die('Access Denied');
|
5 |
}
|
6 |
+
|
7 |
function html_update_form_maker($row, $labels, $themes) {
|
8 |
+
$form_file_url = plugins_url('', __FILE__);
|
9 |
@session_start();
|
10 |
$all_updates = $_SESSION['all_updates'];
|
11 |
$current_updates = $_SESSION['current_updates'] - 1;
|
12 |
$perc = (int)(($current_updates / $all_updates) * 100);
|
13 |
+
?>
|
14 |
+
<br />
|
15 |
+
<br />
|
16 |
+
<style>
|
17 |
+
.calendar .button {
|
18 |
+
display: table-cell !important;
|
19 |
+
}
|
20 |
+
.big_div {
|
21 |
+
width:100%;
|
22 |
+
background-color: transparent;
|
23 |
+
height: 40px;
|
24 |
+
border-radius: 20px;
|
25 |
+
border: 6px #00AEEF solid;
|
26 |
+
text-align: center !important;
|
27 |
+
}
|
28 |
+
.small_div {
|
29 |
+
background-color: #00AEEF;
|
30 |
+
height: 40px;
|
31 |
+
border-radius: 12px;
|
32 |
+
text-align: right;
|
33 |
+
float: left;
|
34 |
+
}
|
35 |
+
.progress_span {
|
36 |
+
padding-right: 10px;
|
37 |
+
line-height: 40px;
|
38 |
+
color: #000 !important;
|
39 |
+
font-size: 20px;
|
40 |
+
}
|
41 |
+
.forms_span {
|
42 |
+
padding-right: 10px;
|
43 |
+
line-height: 20px;
|
44 |
+
font-size: 12px;
|
45 |
+
font-style: italic;
|
46 |
+
color: #999 !important;
|
47 |
+
}
|
48 |
+
</style>
|
49 |
+
<div style="" class="big_div">
|
50 |
+
<div style="width:<?php echo $perc ?>%;" class="small_div">
|
51 |
+
<span class="progress_span"><?php echo $perc ?>%</span>
|
52 |
+
</div>
|
53 |
+
<span class="forms_span"> Updated forms <?php echo $current_updates ?></br> Forms remaining <b style="color:red"><?php echo $all_updates-$current_updates?></b> </span>
|
54 |
+
</div>
|
55 |
+
<br />
|
56 |
+
<script type="text/javascript">
|
57 |
+
count_of_filds_form = 10000;
|
58 |
+
function submitbutton (pressbutton) {
|
59 |
+
var form = document.adminForm;
|
60 |
+
tox = '';
|
61 |
+
for (t = 1; t <= form_view_max; t++) {
|
62 |
+
if (document.getElementById('form_id_tempform_view'+t)) {
|
63 |
+
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
64 |
+
n = form_view_element.childNodes.length - 2;
|
65 |
+
for (z = 0; z <= n; z++) {
|
66 |
+
if (form_view_element.childNodes[z].nodeType != 3) {
|
67 |
+
if (!form_view_element.childNodes[z].id) {
|
68 |
+
GLOBAL_tr = form_view_element.childNodes[z];
|
69 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
70 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
71 |
+
tbody = table.firstChild;
|
72 |
+
for (y = 0; y < tbody.childNodes.length; y++) {
|
73 |
+
tr = tbody.childNodes[y];
|
74 |
+
l_label = document.getElementById( tr.id + '_element_labelform_id_temp').innerHTML;
|
75 |
+
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
76 |
+
if (tr.getAttribute('type') == "type_address") {
|
77 |
+
addr_id = parseInt(tr.id);
|
78 |
+
tox = tox+addr_id+'#**id**#'+'Street Line'+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
79 |
+
tox = tox+addr_id+'#**id**#'+'Street Line2'+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
80 |
+
tox = tox+addr_id+'#**id**#'+'City'+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
81 |
+
tox = tox+addr_id+'#**id**#'+'State'+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
82 |
+
tox = tox+addr_id+'#**id**#'+'Postal'+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
83 |
+
tox = tox+addr_id+'#**id**#'+'Country'+'#**label**#'+tr.getAttribute('type')+'#****#';
|
84 |
+
}
|
85 |
+
else {
|
86 |
+
tox=tox+tr.id+'#**id**#'+l_label+'#**label**#'+tr.getAttribute('type')+'#****#';
|
87 |
+
}
|
88 |
+
}
|
|
|
|
|
|
|
|
|
89 |
}
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
}
|
93 |
+
}
|
94 |
}
|
95 |
+
document.getElementById('label_order').value = tox;
|
96 |
+
refresh_();
|
97 |
+
document.getElementById('pagination').value = document.getElementById('pages').getAttribute("type");
|
98 |
+
document.getElementById('show_title').value = document.getElementById('pages').getAttribute("show_title");
|
99 |
+
document.getElementById('show_numbers').value = document.getElementById('pages').getAttribute("show_numbers");
|
100 |
+
submitform( pressbutton );
|
101 |
}
|
102 |
+
function submitform(pressbutton) {
|
103 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
104 |
+
document.getElementById('adminForm').submit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
+
function remove_whitespace(node) {
|
107 |
+
for (ttt = 0; ttt < node.childNodes.length; ttt++) {
|
108 |
+
if (node.childNodes[ttt].nodeType == '3') {
|
109 |
+
if (!node.childNodes[ttt]) {
|
110 |
+
node.removeChild(node.childNodes[ttt]);
|
111 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
else {
|
114 |
+
if (node.childNodes[ttt].childNodes.length) {
|
115 |
+
remove_whitespace(node.childNodes[ttt]);
|
116 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
+
return;
|
120 |
}
|
121 |
+
function refresh_() {
|
122 |
+
document.getElementById('form').value = document.getElementById('take').innerHTML;
|
123 |
+
gen = document.getElementById('counter').value;
|
124 |
+
n = gen;
|
125 |
+
for (i = 0; i < n; i++) {
|
126 |
+
if (document.getElementById(i)) {
|
127 |
+
for (z = 0; z < document.getElementById(i).childNodes.length; z++) {
|
128 |
+
if (document.getElementById(i).childNodes[z].nodeType == 3) {
|
129 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
|
130 |
+
}
|
131 |
+
}
|
132 |
+
if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
|
133 |
+
if (document.getElementById(i).childNodes[10]) {
|
134 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
135 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
136 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
137 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
138 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
139 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
140 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
141 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
142 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
143 |
+
}
|
144 |
+
else {
|
145 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
146 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
147 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
148 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
149 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
150 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
151 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
152 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
153 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
154 |
+
}
|
155 |
+
continue;
|
156 |
+
}
|
157 |
+
if (document.getElementById(i).childNodes[10]) {
|
158 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
159 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
160 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
161 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
162 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
163 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
164 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
165 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
166 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
else {
|
169 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
170 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
171 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
172 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
173 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
174 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
175 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
176 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
177 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
178 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
+
}
|
181 |
+
for (i = 0; i <= n; i++) {
|
182 |
+
if (document.getElementById(i)) {
|
183 |
+
type = document.getElementById(i).getAttribute("type");
|
184 |
+
switch(type) {
|
185 |
+
case "type_text":
|
186 |
+
case "type_number":
|
187 |
+
case "type_password":
|
188 |
+
case "type_submitter_mail":
|
189 |
+
case "type_own_select":
|
190 |
+
case "type_country":
|
191 |
+
case "type_hidden":
|
192 |
+
case "type_map": {
|
193 |
+
remove_add_(i+"_elementform_id_temp");
|
194 |
+
break;
|
195 |
+
}
|
196 |
+
case "type_submit_reset": {
|
197 |
+
remove_add_(i + "_element_submitform_id_temp");
|
198 |
+
if (document.getElementById(i + "_element_resetform_id_temp")) {
|
199 |
+
remove_add_(i + "_element_resetform_id_temp");
|
200 |
+
}
|
201 |
+
break;
|
202 |
}
|
203 |
+
case "type_captcha": {
|
204 |
+
remove_add_("_wd_captchaform_id_temp");
|
205 |
+
remove_add_("_element_refreshform_id_temp");
|
206 |
+
remove_add_("_wd_captcha_inputform_id_temp");
|
207 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
}
|
209 |
+
case "type_file_upload": {
|
210 |
+
remove_add_(i + "_elementform_id_temp");
|
211 |
+
break;
|
212 |
+
}
|
213 |
+
case "type_textarea": {
|
214 |
+
remove_add_(i + "_elementform_id_temp");
|
215 |
+
break;
|
216 |
+
}
|
217 |
+
case "type_name": {
|
218 |
+
if (document.getElementById(i + "_element_titleform_id_temp")) {
|
219 |
+
remove_add_(i + "_element_titleform_id_temp");
|
220 |
+
remove_add_(i + "_element_firstform_id_temp");
|
221 |
+
remove_add_(i + "_element_lastform_id_temp");
|
222 |
+
remove_add_(i + "_element_middleform_id_temp");
|
223 |
+
}
|
224 |
+
else {
|
225 |
+
remove_add_(i + "_element_firstform_id_temp");
|
226 |
+
remove_add_(i + "_element_lastform_id_temp");
|
227 |
+
}
|
228 |
+
break;
|
229 |
+
}
|
230 |
+
case "type_phone": {
|
231 |
+
remove_add_(i + "_element_firstform_id_temp");
|
232 |
+
remove_add_(i + "_element_lastform_id_temp");
|
233 |
+
break;
|
234 |
+
}
|
235 |
+
case "type_address": {
|
236 |
+
remove_add_(i + "_street1form_id_temp");
|
237 |
+
remove_add_(i + "_street2form_id_temp");
|
238 |
+
remove_add_(i + "_cityform_id_temp");
|
239 |
+
remove_add_(i + "_stateform_id_temp");
|
240 |
+
remove_add_(i + "_postalform_id_temp");
|
241 |
+
remove_add_(i + "_countryform_id_temp");
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
case "type_checkbox":
|
245 |
+
case "type_radio": {
|
246 |
+
is = true;
|
247 |
+
for (j = 0; j < 100; j++) {
|
248 |
+
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
249 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
250 |
+
}
|
251 |
+
}
|
252 |
+
break;
|
253 |
+
}
|
254 |
+
case "type_button": {
|
255 |
+
for (j = 0; j < 100; j++) {
|
256 |
+
if(document.getElementById(i+"_elementform_id_temp"+j)) {
|
257 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
258 |
+
}
|
259 |
+
}
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
case "type_time": {
|
263 |
+
if (document.getElementById(i + "_ssform_id_temp")) {
|
264 |
+
remove_add_(i + "_ssform_id_temp");
|
265 |
+
remove_add_(i + "_mmform_id_temp");
|
266 |
+
remove_add_(i + "_hhform_id_temp");
|
267 |
+
}
|
268 |
+
else {
|
269 |
+
remove_add_(i + "_mmform_id_temp");
|
270 |
+
remove_add_(i + "_hhform_id_temp");
|
271 |
+
}
|
272 |
+
break;
|
273 |
+
}
|
274 |
+
case "type_date": {
|
275 |
+
remove_add_(i + "_elementform_id_temp");
|
276 |
+
remove_add_(i + "_buttonform_id_temp");
|
277 |
+
break;
|
278 |
+
}
|
279 |
+
case "type_date_fields": {
|
280 |
+
remove_add_(i + "_dayform_id_temp");
|
281 |
+
remove_add_(i + "_monthform_id_temp");
|
282 |
+
remove_add_(i + "_yearform_id_temp");
|
283 |
+
break;
|
284 |
+
}
|
285 |
+
}
|
286 |
}
|
287 |
+
}
|
288 |
+
for (i = 1; i <= form_view_max; i++) {
|
289 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
290 |
+
if (document.getElementById('page_next_' + i)) {
|
291 |
+
document.getElementById('page_next_' + i).removeAttribute('src');
|
|
|
|
|
292 |
}
|
293 |
+
if (document.getElementById('page_previous_' + i)) {
|
294 |
+
document.getElementById('page_previous_' + i).removeAttribute('src');
|
|
|
|
|
295 |
}
|
296 |
+
document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
|
297 |
+
document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
}
|
300 |
+
for (t = 1;t <= form_view_max; t++) {
|
301 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
302 |
+
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
303 |
+
n = form_view_element.childNodes.length - 2;
|
304 |
+
for (q = 0; q <= n; q++) {
|
305 |
+
if (form_view_element.childNodes[q]) {
|
306 |
+
if(form_view_element.childNodes[q].nodeType != 3) {
|
307 |
+
if(!form_view_element.childNodes[q].id) {
|
308 |
+
del = true;
|
309 |
+
GLOBAL_tr = form_view_element.childNodes[q];
|
310 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
311 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
312 |
+
tbody = table.firstChild;
|
313 |
+
if (tbody.childNodes.length) {
|
314 |
+
del = false;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
if (del) {
|
318 |
+
form_view_element.removeChild(form_view_element.childNodes[q]);
|
319 |
+
}
|
320 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
}
|
|
|
322 |
}
|
323 |
+
}
|
324 |
+
}
|
325 |
}
|
326 |
+
document.getElementById('form_front').value = document.getElementById('take').innerHTML;
|
327 |
}
|
328 |
+
// Add main form id.
|
329 |
+
gen=<?php echo $row->counter; ?>;
|
330 |
+
function enable() {
|
331 |
+
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
332 |
+
if (document.getElementsByTagName("iframe")[iiiii]) {
|
333 |
+
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
334 |
+
id_ifr_editor = iiiii;
|
335 |
+
break;
|
336 |
+
}
|
337 |
+
}
|
|
|
|
|
|
|
|
|
|
|
338 |
}
|
339 |
+
alltypes = Array('customHTML','text','checkbox','radio','time_and_date','select','file_upload','captcha','map','button','page_break','section_break');
|
340 |
+
for (x = 0; x < 12; x++) {
|
341 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo $form_file_url; ?>/images/" + alltypes[x] + ".png";
|
342 |
+
}
|
343 |
+
document.getElementById('formMakerDiv').style.display = (document.getElementById('formMakerDiv').style.display == 'block' ? 'none' : 'block');
|
344 |
+
document.getElementById('formMakerDiv1').style.display = (document.getElementById('formMakerDiv1').style.display == 'block' ? 'none' : 'block');
|
345 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
346 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
}
|
348 |
+
document.getElementById('when_edit').style.display = 'none';
|
349 |
}
|
350 |
+
function enable2() {
|
351 |
+
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
352 |
+
if (document.getElementsByTagName("iframe")[iiiii]) {
|
353 |
+
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
354 |
+
id_ifr_editor = iiiii;
|
355 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
357 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
}
|
359 |
+
alltypes = Array('customHTML','text','checkbox','radio','time_and_date','select','file_upload','captcha','map','button','page_break','section_break');
|
360 |
+
for (x = 0; x < 12; x++) {
|
361 |
+
document.getElementById('img_'+alltypes[x]).src = "<?php echo $form_file_url; ?>/images/" + alltypes[x] + ".png";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
+
document.getElementById('formMakerDiv').style.display = (document.getElementById('formMakerDiv').style.display == 'block' ? 'none' : 'block');
|
364 |
+
document.getElementById('formMakerDiv1').style.display =(document.getElementById('formMakerDiv1').style.display == 'block' ? 'none' : 'block');
|
365 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
366 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
367 |
}
|
368 |
+
document.getElementById('when_edit').style.display = 'block';
|
369 |
+
if (document.getElementById('field_types').offsetWidth) {
|
370 |
+
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
371 |
}
|
372 |
+
if (document.getElementById('field_types').offsetHeight) {
|
373 |
+
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
}
|
376 |
+
function set_preview() {
|
377 |
+
appWidth = parseInt(document.body.offsetWidth);
|
378 |
+
appHeight = parseInt(document.body.offsetHeight);
|
379 |
+
//document.getElementById('toolbar-popup-preview').childNodes[1].href='index.php?option=com_formmaker&task=preview&tmpl=component&theme='+document.getElementById('theme').value;
|
380 |
+
//document.getElementById('toolbar-popup-preview').childNodes[1].setAttribute('rel',"{handler: 'iframe', size: {x:"+(appWidth-100)+", y: "+531+"}}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
}
|
382 |
+
</script>
|
383 |
+
<style>
|
384 |
+
#when_edit {
|
385 |
+
position:absolute;
|
386 |
+
background-color:#666;
|
387 |
+
z-index:101;
|
388 |
+
display:none;
|
389 |
+
width:100%;
|
390 |
+
height:100%;
|
391 |
+
opacity: 0.7;
|
392 |
+
filter: alpha(opacity = 70);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
+
#formMakerDiv {
|
395 |
+
position:fixed;
|
396 |
+
background-color:#666;
|
397 |
+
z-index:100;
|
398 |
+
display:none;
|
399 |
+
left:0;
|
400 |
+
top:0;
|
401 |
+
width:100%;
|
402 |
+
height:100%;
|
403 |
+
opacity: 0.7;
|
404 |
+
filter: alpha(opacity = 70);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
}
|
406 |
+
#formMakerDiv1 {
|
407 |
+
position:fixed;
|
408 |
+
z-index:100;
|
409 |
+
background-color:transparent;
|
410 |
+
top:0;
|
411 |
+
left:0;
|
412 |
+
display:none;
|
413 |
+
margin-left:30px;
|
414 |
+
margin-top:15px;
|
415 |
}
|
416 |
+
</style>
|
417 |
+
<form action="admin.php?page=Form_maker&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
|
418 |
+
<table style="border:6px #00aeef solid; background-color:#00aeef" width="100%" cellpadding="0" cellspacing="0">
|
419 |
+
<tr>
|
420 |
+
<td align="left" valign="middle" rowspan="3" style="padding:10px;">
|
421 |
+
<img src="<?php echo $form_file_url; ?>/images/formmaker.png" />
|
422 |
+
</td>
|
423 |
+
<td width="70" align="right" valign="middle">
|
424 |
+
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
425 |
+
</td>
|
426 |
+
<td width="153" align="center" valign="middle">
|
427 |
+
<div style="background-image:url(<?php echo $form_file_url; ?>/images/input.png);">
|
428 |
+
<input id="title" name="title" <?php echo 'value="'.htmlspecialchars($row->title).'"' ?> style="background:none; width:151px; height:17px; border:none; font-size:11px" />
|
429 |
+
</div>
|
430 |
+
</td>
|
431 |
+
</tr>
|
432 |
+
<tr>
|
433 |
+
<td width="300" align="right" valign="middle">
|
434 |
+
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Email to Send Submissions to: </span>
|
435 |
+
</td>
|
436 |
+
<td width="153" align="center" valign="middle">
|
437 |
+
<div style="background-image:url(<?php echo $form_file_url; ?>/images/input.png);">
|
438 |
+
<input id="mail" name="mail" <?php echo 'value="'.$row->mail.'"' ?> style="background:none; width:151px; height:17px; border:none; font-size:11px" />
|
439 |
+
</div>
|
440 |
+
</td>
|
441 |
+
</tr>
|
442 |
+
<tr>
|
443 |
+
<td width="300" align="right" valign="middle">
|
444 |
+
<span style="font-size:16.76pt; font-family:BauhausItcTEEMed; color:#FFFFFF; vertical-align:middle;">Theme: </span>
|
445 |
+
</td>
|
446 |
+
<td width="153" align="center" valign="middle">
|
447 |
+
<div style="height:19px">
|
448 |
+
<select id="theme" name="theme" style="background:transparent; width:151px; height:19px; border:none; font-size:11px" onChange="set_preview()">
|
449 |
+
<?php
|
450 |
+
$form_theme = '';
|
451 |
+
foreach ($themes as $theme) {
|
452 |
+
if ($theme->id == $row->theme) {
|
453 |
+
echo '<option value="' . $theme->id . '" selected>' . $theme->title . '</option>';
|
454 |
+
$form_theme = $theme->css;
|
455 |
+
}
|
456 |
+
else {
|
457 |
+
echo '<option value="'.$theme->id.'">' . $theme->title . '</option>';
|
458 |
+
}
|
459 |
+
}
|
460 |
+
?>
|
461 |
+
</select>
|
462 |
+
</div>
|
463 |
+
</td>
|
464 |
+
</tr>
|
465 |
+
<tr>
|
466 |
+
<td align="left" colspan="3">
|
467 |
+
<img src="<?php echo $form_file_url; ?>/images/addanewfield.png" onclick="enable(); Enable()" style="cursor:pointer;margin:10px;" />
|
468 |
+
</td>
|
469 |
+
</tr>
|
470 |
+
</table>
|
471 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
472 |
+
<div id="formMakerDiv1" align="center">
|
473 |
+
<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%" style="border:6px #00aeef solid; background-color:#FFF">
|
474 |
+
<tr>
|
475 |
+
<td style="padding:0px">
|
476 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
477 |
+
<tr valign="top">
|
478 |
+
<td width="15%" height="100%" style="border-right:dotted black 1px;" id="field_types">
|
479 |
+
<div id="when_edit" style="display:none"></div>
|
480 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
481 |
+
<tr>
|
482 |
+
<td align="center" onClick="addRow('customHTML')" class="field_buttons" id="table_editor">
|
483 |
+
<img src="<?php echo $form_file_url; ?>/images/customHTML.png" style="margin:5px" id="img_customHTML"/>
|
484 |
+
</td>
|
485 |
+
<td align="center" onClick="addRow('text')" class="field_buttons" id="table_text">
|
486 |
+
<img src="<?php echo $form_file_url; ?>/images/text.png" style="margin:5px" id="img_text"/>
|
487 |
+
</td>
|
488 |
+
</tr>
|
489 |
+
<tr>
|
490 |
+
<td align="center" onClick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
|
491 |
+
<img src="<?php echo $form_file_url; ?>/images/time_and_date.png" style="margin:5px" id="img_time_and_date"/>
|
492 |
+
</td>
|
493 |
+
<td align="center" onClick="addRow('select')" class="field_buttons" id="table_select">
|
494 |
+
<img src="<?php echo $form_file_url; ?>/images/select.png" style="margin:5px" id="img_select"/>
|
495 |
+
</td>
|
496 |
+
</tr>
|
497 |
+
<tr>
|
498 |
+
<td align="center" onClick="addRow('checkbox')" class="field_buttons" id="table_checkbox">
|
499 |
+
<img src="<?php echo $form_file_url; ?>/images/checkbox.png" style="margin:5px" id="img_checkbox"/>
|
500 |
+
</td>
|
501 |
+
<td align="center" onClick="addRow('radio')" class="field_buttons" id="table_radio">
|
502 |
+
<img src="<?php echo $form_file_url; ?>/images/radio.png" style="margin:5px" id="img_radio"/>
|
503 |
+
</td>
|
504 |
+
</tr>
|
505 |
+
<tr>
|
506 |
+
<td align="center" onClick="addRow('file_upload')" class="field_buttons" id="table_file_upload">
|
507 |
+
<img src="<?php echo $form_file_url; ?>/images/file_upload.png" style="margin:5px" id="img_file_upload"/>
|
508 |
+
</td>
|
509 |
+
<td align="center" onClick="addRow('captcha')" class="field_buttons" id="table_captcha">
|
510 |
+
<img src="<?php echo $form_file_url; ?>/images/captcha.png" style="margin:5px" id="img_captcha"/>
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
<tr>
|
514 |
+
<td align="center" onClick="addRow('page_break')" class="field_buttons" id="table_page_break">
|
515 |
+
<img src="<?php echo $form_file_url; ?>/images/page_break.png" style="margin:5px" id="img_page_break"/>
|
516 |
+
</td>
|
517 |
+
<td align="center" onClick="addRow('section_break')" class="field_buttons" id="table_section_break">
|
518 |
+
<img src="<?php echo $form_file_url; ?>/images/section_break.png" style="margin:5px" id="img_section_break"/>
|
519 |
+
</td>
|
520 |
+
</tr>
|
521 |
+
<tr>
|
522 |
+
<td align="center" onClick="addRow('map')" class="field_buttons" id="table_map">
|
523 |
+
<img src="<?php echo $form_file_url; ?>/images/map.png" style="margin:5px" id="img_map"/>
|
524 |
+
</td>
|
525 |
+
<td align="center" onClick="addRow('button')" class="field_buttons" id="table_button">
|
526 |
+
<img src="<?php echo $form_file_url; ?>/images/button.png" style="margin:5px" id="img_button"/>
|
527 |
+
</td>
|
528 |
+
</tr>
|
529 |
+
</table>
|
530 |
+
</td>
|
531 |
+
<td width="35%" height="100%" align="left">
|
532 |
+
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:575px"></div>
|
533 |
+
</td>
|
534 |
+
<td align="center" valign="top" style="background:url(<?php echo $form_file_url; ?>/images/border2.png) repeat-y;"> </td>
|
535 |
+
<td style="padding:15px">
|
536 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
537 |
+
<tr>
|
538 |
+
<td align="right"><input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
539 |
+
At The End
|
540 |
+
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
541 |
+
At The Beginning
|
542 |
+
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
543 |
+
Before
|
544 |
+
<select style="width:100px; margin-left:5px" id="sel_el_pos" disabled="disabled"></select>
|
545 |
+
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo $form_file_url; ?>/images/save.png" onClick="add(0)"/>
|
546 |
+
<img alt="CANCEL" title="cancel" style=" cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo $form_file_url; ?>/images/cancel_but.png" onClick="close_window()"/>
|
547 |
+
<hr style=" margin-bottom:10px" />
|
548 |
+
</td>
|
549 |
+
</tr>
|
550 |
+
<tr height="100%" valign="top">
|
551 |
+
<td id="show_table"></td>
|
552 |
+
</tr>
|
553 |
+
</table>
|
554 |
+
</td>
|
555 |
+
</tr>
|
556 |
+
</table>
|
557 |
+
</td>
|
558 |
+
</tr>
|
559 |
+
</table>
|
560 |
</div>
|
561 |
+
<input type="hidden" id="old" />
|
562 |
+
<input type="hidden" id="old_selected" />
|
563 |
+
<input type="hidden" id="element_type" />
|
564 |
+
<input type="hidden" id="editing_id" />
|
565 |
+
<div id="main_editor" style="position:absolute; display:none; z-index:140;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
566 |
<?php
|
567 |
+
if (function_exists('the_editor') || function_exists('wp_editor')) {
|
568 |
+
if (get_bloginfo('version') < '3.3') { ?>
|
569 |
+
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
570 |
+
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor("","form_maker_editor","title",$media_buttons = true, $tab_index = 1, $extended = true ); ?></div>
|
571 |
+
</div>
|
572 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
}
|
574 |
else {
|
575 |
+
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>"; wp_editor("", "form_maker_editor");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
}
|
|
|
577 |
}
|
578 |
+
else {
|
579 |
+
?>
|
580 |
+
<textarea name="editor" id="editor" cols="40" rows="6" style="width: 450px; height: 350px; " class="mce_editable" aria-hidden="true"></textarea>
|
581 |
+
<?php
|
582 |
+
}
|
583 |
+
?>
|
584 |
+
</div>
|
585 |
+
<br />
|
586 |
+
<br />
|
587 |
+
<fieldset>
|
588 |
+
<legend>
|
589 |
+
<h2 style="color:#00aeef">Form</h2>
|
590 |
+
</legend>
|
591 |
+
<?php
|
592 |
+
global $first_css;
|
593 |
+
echo '<style>'. $first_css.'</style>';
|
594 |
+
?>
|
595 |
+
<table width="100%" style="margin:8px">
|
596 |
+
<tr id="page_navigation">
|
597 |
+
<td align="center" width="90%" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>"></td>
|
598 |
+
<td align="left" id="edit_page_navigation"></td>
|
599 |
+
</tr>
|
600 |
+
</table>
|
601 |
+
<div id="take" class="main">
|
602 |
+
<table cellpadding="4" cellspacing="0" class="wdform_table1" style="border-top:0px solid black;">
|
603 |
+
<tbody id="form_id_tempform_view1" class="wdform_tbody1" page_title="Untitled page" next_title="Next" next_type="button" next_class="wdform_page_button" next_checkable="false" previous_title="Previous" previous_type="button" previous_class="wdform_page_button" previous_checkable="false">
|
604 |
+
<tr class="wdform_tr1">
|
605 |
+
<td class="wdform_td1" >
|
606 |
+
<table class="wdform_table2">
|
607 |
+
<tbody class="wdform_tbody2"></tbody>
|
608 |
+
</table>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
<tr class="wdform_footer">
|
612 |
+
<td colspan="100" valign="top">
|
613 |
+
<table width="100%" style="padding-right:170px">
|
614 |
+
<tbody>
|
615 |
+
<tr id="form_id_temppage_nav1"></tr>
|
616 |
+
</tbody>
|
617 |
+
</table>
|
618 |
+
</td>
|
619 |
+
</tr>
|
620 |
+
<tbody id="form_id_tempform_view_img1" style="float:right ;" >
|
621 |
+
<tr>
|
622 |
+
<td width="0%"></td>
|
623 |
+
<td align="right">
|
624 |
+
<img src="<?php echo $form_file_url; ?>/images/minus.png" title="Show or hide the page" class="page_toolbar" onclick="show_or_hide('1')" id="show_page_img_1" />
|
625 |
+
</td>
|
626 |
+
<td>
|
627 |
+
<img src="<?php echo $form_file_url; ?>/images/page_delete.png" title="Delete the page" class="page_toolbar" onclick="remove_page('1')" />
|
628 |
+
</td>
|
629 |
+
<td>
|
630 |
+
<img src="<?php echo $form_file_url; ?>/images/page_delete_all.png" title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all('1')" />
|
631 |
+
</td>
|
632 |
+
<td>
|
633 |
+
<img src="<?php echo $form_file_url; ?>/images/page_edit.png" title="Edit the page" class="page_toolbar" onclick="edit_page_break('1')" />
|
634 |
+
</td>
|
635 |
+
</tr>
|
636 |
+
</tbody>
|
637 |
+
</table>
|
638 |
+
</div>
|
639 |
+
<div id="take_old" style="display:none">
|
640 |
+
<?php
|
641 |
+
echo $row->form;
|
642 |
+
?>
|
643 |
+
</div>
|
644 |
+
</fieldset>
|
645 |
+
<input type="hidden" name="form" id="form">
|
646 |
+
<input type="hidden" name="form_front" id="form_front">
|
647 |
+
<input type="hidden" value="<?php echo plugins_url("", __FILE__) ?>" id="form_plugins_url" />
|
648 |
+
<input type="hidden" name="pagination" id="pagination" />
|
649 |
+
<input type="hidden" name="show_title" id="show_title" />
|
650 |
+
<input type="hidden" name="show_numbers" id="show_numbers" />
|
651 |
+
<input type="hidden" name="public_key" id="public_key" />
|
652 |
+
<input type="hidden" name="private_key" id="private_key" />
|
653 |
+
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
654 |
+
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order;?>" />
|
655 |
+
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter;?>">
|
656 |
+
<script type="text/javascript">
|
657 |
+
form_view = 1;
|
658 |
+
form_view_count = 1;
|
659 |
+
form_view_max = 1;
|
660 |
+
function formOnload() {
|
661 |
+
// Enable maps.
|
662 |
+
form_view = document.getElementById('form_view');
|
663 |
+
GLOBAL_tr = form_view.firstChild;
|
664 |
+
for (qqq=0; qqq < GLOBAL_tr.childNodes.length; qqq++) {
|
665 |
+
td=GLOBAL_tr.childNodes[qqq];
|
666 |
+
tbody=td.firstChild.firstChild;
|
667 |
+
for (yyy=0; yyy < tbody.childNodes.length; yyy++) {
|
668 |
+
tr=tbody.childNodes[yyy];
|
669 |
+
l_id=tr.id;
|
670 |
+
add_new_field(l_id);
|
671 |
+
td=GLOBAL_tr.childNodes[qqq];
|
672 |
+
tbody=td.firstChild.firstChild;
|
673 |
+
for (zzz=0; zzz < qqq; zzz++) {
|
674 |
+
right_row(l_id);
|
675 |
+
}
|
676 |
+
}
|
677 |
+
}
|
678 |
+
submitbutton('save_update');
|
679 |
}
|
680 |
+
function formAddToOnload() {
|
681 |
+
if (formOldFunctionOnLoad) {
|
682 |
+
formOldFunctionOnLoad();
|
683 |
+
}
|
684 |
+
formOnload();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
}
|
686 |
+
function formLoadBody() {
|
687 |
+
formOldFunctionOnLoad = window.onload;
|
688 |
+
window.onload = formAddToOnload;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
}
|
690 |
+
var formOldFunctionOnLoad = null;
|
691 |
+
formLoadBody();
|
692 |
+
function add_new_field(id) {
|
693 |
+
enable2();
|
694 |
+
type=document.getElementById(id).getAttribute('type');
|
695 |
+
// Parameter take.
|
696 |
+
if (document.getElementById(id + '_element_label').innerHTML) {
|
697 |
+
w_field_label = document.getElementById(id + '_element_label').innerHTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
698 |
}
|
699 |
+
w_choices = new Array();
|
700 |
+
w_choices_checked = new Array();
|
701 |
+
w_choices_disabled = new Array();
|
702 |
+
w_allow_other_num = 0;
|
703 |
+
if (document.getElementById(id+'_label_and_element_section')) {
|
704 |
+
w_field_label_pos = "top";
|
|
|
705 |
}
|
706 |
+
else {
|
707 |
+
w_field_label_pos = "left";
|
|
|
|
|
|
|
|
|
|
|
708 |
}
|
709 |
+
if (document.getElementById(id + "_element")) {
|
710 |
+
s = document.getElementById(id + "_element").style.width;
|
711 |
+
w_size = s.substring(0, s.length - 2);
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
}
|
713 |
+
if (document.getElementById(id+"_required")) {
|
714 |
+
w_required=document.getElementById(id+"_required").value;
|
|
|
|
|
|
|
715 |
}
|
716 |
+
if (document.getElementById(id+'_label_section')) {
|
717 |
+
w_class=document.getElementById(id+'_label_section').getAttribute("class");
|
718 |
+
if (!w_class) {
|
719 |
+
w_class = "";
|
720 |
+
}
|
|
|
721 |
}
|
722 |
+
t = 0;
|
723 |
+
gen = id;
|
724 |
+
switch(type) {
|
725 |
+
case 'type_editor': {
|
726 |
+
w_editor=document.getElementById(id+"_element_section").innerHTML;
|
727 |
+
type_editor(gen, w_editor); add(0); break;
|
|
|
|
|
|
|
728 |
}
|
729 |
+
case 'type_text': {
|
730 |
+
w_first_val=document.getElementById(id+"_element").value;
|
731 |
+
w_title=document.getElementById(id+"_element").title;
|
732 |
+
atrs=return_attributes(id+'_element');
|
733 |
+
w_attr_name=atrs[0];
|
734 |
+
w_attr_value=atrs[1];
|
735 |
+
type_text(gen, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_required, 'no', w_class, w_attr_name, w_attr_value); add(0); break;
|
736 |
}
|
737 |
+
case 'type_password': {
|
738 |
+
atrs=return_attributes(id+'_element');
|
739 |
+
w_attr_name=atrs[0];
|
740 |
+
w_attr_value=atrs[1];
|
741 |
+
if(w_class=='')
|
742 |
+
w_class='wdform_input';
|
743 |
+
type_password(gen, w_field_label, w_field_label_pos, w_size, w_required, 'no', w_class, w_attr_name, w_attr_value); add(0); break;
|
744 |
+
}
|
745 |
+
case 'type_textarea': {
|
746 |
+
w_first_val=document.getElementById(id+"_element").value;
|
747 |
+
w_title=document.getElementById(id+"_element").title;
|
748 |
+
s=document.getElementById(id+"_element").style.height;
|
749 |
+
w_size_h=s.substring(0,s.length-2);
|
750 |
+
|
751 |
+
atrs=return_attributes(id+'_element');
|
752 |
+
w_attr_name=atrs[0];
|
753 |
+
w_attr_value=atrs[1];
|
754 |
+
type_textarea(gen, w_field_label, w_field_label_pos, w_size, w_size_h, w_first_val, w_title, w_required, 'no', w_class, w_attr_name, w_attr_value); add(0); break;
|
755 |
+
}
|
756 |
+
case 'type_name': {
|
757 |
+
if (document.getElementById(id+'_element_middle')) {
|
758 |
+
w_name_format="extended";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
759 |
}
|
760 |
+
else {
|
761 |
+
w_name_format="normal";
|
|
|
|
|
|
|
|
|
|
|
|
|
762 |
}
|
763 |
+
w_first_val=['', ''];
|
764 |
+
w_title=['', ''];
|
765 |
+
s = document.getElementById(id+"_element_first").style.width;
|
766 |
+
w_size=s.substring(0,s.length-2);
|
767 |
+
atrs=return_attributes(id+'_element_first');
|
768 |
+
w_attr_name=atrs[0];
|
769 |
+
w_attr_value=atrs[1];
|
770 |
+
type_name(gen, w_field_label, w_field_label_pos, w_first_val, w_title, w_size, w_name_format, w_required, 'no', w_class, w_attr_name, w_attr_value); add(0); break;
|
|
|
771 |
}
|
772 |
+
case 'type_submitter_mail': {
|
773 |
+
w_first_val=document.getElementById(id+"_element").value;
|
774 |
+
w_title=document.getElementById(id+"_element").title;
|
775 |
+
w_send=document.getElementById(id+"_send").value;
|
776 |
+
atrs=return_attributes(id+'_element');
|
777 |
+
w_attr_name=atrs[0];
|
778 |
+
w_attr_value=atrs[1];
|
779 |
+
type_submitter_mail(gen, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_send, w_required, 'no', w_class, w_attr_name, w_attr_value); add(0); break;
|
780 |
}
|
781 |
+
case 'type_checkbox': {
|
782 |
+
if (document.getElementById(id + '_hor')) {
|
783 |
+
w_flow = "hor";
|
784 |
+
}
|
785 |
+
else {
|
786 |
+
w_flow = "ver";
|
787 |
+
}
|
788 |
+
v = 0;
|
789 |
+
for (k = 0; k < 100; k++) {
|
790 |
+
if (document.getElementById(id+"_element"+k)) {
|
791 |
+
if (document.getElementById(id+"_element"+k).getAttribute('other')) {
|
792 |
+
if (document.getElementById(id+"_element"+k).getAttribute('other') == '1') {
|
793 |
+
w_allow_other_num=t;
|
794 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
}
|
796 |
+
w_choices[t] = document.getElementById(id + "_element" + k).value;
|
797 |
+
w_choices_checked[t]=document.getElementById(id+"_element"+k).checked;
|
798 |
+
t++;
|
799 |
+
v=k;
|
800 |
+
}
|
801 |
+
}
|
802 |
+
atrs=return_attributes(id+'_element'+v);
|
803 |
+
w_attr_name=atrs[0];
|
804 |
+
w_attr_value=atrs[1];
|
805 |
+
type_checkbox(gen, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_required, 'no','no', '0', w_class, w_attr_name, w_attr_value); add(0); break;
|
806 |
+
}
|
807 |
+
case 'type_radio': {
|
808 |
+
if (document.getElementById(id+'_hor')) {
|
809 |
+
w_flow="hor";
|
810 |
+
}
|
811 |
+
else {
|
812 |
+
w_flow="ver";
|
813 |
+
}
|
814 |
+
v = 0;
|
815 |
+
for (k = 0; k < 100; k++) {
|
816 |
+
if (document.getElementById(id+"_element"+k)) {
|
817 |
+
w_choices[t]=document.getElementById(id+"_element"+k).value;
|
818 |
+
w_choices_checked[t]=document.getElementById(id+"_element"+k).checked;
|
819 |
+
t++;
|
820 |
+
v=k;
|
821 |
+
}
|
822 |
+
}
|
823 |
+
atrs = return_attributes(id + '_element' + v);
|
824 |
+
w_attr_name = atrs[0];
|
825 |
+
w_attr_value = atrs[1];
|
826 |
+
type_radio(gen, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_required, 'no', 'no', 0, w_class, w_attr_name, w_attr_value); add(0); break;
|
827 |
+
}
|
828 |
+
case 'type_time': {
|
829 |
+
atrs=return_attributes(id+'_hh');
|
830 |
+
w_attr_name=atrs[0];
|
831 |
+
w_attr_value=atrs[1];
|
832 |
+
w_hh=document.getElementById(id+'_hh').value;
|
833 |
+
w_mm=document.getElementById(id+'_mm').value;
|
834 |
+
if (document.getElementById(id+'_ss')) {
|
835 |
+
w_ss=document.getElementById(id+'_ss').value;
|
836 |
+
w_sec="1";
|
837 |
+
}
|
838 |
+
else {
|
839 |
+
w_ss="";
|
840 |
+
w_sec="0";
|
841 |
+
}
|
842 |
+
if (document.getElementById(id+'_am_pm_select')) {
|
843 |
+
w_am_pm=document.getElementById(id+'_am_pm').value;
|
844 |
+
w_time_type="12";
|
845 |
+
}
|
846 |
+
else {
|
847 |
+
w_am_pm=0;
|
848 |
+
w_time_type="24";
|
849 |
+
}
|
850 |
+
type_time(gen, w_field_label, w_field_label_pos, w_time_type, w_am_pm, w_sec, w_hh, w_mm, w_ss, w_required, w_class, w_attr_name, w_attr_value); add(0); break;
|
851 |
+
}
|
852 |
+
case 'type_date': {
|
853 |
+
atrs=return_attributes(id+'_element');
|
854 |
+
w_attr_name=atrs[0];
|
855 |
+
w_attr_value=atrs[1];
|
856 |
+
w_date=document.getElementById(id+'_element').value;
|
857 |
+
w_format=document.getElementById(id+'_button').getAttribute("format");
|
858 |
+
w_but_val=document.getElementById(id+'_button').value;
|
859 |
+
type_date(gen, w_field_label, w_field_label_pos, w_date, w_required, w_class, w_format, w_but_val, w_attr_name, w_attr_value); add(0); break;
|
860 |
+
}
|
861 |
+
case 'type_date_fields': {
|
862 |
+
atrs =return_attributes(id+'_day');
|
863 |
+
w_attr_name =atrs[0];
|
864 |
+
w_attr_value =atrs[1];
|
865 |
+
w_day =document.getElementById(id+'_day').value;
|
866 |
+
w_month =document.getElementById(id+'_month').value;
|
867 |
+
w_year =document.getElementById(id+'_year').value;
|
868 |
+
w_day_type =document.getElementById(id+'_day').tagName;
|
869 |
+
w_month_type =document.getElementById(id+'_month').tagName;
|
870 |
+
w_year_type =document.getElementById(id+'_year').tagName;
|
871 |
+
w_day_label =document.getElementById(id+'_day_label').innerHTML;
|
872 |
+
w_month_label =document.getElementById(id+'_month_label').innerHTML;
|
873 |
+
w_year_label =document.getElementById(id+'_year_label').innerHTML;
|
874 |
+
s =document.getElementById(id+'_day').style.width;
|
875 |
+
w_day_size =s.substring(0,s.length-2);
|
876 |
+
s =document.getElementById(id+'_month').style.width;
|
877 |
+
w_month_size =s.substring(0,s.length-2);
|
878 |
+
s =document.getElementById(id+'_year').style.width;
|
879 |
+
w_year_size =s.substring(0,s.length-2);
|
880 |
+
if(w_year_type=='SELECT') {
|
881 |
+
w_from =document.getElementById(id+'_year').getAttribute('from');
|
882 |
+
w_to =document.getElementById(id+'_year').getAttribute('to');
|
883 |
+
}
|
884 |
+
else {
|
885 |
+
w_from ='1901';
|
886 |
+
w_to ='2012';
|
887 |
+
}
|
888 |
+
w_divider =document.getElementById(id+'_separator1').innerHTML;
|
889 |
+
type_date_fields(gen, w_field_label, w_field_label_pos, w_day, w_month, w_year, w_day_type, w_month_type, w_year_type, w_day_label, w_month_label, w_year_label, w_day_size, w_month_size, w_year_size, w_required, w_class, w_from, w_to, w_divider, w_attr_name, w_attr_value); add(0); break;
|
890 |
+
}
|
891 |
+
case 'type_own_select': {
|
892 |
+
for (k = 0; k < 100; k++) {
|
893 |
+
if(document.getElementById(id+"_option"+k)) {
|
894 |
+
w_choices[t]=document.getElementById(id+"_option"+k).innerHTML;
|
895 |
+
w_choices_checked[t]=document.getElementById(id+"_option"+k).selected;
|
896 |
+
if(document.getElementById(id+"_option"+k).value=="") {
|
897 |
+
w_choices_disabled[t]=true;
|
898 |
+
}
|
899 |
+
else {
|
900 |
+
w_choices_disabled[t]=false;
|
901 |
+
}
|
902 |
+
t++;
|
903 |
+
}
|
904 |
+
}
|
905 |
+
atrs=return_attributes(id+'_element');
|
906 |
+
w_attr_name=atrs[0];
|
907 |
+
w_attr_value=atrs[1];
|
908 |
+
type_own_select(gen, w_field_label, w_field_label_pos, w_size, w_choices, w_choices_checked, w_required, w_class, w_attr_name, w_attr_value, w_choices_disabled); add(0); break;
|
909 |
+
}
|
910 |
+
case 'type_country': {
|
911 |
+
w_countries=[];
|
912 |
+
select_=document.getElementById(id+'_element');
|
913 |
+
n=select_.childNodes.length;
|
914 |
+
for (i=0; i<n; i++) {
|
915 |
+
w_countries.push(select_.childNodes[i].value);
|
916 |
+
}
|
917 |
+
atrs=return_attributes(id+'_element');
|
918 |
+
w_attr_name=atrs[0];
|
919 |
+
w_attr_value=atrs[1];
|
920 |
+
type_country(gen, w_field_label, w_countries, w_field_label_pos, w_size, w_required, w_class, w_attr_name, w_attr_value); add(0); break;
|
921 |
+
}
|
922 |
+
case 'type_file_upload': {
|
923 |
+
w_destination=document.getElementById(id+"_destination").value.replace("***destinationverj"+id+"***", "").replace("***destinationskizb"+id+"***", "");
|
924 |
+
w_extension =document.getElementById(id+"_extension").value.replace("***extensionverj"+id+"***", "").replace("***extensionskizb"+id+"***", "");
|
925 |
+
w_max_size =document.getElementById(id+"_max_size").value.replace("***max_sizeverj"+id+"***", "").replace("***max_sizeskizb"+id+"***", "");
|
926 |
+
atrs=return_attributes(id+'_element');
|
927 |
+
w_attr_name=atrs[0];
|
928 |
+
w_attr_value=atrs[1];
|
929 |
+
type_file_upload(gen, w_field_label, w_field_label_pos, w_destination,w_extension, w_max_size, w_required, w_class, w_attr_name, w_attr_value); add(0); break;
|
930 |
+
}
|
931 |
+
case 'type_map': {
|
932 |
+
w_lat=[];
|
933 |
+
w_long=[];
|
934 |
+
w_info=[];
|
935 |
+
w_zoom = document.getElementById(id+"_element").getAttribute("zoom");
|
936 |
+
w_width = parseInt(document.getElementById(id+"_element").style.width);
|
937 |
+
w_height= parseInt(document.getElementById(id+"_element").style.height);
|
938 |
+
w_lat.push(document.getElementById(id+"_element").getAttribute("lat"));
|
939 |
+
w_long.push(document.getElementById(id+"_element").getAttribute("long"));
|
940 |
+
w_info.push(document.getElementById(id+"_element").getAttribute("info"));
|
941 |
+
atrs=return_attributes(id+'_element');
|
942 |
+
w_attr_name=atrs[0];
|
943 |
+
w_attr_value=atrs[1];
|
944 |
+
type_map(gen, w_long, w_lat, w_long, w_lat, w_zoom, w_width, w_height, w_class, w_info, w_attr_name, w_attr_value); add(0);break;
|
945 |
+
}
|
946 |
+
case 'type_submit_reset': {
|
947 |
+
atrs=return_attributes(id+'_element_submit');
|
948 |
+
w_act=!(document.getElementById(id+"_element_reset").style.display=="none");
|
949 |
+
w_attr_name=atrs[0];
|
950 |
+
w_attr_value=atrs[1];
|
951 |
+
w_submit_title = document.getElementById(id+"_element_submit").value;
|
952 |
+
w_reset_title = document.getElementById(id+"_element_reset").value;
|
953 |
+
type_submit_reset(gen, w_submit_title , w_reset_title , w_class, w_act, w_attr_name, w_attr_value); add(0); break;
|
954 |
+
}
|
955 |
+
case 'type_button': {
|
956 |
+
w_title =new Array();
|
957 |
+
w_func =new Array();
|
958 |
+
t=0;
|
959 |
+
v=0;
|
960 |
+
for (k = 0; k < 100; k++) {
|
961 |
+
if (document.getElementById(id+"_element"+k)) {
|
962 |
+
w_title[t]=document.getElementById(id+"_element"+k).value;
|
963 |
+
w_func[t]=document.getElementById(id+"_element"+k).getAttribute("onclick");
|
964 |
+
t++;
|
965 |
+
v=k;
|
966 |
}
|
967 |
}
|
968 |
+
atrs=return_attributes(id+'_element'+v);
|
969 |
+
w_attr_name=atrs[0];
|
970 |
+
w_attr_value=atrs[1];
|
971 |
+
type_button (gen, w_title , w_func , w_class,w_attr_name, w_attr_value); add(0); break;
|
972 |
+
}
|
973 |
+
case 'type_hidden': {
|
974 |
+
w_value = document.getElementById(id+"_element").value;
|
975 |
+
w_name = document.getElementById(id+"_element").name;
|
976 |
+
atrs=return_attributes(id+'_element');
|
977 |
+
w_attr_name=atrs[0];
|
978 |
+
w_attr_value=atrs[1];
|
979 |
+
type_hidden (gen, w_name, w_value , w_attr_name, w_attr_value); add(0); break;
|
980 |
+
}
|
981 |
+
case 'type_captcha': {
|
982 |
+
w_digit=document.getElementById("wd_captcha").getAttribute("digit");
|
983 |
+
atrs=return_attributes('wd_captcha');
|
984 |
+
w_attr_name=atrs[0];
|
985 |
+
w_attr_value=atrs[1];
|
986 |
+
type_captcha(gen, w_field_label, w_field_label_pos, w_digit, w_class, w_attr_name, w_attr_value); add(0);break;
|
987 |
}
|
988 |
+
}
|
989 |
}
|
990 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
991 |
+
</script>
|
992 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
993 |
+
<input type="hidden" name="id" value="<?php echo $row->id?>" />
|
994 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
995 |
+
<input type="hidden" name="task" value="" />
|
996 |
+
<input type="hidden" id="araqel" value="0" />
|
997 |
+
</form>
|
998 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
}
|
1000 |
|
1001 |
+
////////////////////////////////////////////////////////////////////////////////////////////////////
|
1002 |
+
function html_forchrome_update() {
|
1003 |
+
?>
|
1004 |
+
<script type="text/javascript">
|
1005 |
+
window.onload = val;
|
1006 |
+
function val() {
|
1007 |
+
var form = document.adminForm;
|
1008 |
+
submitform();
|
1009 |
}
|
1010 |
+
function submitform(pressbutton) {
|
1011 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=update";
|
1012 |
+
document.getElementById('adminForm').submit();
|
1013 |
+
}
|
1014 |
+
</script>
|
1015 |
+
<form action="admin.php?page=Form_maker&id=<?php echo $id; ?>" method="post" id="adminForm" name="adminForm">
|
1016 |
+
</form>
|
1017 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1018 |
}
|
1019 |
|
1020 |
+
function update_complete() {
|
1021 |
+
?>
|
1022 |
+
<div class="updated"><p><strong><?php _e('All forms are updated!'); ?></strong></p></div>
|
1023 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
}
|
1025 |
|
1026 |
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
1027 |
+
function html_display_form_lists($rows, $pageNav, $sort, $old_version, $can_update_form) {
|
1028 |
+
global $wpdb;
|
1029 |
+
?>
|
1030 |
+
<script language="javascript">
|
1031 |
+
function confirmation(href,title) {
|
1032 |
+
var answer = confirm("Are you sure you want to delete '"+title+"'?");
|
1033 |
+
if (answer) {
|
1034 |
+
document.getElementById('admin_form').action=href;
|
1035 |
+
document.getElementById('admin_form').submit();
|
1036 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1037 |
}
|
1038 |
+
function ordering(name,as_or_desc) {
|
1039 |
+
document.getElementById('asc_or_desc').value=as_or_desc;
|
1040 |
+
document.getElementById('order_by').value=name;
|
1041 |
+
document.getElementById('admin_form').submit();
|
1042 |
}
|
1043 |
+
function doNothing() {
|
1044 |
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
1045 |
+
if (keyCode == 13) {
|
1046 |
+
if (!e) {
|
1047 |
+
var e = window.event;
|
1048 |
+
}
|
1049 |
+
e.cancelBubble = true;
|
1050 |
+
e.returnValue = false;
|
1051 |
+
if (e.stopPropagation) {
|
1052 |
+
e.stopPropagation();
|
1053 |
+
e.preventDefault();
|
1054 |
+
}
|
1055 |
+
}
|
1056 |
+
}
|
1057 |
+
</script>
|
1058 |
+
<style>
|
1059 |
+
.calendar .button {
|
1060 |
+
display: table-cell !important;
|
1061 |
+
}
|
1062 |
+
</style>
|
1063 |
+
<form method="post" onkeypress="doNothing()" action="admin.php?page=Form_maker" id="admin_form" name="admin_form">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
<br />
|
1065 |
+
<div style="font-size:14px; font-weight:bold">
|
1066 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
1067 |
+
<br />
|
1068 |
+
This section allows you to create forms.
|
1069 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1070 |
+
</div>
|
1071 |
+
<table cellspacing="10" width="100%">
|
1072 |
+
<tr>
|
1073 |
+
<td style="width:50px">
|
1074 |
+
<img src="<?php echo plugins_url("images/formmakerLogo-48.png",__FILE__); ?>" />
|
1075 |
+
</td>
|
1076 |
+
<td style="width:140px;">
|
1077 |
+
<h2 style="vertical-align:top;">Form Maker</h2></td>
|
1078 |
+
<td style="width:90px; text-align:right;"><input class="button-secondary action" type="button" value="Add a Form"
|
1079 |
+
name="custom_parametrs"
|
1080 |
+
onclick="window.location.href='admin.php?page=Form_maker&task=add_form'"/>
|
1081 |
+
</td>
|
1082 |
+
<?php if ($old_version && $can_update_form) { ?>
|
1083 |
+
<td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms"
|
1084 |
+
name="update_forms"
|
1085 |
+
onclick="window.location.href='admin.php?page=Form_maker&task=update'"/>
|
1086 |
+
</td><?php } if (!$can_update_form && $old_version) { ?>
|
1087 |
+
<td style="width:90px; text-align:right;"><input class="button-primary action" type="button" value=" Update Forms"
|
1088 |
+
name="update_forms"
|
1089 |
+
onclick="alert('You cant update the forms of pro version with the free version. Please get the pro version')"/>
|
1090 |
+
</td><?php }?>
|
1091 |
+
<td>
|
1092 |
+
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:90%">
|
1093 |
+
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
1094 |
+
style="color:red; text-decoration:none;">
|
1095 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="www.web-dorado.com"
|
1096 |
+
width="215"><br>
|
1097 |
+
Get the full version
|
1098 |
+
</a>
|
1099 |
+
</div>
|
1100 |
+
</td>
|
1101 |
+
</tr>
|
1102 |
+
</table>
|
1103 |
+
<?php
|
1104 |
+
$serch_value='';
|
1105 |
+
if (isset($_POST['serch_or_not'])) {
|
1106 |
+
if (esc_html($_POST['serch_or_not']) == "search") {
|
1107 |
+
$serch_value = esc_html($_POST['search_events_by_title']);
|
1108 |
+
}
|
1109 |
+
else {
|
1110 |
+
$serch_value = "";
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
$serch_fields = '
|
1114 |
+
<div class="alignleft actions" style="width:180px;">
|
1115 |
+
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
1116 |
+
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()">
|
1117 |
+
</div>
|
1118 |
+
<div class="alignleft actions">
|
1119 |
+
<input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\';document.getElementById(\'admin_form\').submit();" class="button-secondary action">
|
1120 |
+
<input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=Form_maker\'" class="button-secondary action">
|
1121 |
+
</div>';
|
1122 |
+
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
1123 |
+
?>
|
1124 |
+
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
1125 |
+
<thead>
|
1126 |
+
<TR>
|
1127 |
+
<th scope="col" id="id" class="<?php if ($sort["sortid_by"] == "id")
|
1128 |
+
echo $sort["custom_style"];
|
1129 |
+
else echo $sort["default_style"]; ?>" style="width:110px"><a
|
1130 |
+
href="javascript:ordering('id',<?php if ($sort["sortid_by"] == "id")
|
1131 |
+
echo $sort["1_or_2"];
|
1132 |
+
else echo "1"; ?>)"><span>ID</span><span class="sorting-indicator"></span></a></th>
|
1133 |
+
<th scope="col" id="title" class="<?php if ($sort["sortid_by"] == "title")
|
1134 |
+
echo $sort["custom_style"];
|
1135 |
+
else echo $sort["default_style"]; ?>" style=""><a
|
1136 |
+
href="javascript:ordering('title',<?php if ($sort["sortid_by"] == "title")
|
1137 |
+
echo $sort["1_or_2"];
|
1138 |
+
else echo "1"; ?>)"><span>Title</span><span class="sorting-indicator"></span></a></th>
|
1139 |
+
<th scope="col" id="mail" class="<?php if ($sort["sortid_by"] == "mail")
|
1140 |
+
echo $sort["custom_style"];
|
1141 |
+
else echo $sort["default_style"]; ?>"><a href="javascript:ordering('mail',<?php if ($sort["sortid_by"] == "mail")
|
1142 |
+
echo $sort["1_or_2"];
|
1143 |
+
else echo "1"; ?>)"><span>Email to send submissions to</span><span class="sorting-indicator"></span></a></th>
|
1144 |
+
<th style="width:80px">Edit</th>
|
1145 |
+
<th style="width:80px">Delete</th>
|
1146 |
+
</TR>
|
1147 |
+
</thead>
|
1148 |
+
<tbody>
|
1149 |
+
<?php
|
1150 |
+
for ($i = 0; $i < count($rows); $i++) {
|
1151 |
+
?>
|
1152 |
+
<tr>
|
1153 |
+
<?php
|
1154 |
+
$old_version = false;
|
1155 |
+
if (strpos($rows[$i]->form, "wdform_table1") === false) {
|
1156 |
+
$old_version = true;
|
1157 |
+
}
|
1158 |
+
?>
|
1159 |
+
<td><?php if (!$old_version) { ?><a
|
1160 |
+
href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>"><?php echo $rows[$i]->id; ?></a><?php }
|
1161 |
+
else { ?> <p style="color:red; cursor:pointer; margin:0px"
|
1162 |
+
onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->id; ?></p><?php }?></td>
|
1163 |
+
<td><?php if (!$old_version) { ?><a
|
1164 |
+
href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>"><?php echo $rows[$i]->title; ?></a><?php }
|
1165 |
+
else { ?> <p style="color:red; cursor:pointer; margin:0px"
|
1166 |
+
onclick="alert('Update forms to new version!')"><?php echo $rows[$i]->title; ?></p><?php }?></td>
|
1167 |
+
<td><?php echo $rows[$i]->mail; ?></td>
|
1168 |
+
<td><?php if (!$old_version) { ?><a href="admin.php?page=Form_maker&task=edit_form&id=<?php echo $rows[$i]->id?>">Edit</a><?php }
|
1169 |
+
else { ?> <p style="color:red; cursor:pointer; margin:0px" onclick="alert('Update forms to new version!')">
|
1170 |
+
Edit</p><?php }?></td>
|
1171 |
+
<td><a
|
1172 |
+
href="javascript:confirmation('admin.php?page=Form_maker&task=remove_form&id=<?php echo $rows[$i]->id?>','<?php echo $rows[$i]->title; ?>')">Delete</a>
|
|
|
|
|
1173 |
</td>
|
1174 |
+
</tr>
|
1175 |
+
<?php
|
1176 |
+
}
|
1177 |
+
?>
|
1178 |
+
</tbody>
|
1179 |
+
</table>
|
1180 |
+
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if(isset($_POST['asc_or_desc'])) echo esc_html($_POST['asc_or_desc']);?>" />
|
1181 |
+
<input type="hidden" name="order_by" id="order_by" value="<?php if(isset($_POST['order_by'])) echo esc_html($_POST['order_by']);?>" />
|
1182 |
+
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
<?php
|
1184 |
+
}
|
|
|
|
|
1185 |
|
1186 |
+
// Add a form.
|
1187 |
+
function html_add_form($themes) {
|
1188 |
+
?>
|
1189 |
+
<script type="text/javascript">
|
1190 |
+
// Edit paypal properties page open in popup.
|
1191 |
+
function form_maker_edit_in_popup(id) {
|
1192 |
+
$ = jQuery;
|
1193 |
+
var thickDims, tbWidth, tbHeight;
|
1194 |
+
thickDims = function() {
|
1195 |
+
var tbWindow = jQuery('#TB_window'), H = jQuery(window).height(), W = jQuery(window).width(), w, h;
|
1196 |
+
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
1197 |
+
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
1198 |
+
if (tbWindow.size()) {
|
1199 |
+
tbWindow.width(w).height(h);
|
1200 |
+
jQuery('#TB_iframeContent').width(w).height(h - 27);
|
1201 |
+
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
1202 |
+
if (typeof document.body.style.maxWidth != 'undefined') {
|
1203 |
+
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
1204 |
+
}
|
1205 |
+
}
|
1206 |
+
};
|
1207 |
+
thickDims();
|
1208 |
+
jQuery(window).resize( function() { thickDims() } );
|
1209 |
+
jQuery('a.thickbox-preview' + id).click( function() {
|
1210 |
+
tb_click.call(this);
|
1211 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
1212 |
+
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
1213 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
1214 |
+
}
|
1215 |
+
else {
|
1216 |
+
tbWidth = jQuery(window).width() - 120;
|
1217 |
+
}
|
1218 |
+
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
1219 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
1220 |
+
}
|
1221 |
+
else {
|
1222 |
+
tbHeight = jQuery(window).height() - 120;
|
1223 |
+
}
|
1224 |
+
if (alink.length) {
|
1225 |
+
url = alink.attr('href') || '';
|
1226 |
+
text = alink.attr('title') || '';
|
1227 |
+
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
1228 |
+
}
|
1229 |
+
else {
|
1230 |
+
text = jQuery(this).attr('title') || '';
|
1231 |
+
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
1232 |
+
}
|
1233 |
+
jQuery('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
1234 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
1235 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
1236 |
+
jQuery('#TB_iframeContent').width('100%');
|
1237 |
+
thickDims();
|
1238 |
+
return false;
|
1239 |
+
});
|
1240 |
+
}
|
1241 |
+
var already_submitted = false;
|
1242 |
+
function refresh_() {
|
1243 |
+
document.getElementById('form').value = document.getElementById('take').innerHTML;
|
1244 |
+
document.getElementById('counter').value = gen;
|
1245 |
+
n = gen;
|
1246 |
+
for (i = 0; i < n; i++) {
|
1247 |
+
if (document.getElementById(i)) {
|
1248 |
+
for (z = 0; z < document.getElementById(i).childNodes.length; z++)
|
1249 |
+
if (document.getElementById(i).childNodes[z].nodeType == 3)
|
1250 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
|
1251 |
+
|
1252 |
+
if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
|
1253 |
+
if (document.getElementById(i).childNodes[10]) {
|
1254 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1255 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1256 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1257 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1258 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1259 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1260 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1261 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1262 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1263 |
+
}
|
1264 |
+
else {
|
1265 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1266 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1267 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1268 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1269 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1270 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1271 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1272 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1273 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1274 |
+
}
|
1275 |
+
continue;
|
1276 |
+
}
|
1277 |
+
if (document.getElementById(i).getAttribute('type') == "type_section_break") {
|
1278 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1279 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1280 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1281 |
+
continue;
|
1282 |
+
}
|
1283 |
+
if (document.getElementById(i).childNodes[10]) {
|
1284 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1285 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1286 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1287 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1288 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1289 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1290 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1291 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1292 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
1293 |
+
}
|
1294 |
+
else {
|
1295 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1296 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1297 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1298 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1299 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1300 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1301 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1302 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1303 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
1304 |
+
}
|
1305 |
+
}
|
1306 |
+
}
|
1307 |
+
for (i = 0; i <= n; i++) {
|
1308 |
+
if (document.getElementById(i)) {
|
1309 |
+
type = document.getElementById(i).getAttribute("type");
|
1310 |
+
switch (type) {
|
1311 |
+
case "type_text":
|
1312 |
+
case "type_number":
|
1313 |
+
case "type_password":
|
1314 |
+
case "type_submitter_mail":
|
1315 |
+
case "type_own_select":
|
1316 |
+
case "type_country":
|
1317 |
+
case "type_hidden":
|
1318 |
+
case "type_map":
|
1319 |
+
{
|
1320 |
+
remove_add_(i + "_elementform_id_temp");
|
1321 |
+
break;
|
1322 |
+
}
|
1323 |
|
1324 |
+
case "type_submit_reset":
|
1325 |
+
{
|
1326 |
+
remove_add_(i + "_element_submitform_id_temp");
|
1327 |
+
if (document.getElementById(i + "_element_resetform_id_temp"))
|
1328 |
+
remove_add_(i + "_element_resetform_id_temp");
|
1329 |
+
break;
|
1330 |
+
}
|
1331 |
|
1332 |
+
case "type_captcha":
|
1333 |
+
{
|
1334 |
+
remove_add_("_wd_captchaform_id_temp");
|
1335 |
+
remove_add_("_element_refreshform_id_temp");
|
1336 |
+
remove_add_("_wd_captcha_inputform_id_temp");
|
1337 |
+
break;
|
1338 |
+
}
|
1339 |
|
1340 |
+
case "type_recaptcha":
|
1341 |
+
{
|
1342 |
+
document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
1343 |
+
document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
|
1344 |
+
document.getElementById("recaptcha_theme").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("theme");
|
1345 |
+
document.getElementById('wd_recaptchaform_id_temp').innerHTML = '';
|
1346 |
+
remove_add_("wd_recaptchaform_id_temp");
|
1347 |
+
break;
|
1348 |
+
}
|
1349 |
|
1350 |
+
case "type_file_upload":
|
1351 |
+
{
|
1352 |
+
remove_add_(i + "_elementform_id_temp");
|
1353 |
+
break;
|
1354 |
+
}
|
1355 |
|
1356 |
+
case "type_textarea":
|
1357 |
+
{
|
1358 |
+
remove_add_(i + "_elementform_id_temp");
|
1359 |
|
1360 |
+
break;
|
1361 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1362 |
|
1363 |
+
case "type_name":
|
1364 |
+
{
|
1365 |
|
1366 |
+
if (document.getElementById(i + "_element_titleform_id_temp")) {
|
1367 |
+
remove_add_(i + "_element_titleform_id_temp");
|
1368 |
+
remove_add_(i + "_element_firstform_id_temp");
|
1369 |
+
remove_add_(i + "_element_lastform_id_temp");
|
1370 |
+
remove_add_(i + "_element_middleform_id_temp");
|
1371 |
+
}
|
1372 |
+
else {
|
1373 |
+
remove_add_(i + "_element_firstform_id_temp");
|
1374 |
+
remove_add_(i + "_element_lastform_id_temp");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
1376 |
+
}
|
1377 |
+
break;
|
|
|
1378 |
|
1379 |
+
}
|
|
|
1380 |
|
1381 |
+
case "type_phone":
|
1382 |
+
{
|
1383 |
|
1384 |
+
remove_add_(i + "_element_firstform_id_temp");
|
1385 |
+
remove_add_(i + "_element_lastform_id_temp");
|
1386 |
|
1387 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1388 |
|
1389 |
+
}
|
1390 |
|
1391 |
+
case "type_address":
|
1392 |
+
{
|
1393 |
+
remove_add_(i + "_street1form_id_temp");
|
1394 |
+
remove_add_(i + "_street2form_id_temp");
|
1395 |
+
remove_add_(i + "_cityform_id_temp");
|
1396 |
+
remove_add_(i + "_stateform_id_temp");
|
1397 |
+
remove_add_(i + "_postalform_id_temp");
|
1398 |
+
remove_add_(i + "_countryform_id_temp");
|
1399 |
+
break;
|
1400 |
+
}
|
1401 |
+
case "type_checkbox":
|
1402 |
+
case "type_radio":
|
1403 |
+
{
|
1404 |
+
is = true;
|
1405 |
+
for (j = 0; j < 100; j++)
|
1406 |
+
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1407 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
1408 |
+
}
|
1409 |
+
break;
|
1410 |
+
}
|
1411 |
+
case "type_star_rating":
|
1412 |
+
{
|
1413 |
+
remove_add_(i+"_elementform_id_temp");
|
1414 |
+
|
1415 |
+
break;
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
case "type_scale_rating":
|
1419 |
+
{
|
1420 |
+
remove_add_(i+"_elementform_id_temp");
|
1421 |
+
|
1422 |
+
break;
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
case "type_spinner":
|
1426 |
+
{
|
1427 |
+
remove_add_(i+"_elementform_id_temp");
|
1428 |
+
|
1429 |
+
break;
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
case "type_slider":
|
1433 |
+
{
|
1434 |
+
remove_add_(i+"_elementform_id_temp");
|
1435 |
+
|
1436 |
+
break;
|
1437 |
+
}
|
1438 |
+
case "type_range":
|
1439 |
+
{
|
1440 |
+
remove_add_(i+"_elementform_id_temp0");
|
1441 |
+
remove_add_(i+"_elementform_id_temp1");
|
1442 |
+
|
1443 |
+
break;
|
1444 |
+
}
|
1445 |
+
case "type_grading":
|
1446 |
+
{
|
1447 |
+
|
1448 |
+
for(k=0; k<100; k++)
|
1449 |
+
if(document.getElementById(i+"_elementform_id_temp"+k))
|
1450 |
+
{
|
1451 |
+
remove_add_(i+"_elementform_id_temp"+k);
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
break;
|
1455 |
+
}
|
1456 |
+
case "type_matrix":
|
1457 |
+
{
|
1458 |
+
remove_add_(i+"_elementform_id_temp");
|
1459 |
+
|
1460 |
+
break;
|
1461 |
+
}
|
1462 |
|
1463 |
+
case "type_button":
|
1464 |
+
{
|
1465 |
+
for (j = 0; j < 100; j++)
|
1466 |
+
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
1467 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
1468 |
+
}
|
1469 |
+
break;
|
1470 |
+
}
|
1471 |
|
1472 |
+
case "type_time":
|
1473 |
+
{
|
1474 |
+
if (document.getElementById(i + "_ssform_id_temp")) {
|
1475 |
+
remove_add_(i + "_ssform_id_temp");
|
1476 |
+
remove_add_(i + "_mmform_id_temp");
|
1477 |
+
remove_add_(i + "_hhform_id_temp");
|
1478 |
+
}
|
1479 |
+
else {
|
1480 |
+
remove_add_(i + "_mmform_id_temp");
|
1481 |
+
remove_add_(i + "_hhform_id_temp");
|
1482 |
+
}
|
1483 |
+
break;
|
1484 |
|
1485 |
+
}
|
|
|
1486 |
|
1487 |
+
case "type_date":
|
1488 |
+
{
|
1489 |
+
remove_add_(i + "_elementform_id_temp");
|
1490 |
+
remove_add_(i + "_buttonform_id_temp");
|
1491 |
+
break;
|
1492 |
+
}
|
1493 |
+
case "type_date_fields":
|
1494 |
+
{
|
1495 |
+
remove_add_(i + "_dayform_id_temp");
|
1496 |
+
remove_add_(i + "_monthform_id_temp");
|
1497 |
+
remove_add_(i + "_yearform_id_temp");
|
1498 |
+
break;
|
1499 |
+
}
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
}
|
1503 |
|
1504 |
+
for (i = 1; i <= form_view_max; i++) {
|
1505 |
+
if (document.getElementById('form_id_tempform_view' + i)) {
|
1506 |
+
if (document.getElementById('page_next_' + i))
|
1507 |
+
document.getElementById('page_next_' + i).removeAttribute('src');
|
1508 |
+
if (document.getElementById('page_previous_' + i))
|
1509 |
+
document.getElementById('page_previous_' + i).removeAttribute('src');
|
1510 |
+
document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
|
1511 |
+
document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
|
1512 |
+
}
|
1513 |
+
}
|
1514 |
+
for (t = 1; t <= form_view_max; t++) {
|
1515 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
1516 |
+
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
1517 |
+
n = form_view_element.childNodes.length - 2;
|
1518 |
+
for (z = 0; z <= n; z++) {
|
1519 |
+
if (form_view_element.childNodes[z]) {
|
1520 |
+
if (form_view_element.childNodes[z].nodeType != 3) {
|
1521 |
+
if (!form_view_element.childNodes[z].id) {
|
1522 |
+
del = true;
|
1523 |
+
GLOBAL_tr = form_view_element.childNodes[z];
|
1524 |
+
//////////////////////////////////////////////////////////////////////////////////////////
|
1525 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
1526 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
1527 |
+
tbody = table.firstChild;
|
1528 |
+
if (tbody.childNodes.length)
|
1529 |
+
del = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1530 |
}
|
1531 |
+
if (del) {
|
1532 |
+
form_view_element.removeChild(form_view_element.childNodes[z]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1533 |
}
|
|
|
|
|
|
|
|
|
1534 |
}
|
1535 |
}
|
1536 |
}
|
1537 |
+
}
|
1538 |
}
|
1539 |
}
|
1540 |
+
document.getElementById('form_front').value = document.getElementById('take').innerHTML;
|
1541 |
}
|
1542 |
+
function submitbutton(pressbutton) {
|
1543 |
+
var form = document.adminForm;
|
1544 |
+
if (already_submitted) {
|
1545 |
+
submitform(pressbutton);
|
1546 |
+
return;
|
1547 |
}
|
1548 |
+
if (pressbutton == 'cancel') {
|
1549 |
+
submitform(pressbutton);
|
1550 |
+
return;
|
1551 |
+
}
|
1552 |
+
if (form.title.value == "") {
|
1553 |
+
alert("The form must have a title.");
|
1554 |
+
return;
|
1555 |
+
}
|
1556 |
+
tox = '';
|
1557 |
+
for (t = 1; t <= form_view_max; t++) {
|
1558 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
1559 |
+
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
1560 |
+
n = form_view_element.childNodes.length - 2;
|
1561 |
+
for (z = 0; z <= n; z++) {
|
1562 |
+
if (form_view_element.childNodes[z].nodeType != 3)
|
1563 |
+
if (!form_view_element.childNodes[z].id) {
|
1564 |
+
GLOBAL_tr = form_view_element.childNodes[z];
|
1565 |
+
//////////////////////////////////////////////////////////////////////////////////////////
|
1566 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
1567 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
1568 |
+
tbody = table.firstChild;
|
1569 |
+
for (y = 0; y < tbody.childNodes.length; y++) {
|
1570 |
+
tr = tbody.childNodes[y];
|
1571 |
+
l_label = document.getElementById(tr.id + '_element_labelform_id_temp').innerHTML;
|
1572 |
+
l_label = l_label.replace(/(\r\n|\n|\r)/gm, " ");
|
1573 |
+
|
1574 |
+
if (tr.getAttribute('type') == "type_address") {
|
1575 |
+
addr_id = parseInt(tr.id);
|
1576 |
+
id_for_country= addr_id;
|
1577 |
+
|
1578 |
+
if(document.getElementById(id_for_country+"_mini_label_street1")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++; if(document.getElementById(id_for_country+"_mini_label_street2")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++; if(document.getElementById(id_for_country+"_mini_label_city")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_city").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++; if(document.getElementById(id_for_country+"_mini_label_state")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_state").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++; if(document.getElementById(id_for_country+"_mini_label_postal")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++; if(document.getElementById(id_for_country+"_mini_label_country")) tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_country").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';
|
1579 |
+
}
|
1580 |
+
else
|
1581 |
+
tox = tox + tr.id + '#**id**#' + l_label + '#**label**#' + tr.getAttribute('type') + '#****#';
|
1582 |
+
}
|
1583 |
+
}
|
1584 |
+
}
|
1585 |
}
|
1586 |
+
}
|
|
|
|
|
1587 |
}
|
1588 |
+
document.getElementById('label_order').value = tox;
|
1589 |
+
document.getElementById('label_order_current').value = tox;
|
1590 |
+
refresh_();
|
1591 |
+
document.getElementById('pagination').value = document.getElementById('pages').getAttribute("type");
|
1592 |
+
document.getElementById('show_title').value = document.getElementById('pages').getAttribute("show_title");
|
1593 |
+
document.getElementById('show_numbers').value = document.getElementById('pages').getAttribute("show_numbers");
|
1594 |
+
already_submitted = true;
|
1595 |
+
submitform(pressbutton);
|
1596 |
}
|
1597 |
+
function submitform(pressbutton) {
|
1598 |
+
document.getElementById('adminForm').action=document.getElementById('adminForm').action+"&task="+pressbutton;
|
1599 |
+
document.getElementById('adminForm').submit();
|
1600 |
+
}
|
1601 |
+
gen = 1;
|
1602 |
+
form_view = 1;
|
1603 |
+
form_view_max = 1;
|
1604 |
+
form_view_count = 1;
|
1605 |
+
function set_preview() {
|
1606 |
+
appWidth = parseInt(document.body.offsetWidth);
|
1607 |
+
appHeight = parseInt(document.body.offsetHeight);
|
1608 |
+
document.getElementById('preview_form').href='<?php echo admin_url('admin-ajax.php'); ?>?action=frommakerpreview&id='+document.getElementById('theme').value+'&TB_iframe=1';
|
1609 |
+
}
|
1610 |
+
function enable() {
|
1611 |
+
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
1612 |
+
if (document.getElementsByTagName("iframe")[iiiii]) {
|
1613 |
+
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
1614 |
+
id_ifr_editor = iiiii;
|
1615 |
+
break;
|
1616 |
+
}
|
|
|
|
|
|
|
|
|
1617 |
}
|
1618 |
+
}
|
1619 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
1620 |
+
for (x = 0; x < 14; x++) {
|
1621 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo plugins_url("images",__FILE__) ?>/" + alltypes[x] + ".png";
|
1622 |
+
}
|
1623 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1624 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
1625 |
+
}
|
1626 |
+
else {
|
1627 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
1628 |
+
}
|
1629 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1630 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1631 |
+
}
|
1632 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1633 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
1634 |
+
}
|
1635 |
+
else {
|
1636 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
1637 |
+
}
|
1638 |
+
document.getElementById('when_edit').style.display = 'none';
|
1639 |
+
}
|
1640 |
+
function enable2() {
|
1641 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
1642 |
+
for (x = 0; x < 14; x++) {
|
1643 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo plugins_url("images",__FILE__) ?>/" + alltypes[x] + ".png";
|
1644 |
+
}
|
1645 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
1646 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
1647 |
+
}
|
1648 |
+
else {
|
1649 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
1650 |
+
}
|
1651 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
1652 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
1653 |
+
}
|
1654 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
1655 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
1656 |
+
}
|
1657 |
+
else {
|
1658 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
1659 |
+
}
|
1660 |
+
document.getElementById('when_edit').style.display = 'block';
|
1661 |
+
if (document.getElementById('field_types').offsetWidth) {
|
1662 |
+
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
1663 |
+
}
|
1664 |
+
if (document.getElementById('field_types').offsetHeight) {
|
1665 |
+
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
1666 |
+
}
|
1667 |
+
}
|
1668 |
+
var thickDims, tbWidth, tbHeight;
|
1669 |
+
jQuery(document).ready(function($) {
|
1670 |
+
thickDims = function() {
|
1671 |
+
var tbWindow = jQuery('#TB_window'), H = jQuery(window).height(), W = jQuery(window).width(), w, h;
|
1672 |
+
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
1673 |
+
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
1674 |
+
if (tbWindow.size()) {
|
1675 |
+
tbWindow.width(w).height(h);
|
1676 |
+
jQuery('#TB_iframeContent').width(w).height(h - 27);
|
1677 |
+
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
1678 |
+
if (typeof document.body.style.maxWidth != 'undefined') {
|
1679 |
+
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
1680 |
+
}
|
1681 |
}
|
1682 |
+
};
|
1683 |
+
thickDims();
|
1684 |
+
jQuery(window).resize(function() { thickDims() });
|
1685 |
+
jQuery('a.thickbox-preview').click( function() {
|
1686 |
+
tb_click.call(this);
|
1687 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
1688 |
+
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
1689 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1690 |
}
|
1691 |
+
else {
|
1692 |
+
tbWidth = jQuery(window).width() - 120;
|
|
|
|
|
|
|
|
|
|
|
1693 |
}
|
1694 |
+
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
1695 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
|
|
|
|
|
|
|
|
|
|
1696 |
}
|
1697 |
+
else {
|
1698 |
+
tbHeight = jQuery(window).height() - 120;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1699 |
}
|
1700 |
+
if (alink.length) {
|
1701 |
+
url = alink.attr('href') || '';
|
1702 |
+
text = alink.attr('title') || '';
|
1703 |
+
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
|
|
|
|
1704 |
}
|
1705 |
+
else {
|
1706 |
+
text = jQuery(this).attr('title') || '';
|
1707 |
+
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
|
|
|
|
|
|
1708 |
}
|
1709 |
+
jQuery('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
1710 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
1711 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
1712 |
+
jQuery('#TB_iframeContent').width('100%');
|
1713 |
+
thickDims();
|
1714 |
+
return false;
|
1715 |
+
});
|
1716 |
+
// Theme details.
|
1717 |
+
jQuery('.theme-detail').click(function () {
|
1718 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
1719 |
+
return false;
|
1720 |
+
});
|
1721 |
+
});
|
1722 |
+
</script>
|
1723 |
+
<style>
|
1724 |
+
.calendar .button {
|
1725 |
+
display: table-cell !important;
|
1726 |
+
}
|
1727 |
+
#when_edit {
|
1728 |
+
position:absolute;
|
1729 |
+
background-color:#666;
|
1730 |
+
z-index:101;
|
1731 |
+
display:none;
|
1732 |
+
width:100%;
|
1733 |
+
height:100%;
|
1734 |
+
opacity: 0.7;
|
1735 |
+
filter: alpha(opacity = 70);
|
1736 |
+
}
|
1737 |
+
#formMakerDiv {
|
1738 |
+
position:fixed;
|
1739 |
+
background-color:#666;
|
1740 |
+
z-index:100;
|
1741 |
+
display:none;
|
1742 |
+
left:0;
|
1743 |
+
top:0;
|
1744 |
+
width:100%;
|
1745 |
+
height:100%;
|
1746 |
+
opacity: 0.7;
|
1747 |
+
filter: alpha(opacity = 70);
|
1748 |
+
}
|
1749 |
+
#formMakerDiv1 {
|
1750 |
+
padding-top:15px;
|
1751 |
+
position:fixed;
|
1752 |
+
z-index:100;
|
1753 |
+
background-color:transparent;
|
1754 |
+
top:0;
|
1755 |
+
left:0;
|
1756 |
+
display:none;
|
1757 |
+
margin-left:30px;
|
1758 |
+
margin-top:15px;
|
1759 |
+
}
|
1760 |
+
.formmaker_table input {
|
1761 |
+
border-radius: 3px;
|
1762 |
+
padding: 2px;
|
1763 |
+
}
|
1764 |
|
1765 |
+
.formmaker_table {
|
1766 |
+
border-radius: 8px;
|
1767 |
+
border: 6px #00aeef solid;
|
1768 |
+
background-color: #00aeef;
|
1769 |
+
height: 120px;
|
1770 |
+
width: 98%;
|
1771 |
+
}
|
1772 |
+
</style>
|
1773 |
+
<?php
|
1774 |
+
foreach ($themes as $theme) {
|
1775 |
+
if ($theme->default == 1) {
|
1776 |
+
$my_selected_theme = $theme->id;
|
1777 |
+
}
|
1778 |
+
}
|
1779 |
+
?>
|
1780 |
+
<div style="font-size:14px; font-weight:bold">
|
1781 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
1782 |
+
<br />
|
1783 |
+
This section allows you to add fields to your form.
|
1784 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-4.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1785 |
+
</div>
|
1786 |
+
<table width="95%">
|
1787 |
+
<thead>
|
1788 |
+
<tr>
|
1789 |
+
<td colspan="11">
|
1790 |
+
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%">
|
1791 |
+
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
1792 |
+
style="color:red; text-decoration:none;">
|
1793 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="www.web-dorado.com"
|
1794 |
+
width="215"><br>
|
1795 |
+
Get the full version
|
1796 |
+
</a>
|
1797 |
+
</div>
|
1798 |
+
</td>
|
1799 |
+
</tr>
|
1800 |
+
</thead>
|
1801 |
+
<tr>
|
1802 |
+
<td width="100%" ><?php echo "<h2>Form Maker</h2>"; ?></td>
|
1803 |
+
<td>
|
1804 |
+
<a id="preview_form" href="<?php echo admin_url('admin-ajax.php').'?action=frommakerpreview&id='.$my_selected_theme.'&TB_iframe=1'; ?>" class="thickbox-preview" title="Form Preview" onclick="return false;"><input type="button" value="preview" class="button-primary" /></a>
|
1805 |
+
</td>
|
1806 |
+
<td>
|
1807 |
+
<input type="button" onclick="submitbutton('form_options')" value="Form options" class="button-primary" />
|
1808 |
+
</td>
|
1809 |
+
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action" /> </td>
|
1810 |
+
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply" class="button-secondary action"/> </td>
|
1811 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=Form_maker'" value="Cancel" class="button-secondary action" /> </td>
|
1812 |
+
</tr>
|
1813 |
+
</table>
|
1814 |
+
<br />
|
1815 |
+
<form action="admin.php?page=Form_maker" method="post" id="adminForm" name="adminForm" enctype="multipart/form-data">
|
1816 |
+
<div class="formmaker_table" width="100%">
|
1817 |
+
<div style="float:left; text-align:center">
|
1818 |
+
</br>
|
1819 |
+
<img src="<?php echo plugins_url("images/formmaker.png",__FILE__) ?>"/>
|
1820 |
+
</br>
|
1821 |
+
</br>
|
1822 |
+
<img src="<?php echo plugins_url("images/logo.png",__FILE__) ?>"/>
|
1823 |
+
</div>
|
1824 |
+
<div style="float:right">
|
1825 |
+
<span style="font-size:16.76pt; font-family:tahoma; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
1826 |
+
<input type="hidden" value="<?php echo plugins_url("",__FILE__) ?>" id="form_plugins_url" />
|
1827 |
+
<input id="title" name="title" style="width:160px; height:19px; border:none; font-size:11px;" value=""/>
|
1828 |
+
<br />
|
1829 |
+
<img src="<?php echo plugins_url("images/formoptions.png",__FILE__) ?>" onclick="submitbutton('form_options')" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
1830 |
+
<br />
|
1831 |
+
<br />
|
1832 |
+
<br />
|
1833 |
+
<img src="<?php echo plugins_url("images/addanewfield.png",__FILE__) ?>" onclick="enable(); Enable()" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
1834 |
+
</div>
|
1835 |
+
</div>
|
1836 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
1837 |
+
<div id="formMakerDiv1" align="center">
|
1838 |
+
<table border="0" width="95%" cellpadding="0" cellspacing="0" height="100%" style="border:6px #00aeef solid; background-color:#FFF">
|
1839 |
+
<tr>
|
1840 |
+
<td style="padding:0px">
|
1841 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
1842 |
+
<tr valign="top">
|
1843 |
+
<td width="15%" height="100%" style="border-right:dotted black 1px;" id="field_types">
|
1844 |
+
<div id="when_edit" style="display:none"></div>
|
1845 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
1846 |
+
<tr>
|
1847 |
+
<td align="center" onClick="addRow('customHTML')" id="table_editor" class="field_buttons"><img
|
1848 |
+
src="<?php echo plugins_url("images/customHTML.png", __FILE__); ?>" style="margin:5px"
|
1849 |
+
id="img_customHTML"/></td>
|
1850 |
+
|
1851 |
+
<td align="center" onClick="addRow('text')" id="table_text" class="field_buttons"><img
|
1852 |
+
src="<?php echo plugins_url("images/text.png", __FILE__); ?>" style="margin:5px" id="img_text"/>
|
1853 |
+
</td>
|
1854 |
+
</tr>
|
1855 |
+
<tr>
|
1856 |
+
<td align="center" onClick="addRow('time_and_date')" id="table_time_and_date" class="field_buttons">
|
1857 |
+
<img src="<?php echo plugins_url("images/time_and_date.png", __FILE__); ?>" style="margin:5px"
|
1858 |
+
id="img_time_and_date"/></td>
|
1859 |
+
|
1860 |
+
<td align="center" onClick="addRow('select')" id="table_select" class="field_buttons"><img
|
1861 |
+
src="<?php echo plugins_url("images/select.png", __FILE__); ?>" style="margin:5px" id="img_select"/>
|
1862 |
+
</td>
|
1863 |
+
</tr>
|
1864 |
+
<tr>
|
1865 |
+
<td align="center" onClick="addRow('checkbox')" id="table_checkbox" class="field_buttons"><img
|
1866 |
+
src="<?php echo plugins_url("images/checkbox.png", __FILE__); ?>" style="margin:5px"
|
1867 |
+
id="img_checkbox"/></td>
|
1868 |
+
|
1869 |
+
<td align="center" onClick="addRow('radio')" id="table_radio" class="field_buttons"><img
|
1870 |
+
src="<?php echo plugins_url("images/radio.png", __FILE__); ?>" style="margin:5px" id="img_radio"/>
|
1871 |
+
</td>
|
1872 |
+
</tr>
|
1873 |
+
<tr>
|
1874 |
+
<td align="center"
|
1875 |
+
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
1876 |
+
style="background-color: rgb(114, 113, 113) !important;" id="table_file_upload"
|
1877 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/file_upload.png", __FILE__); ?>"
|
1878 |
+
style="margin:5px" id="img_file_upload"/></td>
|
1879 |
+
|
1880 |
+
<td align="center" onClick="addRow('captcha')" id="table_captcha" class="field_buttons"><img
|
1881 |
+
src="<?php echo plugins_url("images/captcha.png", __FILE__); ?>" style="margin:5px"
|
1882 |
+
id="img_captcha"/></td>
|
1883 |
+
</tr>
|
1884 |
+
<tr>
|
1885 |
+
<td align="center" onClick="addRow('page_break')" id="table_page_break" class="field_buttons"><img
|
1886 |
+
src="<?php echo plugins_url("images/page_break.png", __FILE__); ?>" style="margin:5px"
|
1887 |
+
id="img_page_break"/></td>
|
1888 |
+
|
1889 |
+
<td align="center" onClick="addRow('section_break')" id="table_section_break" class="field_buttons">
|
1890 |
+
<img src="<?php echo plugins_url("images/section_break.png", __FILE__); ?>" style="margin:5px"
|
1891 |
+
id="img_section_break"/></td>
|
1892 |
+
</tr>
|
1893 |
+
<tr>
|
1894 |
+
<td align="center"
|
1895 |
+
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
1896 |
+
style="background-color: rgb(114, 113, 113) !important;" id="table_map" class="field_buttons"><img
|
1897 |
+
src="<?php echo plugins_url("images/map.png", __FILE__); ?>" style="margin:5px" id="img_map"/></td>
|
1898 |
+
<td align="center" onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" style="background-color: rgb(114, 113, 113) !important;" id="table_paypal" class="field_buttons"><img src="<?php echo plugins_url("images/paypal.png",__FILE__); ?>" style="margin:5px" id="img_paypal"/></td>
|
1899 |
+
</tr>
|
1900 |
+
<tr>
|
1901 |
+
<td align="center" onClick="addRow('survey')" class="field_buttons" id="table_survey"><img src="<?php echo plugins_url("images/survey.png", __FILE__); ?>" style="margin:5px" id="img_survey"/></td>
|
1902 |
+
<td align="center" onClick="addRow('button')" id="table_button" class="field_buttons"><img src="<?php echo plugins_url("images/button.png", __FILE__); ?>" style="margin:5px" id="img_button"/></td>
|
1903 |
+
</tr>
|
1904 |
+
</table>
|
1905 |
+
</td>
|
1906 |
+
<td width="40%" height="100%" align="left">
|
1907 |
+
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:575px"></div>
|
1908 |
+
</td>
|
1909 |
+
<td align="center" valign="top" style="background:url(<?php echo plugins_url("images/border2.png",__FILE__); ?>) repeat-y;"> </td>
|
1910 |
+
<td style="padding:15px">
|
1911 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
1912 |
+
<tr>
|
1913 |
+
<td align="right"><input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
1914 |
+
At The End
|
1915 |
+
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
1916 |
+
At The Beginning
|
1917 |
+
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
1918 |
+
Before
|
1919 |
+
<select style="width:100px; margin-left:5px" id="sel_el_pos" disabled="disabled">
|
1920 |
+
</select>
|
1921 |
+
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo plugins_url("images/save.png",__FILE__); ?>" onClick="add(0)"/>
|
1922 |
+
<img alt="CANCEL" title="cancel" style=" cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo plugins_url("images/cancel_but.png",__FILE__); ?>" onClick="close_window()"/>
|
1923 |
+
<hr style=" margin-bottom:10px" />
|
1924 |
+
</td>
|
1925 |
+
</tr>
|
1926 |
+
<tr height="100%" valign="top">
|
1927 |
+
<td id="show_table"></td>
|
1928 |
+
</tr>
|
1929 |
+
</table>
|
1930 |
+
</td>
|
1931 |
+
</tr>
|
1932 |
+
</table>
|
1933 |
+
</td>
|
1934 |
+
</tr>
|
1935 |
+
</table>
|
1936 |
+
<input type="hidden" id="old" />
|
1937 |
+
<input type="hidden" id="old_selected" />
|
1938 |
+
<input type="hidden" id="element_type" />
|
1939 |
+
<input type="hidden" id="editing_id" />
|
1940 |
+
<input type="hidden" id="editing_page_break" />
|
1941 |
+
<div id="main_editor" style="position:absolute; display:none; z-index:140;">
|
1942 |
+
<?php
|
1943 |
+
if (function_exists ('the_editor') || function_exists ('wp_editor')) {
|
1944 |
+
if (get_bloginfo('version') < '3.3') {
|
1945 |
+
?>
|
1946 |
+
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
1947 |
+
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor("","form_maker_editor","title",$media_buttons = true, $tab_index = 1, $extended = true ); ?>
|
1948 |
+
</div>
|
1949 |
+
</div>
|
1950 |
+
<?php
|
1951 |
}
|
1952 |
else {
|
1953 |
+
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>"; wp_editor("","form_maker_editor");
|
|
|
1954 |
}
|
|
|
|
|
1955 |
}
|
1956 |
+
else {
|
1957 |
+
?>
|
1958 |
+
<textarea name="editor" id="editor" cols="40" rows="6" style="width: 450px; height: 350px; " class="mce_editable" aria-hidden="true"></textarea>
|
1959 |
+
<?php
|
1960 |
+
}
|
1961 |
+
?>
|
1962 |
+
</div>
|
1963 |
+
</div>
|
1964 |
+
<?php
|
1965 |
+
if (!function_exists ('the_editor')) {
|
1966 |
+
?>
|
1967 |
+
<iframe id="tinymce" style="display:none"></iframe>
|
1968 |
+
<?php
|
1969 |
+
}
|
1970 |
+
?>
|
1971 |
+
<br />
|
1972 |
+
<br />
|
1973 |
+
<fieldset>
|
1974 |
+
<legend><h2 style="color:#00aeef">Form</h2></legend>
|
1975 |
+
<style><?php global $first_css; echo $first_css; ?></style>
|
1976 |
+
<table width="100%" style="margin:8px">
|
1977 |
+
<tr id="page_navigation">
|
1978 |
+
<td align="center" width="90%" id="pages" show_title="false" show_numbers="true" type="none"></td>
|
1979 |
+
<td align="left" id="edit_page_navigation"></td>
|
1980 |
+
</tr>
|
1981 |
+
</table>
|
1982 |
+
<div id="take" class="main">
|
1983 |
+
<table cellpadding="4" cellspacing="0" class="wdform_table1" style="border-top:0px solid black;">
|
1984 |
+
<tbody id="form_id_tempform_view1" class="wdform_tbody1" page_title="Untitled page" next_title="Next" next_type="button" next_class="wdform_page_button" next_checkable="false" previous_title="Previous" previous_type="button" previous_class="wdform_page_button" previous_checkable="false">
|
1985 |
+
<tr class="wdform_tr1">
|
1986 |
+
<td class="wdform_td1" >
|
1987 |
+
<table class="wdform_table2">
|
1988 |
+
<tbody class="wdform_tbody2"></tbody>
|
1989 |
+
</table>
|
1990 |
+
</td>
|
1991 |
+
</tr>
|
1992 |
+
<tr class="wdform_footer">
|
1993 |
+
<td colspan="100" valign="top">
|
1994 |
+
<table width="100%" style="padding-right:170px"><tbody><tr id="form_id_temppage_nav1"></tr></tbody></table>
|
1995 |
+
</td>
|
1996 |
+
</tr>
|
1997 |
+
<tbody id="form_id_tempform_view_img1" style="float:right !important ;" >
|
1998 |
+
<tr>
|
1999 |
+
<td width="0%"></td>
|
2000 |
+
<td align="right">
|
2001 |
+
<img src="<?php echo plugins_url("images/minus.png",__FILE__); ?>" title="Show or hide the page" class="page_toolbar" onclick="show_or_hide('1')" onmouseover="chnage_icons_src(this,'minus')" onmouseout="chnage_icons_src(this,'minus')" id="show_page_img_1" />
|
2002 |
+
</td>
|
2003 |
+
<td>
|
2004 |
+
<img src="<?php echo plugins_url("images/page_delete.png",__FILE__); ?>" title="Delete the page" class="page_toolbar" onclick="remove_page('1')" onmouseover="chnage_icons_src(this,'page_delete')" onmouseout="chnage_icons_src(this,'page_delete')" />
|
2005 |
+
</td>
|
2006 |
+
<td>
|
2007 |
+
<img src="<?php echo plugins_url("images/page_delete_all.png",__FILE__); ?>" title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all('1')" onmouseover="chnage_icons_src(this,'page_delete_all')" onmouseout="chnage_icons_src(this,'page_delete_all')" />
|
2008 |
+
</td>
|
2009 |
+
<td>
|
2010 |
+
<img src="<?php echo plugins_url("images/page_edit.png",__FILE__); ?>" title="Edit the page" class="page_toolbar" onclick="edit_page_break('1')" onmouseover="chnage_icons_src(this,'page_edit')" onmouseout="chnage_icons_src(this,'page_edit')" />
|
2011 |
+
</td>
|
2012 |
+
</tr>
|
2013 |
+
</tbody>
|
2014 |
+
</table>
|
2015 |
+
</div>
|
2016 |
+
</fieldset>
|
2017 |
+
<input type="hidden" name="form_front" id="form_front" />
|
2018 |
+
<input type="hidden" name="form" id="form" />
|
2019 |
+
<input type="hidden" name="counter" id="counter" />
|
2020 |
+
<input type="hidden" name="pagination" id="pagination" />
|
2021 |
+
<input type="hidden" name="show_title" id="show_title" />
|
2022 |
+
<input type="hidden" name="show_numbers" id="show_numbers" />
|
2023 |
+
<input type="hidden" name="public_key" id="public_key" />
|
2024 |
+
<input type="hidden" name="private_key" id="private_key" />
|
2025 |
+
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
2026 |
+
<input type="hidden" name="script_mail" id="script_mail" value="%all%"/>
|
2027 |
+
<input type="hidden" name="script_mail_user" id="script_mail_user" value="%all%"/>
|
2028 |
+
<input type="hidden" name="label_order" id="label_order" />
|
2029 |
+
<input type="hidden" name="label_order_current" id="label_order_current"/>
|
2030 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
2031 |
+
<input type="hidden" name="task" value="" />
|
2032 |
+
</form>
|
2033 |
+
<script>
|
2034 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
2035 |
+
//appWidth =parseInt(document.body.offsetWidth);
|
2036 |
+
//appHeight =parseInt(document.body.offsetHeight);
|
2037 |
+
//document.getElementById('toolbar-popup-popup').childNodes[1].href='index.php?option=com_formmaker&task=preview&tmpl=component&theme='+document.getElementById('theme').value;
|
2038 |
+
//document.getElementById('toolbar-popup-popup').childNodes[1].setAttribute('rel',"{handler: 'iframe', size: {x:"+(appWidth-100)+", y: "+(appHeight-30)+"}}");
|
2039 |
+
</script>
|
2040 |
+
<?php
|
2041 |
+
}
|
2042 |
|
2043 |
+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
2044 |
|
2045 |
+
function html_edit_form_maker($row, $labels, $themes) {
|
2046 |
+
?>
|
2047 |
+
<script type="text/javascript">
|
2048 |
+
// Edit paypal properties page open in popup.
|
2049 |
+
function form_maker_edit_in_popup(id) {
|
2050 |
+
// $ = jQuery;
|
2051 |
+
var thickDims, tbWidth, tbHeight;
|
2052 |
+
thickDims = function() {
|
2053 |
+
var tbWindow = jQuery('#TB_window'), H = jQuery(window).height(), W = jQuery(window).width(), w, h;
|
2054 |
+
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
2055 |
+
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
2056 |
+
if (tbWindow.size()) {
|
2057 |
+
tbWindow.width(w).height(h);
|
2058 |
+
jQuery('#TB_iframeContent').width(w).height(h - 27);
|
2059 |
+
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
2060 |
+
if (typeof document.body.style.maxWidth != 'undefined') {
|
2061 |
+
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
2062 |
+
}
|
2063 |
}
|
2064 |
+
};
|
2065 |
+
thickDims();
|
2066 |
+
jQuery(window).resize( function() { thickDims() } );
|
2067 |
+
jQuery('a.thickbox-preview' + id).click( function() {
|
2068 |
+
tb_click.call(this);
|
2069 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
2070 |
+
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
2071 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
|
|
|
|
2072 |
}
|
2073 |
+
else {
|
2074 |
+
tbWidth = jQuery(window).width() - 120;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2075 |
}
|
2076 |
+
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
2077 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
2078 |
}
|
2079 |
+
else {
|
2080 |
+
tbHeight = jQuery(window).height() - 120;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2081 |
}
|
2082 |
+
if (alink.length) {
|
2083 |
+
url = alink.attr('href') || '';
|
2084 |
+
text = alink.attr('title') || '';
|
2085 |
+
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
2086 |
+
}
|
2087 |
+
else {
|
2088 |
+
text = jQuery(this).attr('title') || '';
|
2089 |
+
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
2090 |
+
}
|
2091 |
+
jQuery('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
2092 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
2093 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
2094 |
+
jQuery('#TB_iframeContent').width('100%');
|
2095 |
+
thickDims();
|
2096 |
+
return false;
|
2097 |
+
});
|
2098 |
+
}
|
2099 |
+
function submitform(pressbutton) {
|
2100 |
+
document.getElementById('adminForm').action=document.getElementById('adminForm').action+"&task="+pressbutton;
|
2101 |
+
document.getElementById('adminForm').submit();
|
2102 |
+
}
|
2103 |
+
function submitbutton(pressbutton) {
|
2104 |
+
if (!document.getElementById('araqel')) {
|
2105 |
+
alert('Please wait while page loading');
|
2106 |
+
return;
|
2107 |
+
}
|
2108 |
+
else
|
2109 |
+
if(document.getElementById('araqel').value=='0')
|
2110 |
{
|
2111 |
+
alert('Please wait while page loading');
|
2112 |
+
return;
|
|
|
|
|
2113 |
}
|
2114 |
+
var form = document.adminForm;
|
2115 |
+
if (pressbutton == 'cancel') {
|
2116 |
+
submitform(pressbutton);
|
2117 |
+
return;
|
2118 |
+
}
|
2119 |
+
if (form.title.value == "") {
|
2120 |
+
alert("The form must have a title.");
|
2121 |
+
return;
|
2122 |
+
}
|
2123 |
+
tox = '';
|
2124 |
+
l_id_array=[<?php echo $labels['id']?>];
|
2125 |
+
l_label_array=[<?php echo $labels['label']?>];
|
2126 |
+
l_type_array=[<?php echo $labels['type']?>];
|
2127 |
+
l_id_removed=[];
|
2128 |
+
for (x=0; x< l_id_array.length; x++) {
|
2129 |
+
l_id_removed[l_id_array[x]]=true;
|
2130 |
+
}
|
2131 |
+
for (t=1;t<=form_view_max;t++) {
|
2132 |
+
if(document.getElementById('form_id_tempform_view'+t))
|
2133 |
{
|
2134 |
+
form_view_element=document.getElementById('form_id_tempform_view'+t);
|
2135 |
+
n=form_view_element.childNodes.length-2;
|
2136 |
+
|
2137 |
+
for(q=0;q<=n;q++)
|
2138 |
+
{
|
2139 |
+
if(form_view_element.childNodes[q].nodeType!=3)
|
2140 |
+
if(!form_view_element.childNodes[q].id)
|
2141 |
+
{
|
2142 |
+
GLOBAL_tr=form_view_element.childNodes[q];
|
2143 |
+
|
2144 |
+
for (x=0; x < GLOBAL_tr.firstChild.childNodes.length; x++)
|
2145 |
+
{
|
2146 |
+
|
2147 |
+
table=GLOBAL_tr.firstChild.childNodes[x];
|
2148 |
+
tbody=table.firstChild;
|
2149 |
+
for (y=0; y < tbody.childNodes.length; y++)
|
2150 |
+
{
|
2151 |
+
is_in_old=false;
|
2152 |
+
tr=tbody.childNodes[y];
|
2153 |
+
l_id=tr.id;
|
2154 |
+
|
2155 |
+
l_label=document.getElementById( tr.id+'_element_labelform_id_temp').innerHTML;
|
2156 |
+
l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
|
2157 |
+
l_type=tr.getAttribute('type');
|
2158 |
+
for (z = 0; z < l_id_array.length; z++) {
|
2159 |
+
if (l_id_array[z] == l_id) {
|
2160 |
+
if (l_type_array[z] == "type_address") {
|
2161 |
+
if (document.getElementById(l_id + "_mini_label_street1")) {
|
2162 |
+
l_id_removed[l_id_array[z]] = false;
|
2163 |
+
}
|
2164 |
+
if (document.getElementById(l_id+"_mini_label_street2")) {
|
2165 |
+
l_id_removed[parseInt(l_id_array[z]) + 1] = false;
|
2166 |
+
}
|
2167 |
+
if (document.getElementById(l_id+"_mini_label_city")) {
|
2168 |
+
l_id_removed[parseInt(l_id_array[z]) + 2] = false;
|
2169 |
+
}
|
2170 |
+
if (document.getElementById(l_id+"_mini_label_state")) {
|
2171 |
+
l_id_removed[parseInt(l_id_array[z]) + 3] = false;
|
2172 |
+
}
|
2173 |
+
if (document.getElementById(l_id+"_mini_label_postal")) {
|
2174 |
+
l_id_removed[parseInt(l_id_array[z]) + 4] = false;
|
2175 |
+
}
|
2176 |
+
if (document.getElementById(l_id+"_mini_label_country")) {
|
2177 |
+
l_id_removed[parseInt(l_id_array[z]) + 5] = false;
|
2178 |
+
}
|
2179 |
+
z = z + 5;
|
2180 |
+
}
|
2181 |
+
else {
|
2182 |
+
l_id_removed[l_id] = false;
|
2183 |
+
}
|
2184 |
+
}
|
2185 |
+
}
|
2186 |
+
|
2187 |
+
if(tr.getAttribute('type')=="type_address") {
|
2188 |
+
addr_id=parseInt(tr.id);
|
2189 |
+
id_for_country= addr_id;
|
2190 |
+
if(document.getElementById(id_for_country+"_mini_label_street1"))
|
2191 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
2192 |
+
if(document.getElementById(id_for_country+"_mini_label_street2"))
|
2193 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
|
2194 |
+
if(document.getElementById(id_for_country+"_mini_label_city"))
|
2195 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_city").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
2196 |
+
if(document.getElementById(id_for_country+"_mini_label_state"))
|
2197 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_state").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
2198 |
+
if(document.getElementById(id_for_country+"_mini_label_postal"))
|
2199 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
|
2200 |
+
if(document.getElementById(id_for_country+"_mini_label_country"))
|
2201 |
+
tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_country").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';
|
2202 |
+
}
|
2203 |
+
else {
|
2204 |
+
tox=tox+l_id+'#**id**#'+l_label+'#**label**#'+l_type+'#****#';
|
2205 |
+
}
|
2206 |
+
}
|
2207 |
+
}
|
2208 |
+
}
|
2209 |
+
}
|
2210 |
+
}
|
2211 |
+
}
|
2212 |
+
document.getElementById('label_order_current').value = tox;
|
2213 |
+
for (x = 0; x < l_id_array.length; x++) {
|
2214 |
+
if (l_id_removed[l_id_array[x]]) {
|
2215 |
+
tox = tox + l_id_array[x] + '#**id**#' + l_label_array[x] + '#**label**#' + l_type_array[x] + '#****#';
|
2216 |
}
|
2217 |
}
|
2218 |
+
document.getElementById('label_order').value = tox;
|
2219 |
+
refresh_();
|
2220 |
+
document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
|
2221 |
+
document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
|
2222 |
+
document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
|
2223 |
+
submitform( pressbutton );
|
2224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2225 |
|
2226 |
+
function remove_whitespace(node) {
|
2227 |
+
var ttt;
|
2228 |
+
for (ttt = 0; ttt < node.childNodes.length; ttt++) {
|
2229 |
+
if (node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test(node.childNodes[ttt].nodeValue)) {
|
2230 |
+
node.removeChild(node.childNodes[ttt]);
|
2231 |
+
ttt--;
|
2232 |
+
}
|
2233 |
+
else {
|
2234 |
+
if (node.childNodes[ttt].childNodes.length) {
|
2235 |
+
remove_whitespace(node.childNodes[ttt]);
|
2236 |
+
}
|
2237 |
+
}
|
2238 |
}
|
2239 |
+
return;
|
2240 |
}
|
2241 |
+
function refresh_() {
|
2242 |
+
document.getElementById('form').value = document.getElementById('take').innerHTML;
|
2243 |
+
document.getElementById('counter').value = gen;
|
2244 |
+
n = gen;
|
2245 |
+
for (i = 0; i < n; i++) {
|
2246 |
+
if (document.getElementById(i)) {
|
2247 |
+
for (z = 0; z < document.getElementById(i).childNodes.length; z++)
|
2248 |
+
if (document.getElementById(i).childNodes[z].nodeType == 3)
|
2249 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
|
2250 |
+
|
2251 |
+
if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
|
2252 |
+
if (document.getElementById(i).childNodes[10]) {
|
2253 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2254 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2255 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2256 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2257 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2258 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2259 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2260 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2261 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2262 |
+
}
|
2263 |
+
else {
|
2264 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2265 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2266 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2267 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2268 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2269 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2270 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2271 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2272 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2273 |
+
}
|
2274 |
+
continue;
|
2275 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2276 |
|
2277 |
+
if (document.getElementById(i).getAttribute('type') == "type_section_break") {
|
2278 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2279 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2280 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2281 |
+
continue;
|
2282 |
+
}
|
|
|
|
|
2283 |
|
|
|
|
|
|
|
2284 |
|
2285 |
+
if (document.getElementById(i).childNodes[10]) {
|
2286 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2287 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2288 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2289 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2290 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2291 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2292 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2293 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2294 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
|
2295 |
+
}
|
2296 |
+
else {
|
2297 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2298 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2299 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2300 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2301 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2302 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2303 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2304 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2305 |
+
document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
|
2306 |
+
}
|
2307 |
+
}
|
2308 |
+
}
|
2309 |
|
2310 |
+
for (i = 0; i <= n; i++) {
|
2311 |
+
if (document.getElementById(i)) {
|
2312 |
+
type = document.getElementById(i).getAttribute("type");
|
2313 |
+
switch (type) {
|
2314 |
+
case "type_text":
|
2315 |
+
case "type_number":
|
2316 |
+
case "type_password":
|
2317 |
+
case "type_submitter_mail":
|
2318 |
+
case "type_own_select":
|
2319 |
+
case "type_country":
|
2320 |
+
case "type_hidden":
|
2321 |
+
case "type_map":
|
2322 |
+
{
|
2323 |
+
remove_add_(i + "_elementform_id_temp");
|
2324 |
+
break;
|
2325 |
+
}
|
2326 |
|
2327 |
+
case "type_submit_reset":
|
2328 |
+
{
|
2329 |
+
remove_add_(i + "_element_submitform_id_temp");
|
2330 |
+
if (document.getElementById(i + "_element_resetform_id_temp"))
|
2331 |
+
remove_add_(i + "_element_resetform_id_temp");
|
2332 |
+
break;
|
2333 |
+
}
|
2334 |
|
2335 |
+
case "type_captcha":
|
2336 |
+
{
|
2337 |
+
remove_add_("_wd_captchaform_id_temp");
|
2338 |
+
remove_add_("_element_refreshform_id_temp");
|
2339 |
+
remove_add_("_wd_captcha_inputform_id_temp");
|
2340 |
+
break;
|
2341 |
+
}
|
2342 |
|
2343 |
+
case "type_recaptcha":
|
2344 |
+
{
|
2345 |
+
document.getElementById("public_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("public_key");
|
2346 |
+
document.getElementById("private_key").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("private_key");
|
2347 |
+
document.getElementById("recaptcha_theme").value = document.getElementById("wd_recaptchaform_id_temp").getAttribute("theme");
|
2348 |
+
document.getElementById('wd_recaptchaform_id_temp').innerHTML = '';
|
2349 |
+
remove_add_("wd_recaptchaform_id_temp");
|
2350 |
+
break;
|
2351 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2352 |
|
2353 |
+
case "type_file_upload":
|
2354 |
+
{
|
2355 |
+
remove_add_(i + "_elementform_id_temp");
|
2356 |
|
2357 |
+
break;
|
2358 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2359 |
|
2360 |
+
case "type_textarea":
|
2361 |
+
{
|
2362 |
+
remove_add_(i + "_elementform_id_temp");
|
|
|
|
|
2363 |
|
2364 |
+
break;
|
2365 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2366 |
|
2367 |
+
case "type_name":
|
2368 |
+
{
|
|
|
2369 |
|
2370 |
+
if (document.getElementById(i + "_element_titleform_id_temp")) {
|
2371 |
+
remove_add_(i + "_element_titleform_id_temp");
|
2372 |
+
remove_add_(i + "_element_firstform_id_temp");
|
2373 |
+
remove_add_(i + "_element_lastform_id_temp");
|
2374 |
+
remove_add_(i + "_element_middleform_id_temp");
|
2375 |
+
}
|
2376 |
+
else {
|
2377 |
+
remove_add_(i + "_element_firstform_id_temp");
|
2378 |
+
remove_add_(i + "_element_lastform_id_temp");
|
2379 |
+
}
|
2380 |
+
break;
|
2381 |
|
2382 |
+
}
|
2383 |
|
2384 |
+
case "type_phone":
|
2385 |
+
{
|
2386 |
|
2387 |
+
remove_add_(i + "_element_firstform_id_temp");
|
2388 |
+
remove_add_(i + "_element_lastform_id_temp");
|
2389 |
+
break;
|
2390 |
|
2391 |
+
}
|
2392 |
+
case "type_address":
|
2393 |
+
{
|
2394 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('street1')=='no')
|
2395 |
+
remove_add_(i+"_street1form_id_temp");
|
2396 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('street2')=='no')
|
2397 |
+
remove_add_(i+"_street2form_id_temp");
|
2398 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('city')=='no')
|
2399 |
+
remove_add_(i+"_cityform_id_temp");
|
2400 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('state')=='no')
|
2401 |
+
remove_add_(i+"_stateform_id_temp");
|
2402 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('postal')=='no')
|
2403 |
+
remove_add_(i+"_postalform_id_temp");
|
2404 |
+
if(document.getElementById(id_for_country+"_disable_fieldsform_id_temp").getAttribute('country')=='no')
|
2405 |
+
remove_add_(i+"_countryform_id_temp");
|
2406 |
+
break;
|
2407 |
|
2408 |
+
}
|
2409 |
|
|
|
2410 |
|
2411 |
+
case "type_checkbox":
|
2412 |
+
case "type_radio":
|
2413 |
+
{
|
2414 |
+
is = true;
|
2415 |
+
for (j = 0; j < 100; j++)
|
2416 |
+
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
2417 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
2418 |
+
}
|
2419 |
+
break;
|
2420 |
+
}
|
2421 |
+
case "type_star_rating":
|
2422 |
+
{
|
2423 |
+
remove_add_(i+"_elementform_id_temp");
|
2424 |
+
|
2425 |
+
break;
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
case "type_scale_rating":
|
2429 |
+
{
|
2430 |
+
remove_add_(i+"_elementform_id_temp");
|
2431 |
+
|
2432 |
+
break;
|
2433 |
+
}
|
2434 |
+
case "type_spinner":
|
2435 |
+
{
|
2436 |
+
remove_add_(i+"_elementform_id_temp");
|
2437 |
+
|
2438 |
+
break;
|
2439 |
+
}
|
2440 |
+
case "type_slider":
|
2441 |
+
{
|
2442 |
+
remove_add_(i+"_elementform_id_temp");
|
2443 |
+
|
2444 |
+
break;
|
2445 |
+
}
|
2446 |
+
case "type_range":
|
2447 |
+
{
|
2448 |
+
remove_add_(i+"_elementform_id_temp0");
|
2449 |
+
remove_add_(i+"_elementform_id_temp1");
|
2450 |
+
|
2451 |
+
break;
|
2452 |
+
}
|
2453 |
+
case "type_grading":
|
2454 |
+
{
|
2455 |
+
|
2456 |
+
for(k=0; k<100; k++)
|
2457 |
+
if(document.getElementById(i+"_elementform_id_temp"+k))
|
2458 |
+
{
|
2459 |
+
remove_add_(i+"_elementform_id_temp"+k);
|
2460 |
+
}
|
2461 |
+
|
2462 |
+
|
2463 |
+
break;
|
2464 |
+
}
|
2465 |
+
case "type_matrix":
|
2466 |
+
{
|
2467 |
+
remove_add_(i+"_elementform_id_temp");
|
2468 |
+
|
2469 |
+
break;
|
2470 |
+
}
|
2471 |
+
|
2472 |
+
case "type_button":
|
2473 |
+
{
|
2474 |
+
for (j = 0; j < 100; j++)
|
2475 |
+
if (document.getElementById(i + "_elementform_id_temp" + j)) {
|
2476 |
+
remove_add_(i + "_elementform_id_temp" + j);
|
2477 |
+
}
|
2478 |
+
break;
|
2479 |
+
}
|
2480 |
|
2481 |
+
case "type_time":
|
2482 |
+
{
|
2483 |
+
if (document.getElementById(i + "_ssform_id_temp")) {
|
2484 |
+
remove_add_(i + "_ssform_id_temp");
|
2485 |
+
remove_add_(i + "_mmform_id_temp");
|
2486 |
+
remove_add_(i + "_hhform_id_temp");
|
2487 |
+
}
|
2488 |
+
else {
|
2489 |
+
remove_add_(i + "_mmform_id_temp");
|
2490 |
+
remove_add_(i + "_hhform_id_temp");
|
2491 |
|
2492 |
+
}
|
2493 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2494 |
|
2495 |
+
}
|
2496 |
|
2497 |
+
case "type_date":
|
2498 |
+
{
|
2499 |
+
remove_add_(i + "_elementform_id_temp");
|
2500 |
+
remove_add_(i + "_buttonform_id_temp");
|
2501 |
|
2502 |
+
break;
|
2503 |
+
}
|
2504 |
+
case "type_date_fields":
|
2505 |
+
{
|
2506 |
+
remove_add_(i + "_dayform_id_temp");
|
2507 |
+
remove_add_(i + "_monthform_id_temp");
|
2508 |
+
remove_add_(i + "_yearform_id_temp");
|
2509 |
+
break;
|
2510 |
+
}
|
2511 |
+
}
|
2512 |
+
}
|
2513 |
}
|
|
|
2514 |
|
|
|
2515 |
for (i = 1; i <= form_view_max; i++) {
|
2516 |
if (document.getElementById('form_id_tempform_view' + i)) {
|
2517 |
+
if (document.getElementById('page_next_' + i))
|
2518 |
+
document.getElementById('page_next_' + i).removeAttribute('src');
|
2519 |
+
if (document.getElementById('page_previous_' + i))
|
2520 |
+
document.getElementById('page_previous_' + i).removeAttribute('src');
|
2521 |
+
|
2522 |
+
document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
|
2523 |
+
document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
|
2524 |
}
|
2525 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2526 |
|
2527 |
+
for (t = 1; t <= form_view_max; t++) {
|
2528 |
+
if (document.getElementById('form_id_tempform_view' + t)) {
|
2529 |
+
form_view_element = document.getElementById('form_id_tempform_view' + t);
|
2530 |
+
remove_whitespace(form_view_element);
|
2531 |
+
n = form_view_element.childNodes.length - 2;
|
2532 |
+
for (q = 0; q <= n; q++) {
|
2533 |
+
if (form_view_element.childNodes[q]) {
|
2534 |
+
if (form_view_element.childNodes[q].nodeType != 3) {
|
2535 |
+
if (!form_view_element.childNodes[q].id) {
|
2536 |
+
del = true;
|
2537 |
+
GLOBAL_tr = form_view_element.childNodes[q];
|
2538 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
2539 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
2540 |
+
tbody = table.firstChild;
|
2541 |
+
if (tbody.childNodes.length) {
|
2542 |
+
del = false;
|
2543 |
+
}
|
2544 |
+
}
|
2545 |
|
2546 |
+
if (del) {
|
2547 |
+
form_view_element.removeChild(form_view_element.childNodes[q]);
|
2548 |
+
}
|
2549 |
+
}
|
2550 |
+
}
|
2551 |
+
}
|
2552 |
+
}
|
2553 |
+
}
|
2554 |
+
}
|
2555 |
+
document.getElementById('form_front').value = document.getElementById('take').innerHTML;
|
2556 |
}
|
2557 |
+
function set_preview() {
|
2558 |
+
appWidth = parseInt(document.body.offsetWidth);
|
2559 |
+
appHeight = parseInt(document.body.offsetHeight);
|
2560 |
+
document.getElementById('preview_form').href = '<?php echo admin_url('admin-ajax.php'); ?>?action=frommakerpreview&id='+document.getElementById('theme').value+'&TB_iframe=1';
|
|
|
|
|
2561 |
}
|
2562 |
+
gen = <?php echo $row->counter; ?>;
|
2563 |
+
function enable() {
|
2564 |
+
for (iiiii = 0; iiiii < 1000; iiiii++) {
|
2565 |
+
if (document.getElementsByTagName("iframe")[iiiii]) {
|
2566 |
+
if (document.getElementsByTagName("iframe")[iiiii].id == 'form_maker_editor_ifr') {
|
2567 |
+
id_ifr_editor = iiiii;
|
2568 |
+
break;
|
2569 |
+
}
|
2570 |
+
}
|
2571 |
+
}
|
2572 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
2573 |
+
for (x = 0; x < 14; x++) {
|
2574 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo plugins_url("images/",__FILE__) ?>" + alltypes[x] + ".png";
|
2575 |
+
}
|
2576 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
2577 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
2578 |
+
}
|
2579 |
+
else {
|
2580 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
2581 |
+
}
|
2582 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
2583 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
2584 |
+
}
|
2585 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
2586 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
2587 |
+
}
|
2588 |
+
else {
|
2589 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
2590 |
+
}
|
2591 |
+
document.getElementById('when_edit').style.display = 'none';
|
2592 |
+
}
|
2593 |
+
function enable2() {
|
2594 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
|
2595 |
+
for (x = 0; x < 14; x++) {
|
2596 |
+
document.getElementById('img_' + alltypes[x]).src = "<?php echo plugins_url("images/",__FILE__) ?>" + alltypes[x] + ".png";
|
2597 |
+
}
|
2598 |
+
if (document.getElementById('formMakerDiv').style.display == 'block') {
|
2599 |
+
jQuery('#formMakerDiv').slideToggle(200);
|
2600 |
+
}
|
2601 |
+
else {
|
2602 |
+
jQuery('#formMakerDiv').slideToggle(400);
|
2603 |
+
}
|
2604 |
+
if (document.getElementById('formMakerDiv').offsetWidth) {
|
2605 |
+
document.getElementById('formMakerDiv1').style.width = (document.getElementById('formMakerDiv').offsetWidth - 60) + 'px';
|
2606 |
+
}
|
2607 |
+
if (document.getElementById('formMakerDiv1').style.display == 'block') {
|
2608 |
+
jQuery('#formMakerDiv1').slideToggle(200);
|
2609 |
+
}
|
2610 |
+
else {
|
2611 |
+
jQuery('#formMakerDiv1').slideToggle(400);
|
2612 |
+
}
|
2613 |
+
document.getElementById('when_edit').style.display = 'block';
|
2614 |
+
if (document.getElementById('field_types').offsetWidth) {
|
2615 |
+
document.getElementById('when_edit').style.width = document.getElementById('field_types').offsetWidth + 'px';
|
2616 |
+
}
|
2617 |
+
if (document.getElementById('field_types').offsetHeight) {
|
2618 |
+
document.getElementById('when_edit').style.height = document.getElementById('field_types').offsetHeight + 'px';
|
2619 |
+
}
|
2620 |
+
}
|
2621 |
+
var thickDims, tbWidth, tbHeight;
|
2622 |
+
jQuery(document).ready(function($) {
|
2623 |
+
thickDims = function() {
|
2624 |
+
var tbWindow = jQuery('#TB_window'), H = jQuery(window).height(), W = jQuery(window).width(), w, h;
|
2625 |
+
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
2626 |
+
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
2627 |
+
if (tbWindow.size()) {
|
2628 |
+
tbWindow.width(w).height(h);
|
2629 |
+
jQuery('#TB_iframeContent').width(w).height(h - 27);
|
2630 |
+
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
2631 |
+
if (typeof document.body.style.maxWidth != 'undefined') {
|
2632 |
+
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
2633 |
+
}
|
2634 |
+
}
|
2635 |
+
};
|
2636 |
+
thickDims();
|
2637 |
+
jQuery(window).resize(function() { thickDims() });
|
2638 |
+
jQuery('a.thickbox-preview').click( function() {
|
2639 |
+
tb_click.call(this);
|
2640 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
2641 |
+
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
2642 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
2643 |
+
}
|
2644 |
+
else {
|
2645 |
+
tbWidth = jQuery(window).width() - 120;
|
2646 |
+
}
|
2647 |
+
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
2648 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
2649 |
+
}
|
2650 |
+
else {
|
2651 |
+
tbHeight = jQuery(window).height() - 120;
|
2652 |
+
}
|
2653 |
+
if (alink.length) {
|
2654 |
+
url = alink.attr('href') || '';
|
2655 |
+
text = alink.attr('title') || '';
|
2656 |
+
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
2657 |
+
}
|
2658 |
+
else {
|
2659 |
+
text = jQuery(this).attr('title') || '';
|
2660 |
+
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
2661 |
+
}
|
2662 |
+
jQuery('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
2663 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
2664 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
2665 |
+
jQuery('#TB_iframeContent').width('100%');
|
2666 |
+
thickDims();
|
2667 |
+
return false;
|
2668 |
+
});
|
2669 |
+
// Theme details
|
2670 |
+
jQuery('.theme-detail').click(function () {
|
2671 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
2672 |
+
return false;
|
2673 |
+
});
|
2674 |
+
});
|
2675 |
+
</script>
|
2676 |
+
<style>
|
2677 |
+
.calendar .button {
|
2678 |
+
display: table-cell !important;
|
2679 |
+
}
|
2680 |
+
#when_edit {
|
2681 |
+
position:absolute;
|
2682 |
+
background-color:#666;
|
2683 |
+
z-index:101;
|
2684 |
+
display:none;
|
2685 |
+
width:100%;
|
2686 |
+
height:100%;
|
2687 |
+
opacity: 0.7;
|
2688 |
+
filter: alpha(opacity = 70);
|
2689 |
+
}
|
2690 |
+
#formMakerDiv {
|
2691 |
+
position:fixed;
|
2692 |
+
background-color:#666;
|
2693 |
+
z-index:100;
|
2694 |
+
display:none;
|
2695 |
+
left:0;
|
2696 |
+
top:0;
|
2697 |
+
width:100%;
|
2698 |
+
height:100%;
|
2699 |
+
opacity: 0.7;
|
2700 |
+
filter: alpha(opacity = 70);
|
2701 |
+
}
|
2702 |
+
#formMakerDiv1 {
|
2703 |
+
padding-top:15px;
|
2704 |
+
position:fixed;
|
2705 |
+
z-index:100;
|
2706 |
+
background-color:transparent;
|
2707 |
+
top:0;
|
2708 |
+
left:0;
|
2709 |
+
display:none;
|
2710 |
+
margin-left:30px;
|
2711 |
+
margin-top:15px;
|
2712 |
+
}
|
2713 |
+
.formmaker_table input {
|
2714 |
+
border-radius: 3px;
|
2715 |
+
padding: 2px;
|
2716 |
+
}
|
2717 |
+
.formmaker_table {
|
2718 |
+
border-radius: 8px;
|
2719 |
+
border: 6px #00aeef solid;
|
2720 |
+
background-color: #00aeef;
|
2721 |
+
height: 120px;
|
2722 |
+
width: 98%;
|
2723 |
+
}
|
2724 |
+
.formMakerDiv1_table {
|
2725 |
+
border: 6px #00aeef solid;
|
2726 |
+
background-color: #FFF;
|
2727 |
+
border-radius: 8px;
|
2728 |
+
}
|
2729 |
+
</style>
|
2730 |
+
<div style="font-size:14px; font-weight:bold">
|
2731 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
2732 |
+
<br />
|
2733 |
+
This section allows you to add fields to your form.
|
2734 |
+
<a href="http://web-dorado.com/wordpress-form-maker-guide-4.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
2735 |
+
</div>
|
2736 |
+
<table width="95%">
|
2737 |
+
<thead>
|
2738 |
+
<tr>
|
2739 |
+
<td colspan="11">
|
2740 |
+
<div style="text-align:right;font-size:16px;padding:20px; padding-right:50px; width:100%">
|
2741 |
+
<a href="http://web-dorado.com/files/fromFormMaker.php" target="_blank"
|
2742 |
+
style="color:red; text-decoration:none;">
|
2743 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="www.web-dorado.com"
|
2744 |
+
width="215"><br>
|
2745 |
+
Get the full version
|
2746 |
+
</a>
|
2747 |
+
</div>
|
2748 |
+
</td>
|
2749 |
+
</tr>
|
2750 |
+
</thead>
|
2751 |
+
<tr>
|
2752 |
+
<td width="100%"><?php echo "<h2>Form Maker</h2>"; ?></td>
|
2753 |
+
<td><a id="preview_form"
|
2754 |
+
href="<?php echo admin_url('admin-ajax.php') . '?action=frommakerpreview&id=' . $row->theme . '&TB_iframe=1'; ?>"
|
2755 |
+
class="thickbox-preview" title="Form Preview" onclick="return false;"><input type="button" value="preview"
|
2756 |
+
class="button-primary"/></a>
|
2757 |
+
</td>
|
2758 |
+
<td><input type="button" onclick="submitbutton('form_options')" value="Form options" class="button-primary" /></td>
|
2759 |
+
<td style="width:300px"><input type="button" onclick="submitbutton('save_as_copy')" value="Save As Copy" class="button-secondary action" /> </td>
|
2760 |
+
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"/>
|
2761 |
+
</td>
|
2762 |
+
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply"
|
2763 |
+
class="button-secondary action"/></td>
|
2764 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=Form_maker'" value="Cancel"
|
2765 |
+
class="button-secondary action"/></td>
|
2766 |
+
</tr>
|
2767 |
+
</table>
|
2768 |
+
<br />
|
2769 |
+
<form action="admin.php?page=Form_maker&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
|
2770 |
+
<div class="formmaker_table" width="100%">
|
2771 |
+
<div style="float:left; text-align:center">
|
2772 |
+
</br>
|
2773 |
+
<img src="<?php echo plugins_url("images/formmaker.png",__FILE__) ?>"/>
|
2774 |
+
</br>
|
2775 |
+
</br>
|
2776 |
+
<img src="<?php echo plugins_url("images/logo.png",__FILE__) ?>"/>
|
2777 |
+
</div>
|
2778 |
+
<div style="float:right">
|
2779 |
+
<span style="font-size:16.76pt; font-family:tahoma; color:#FFFFFF; vertical-align:middle;">Form title: </span>
|
2780 |
+
<input id="title" name="title" style="width:160px; height:19px; border:none; font-size:11px;" value="<?php echo $row->title; ?>"/>
|
2781 |
+
<br />
|
2782 |
+
<img src="<?php echo plugins_url("images/formoptions.png",__FILE__) ?>" onclick="submitbutton('form_options')" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
2783 |
+
<br />
|
2784 |
+
<br />
|
2785 |
+
<br />
|
2786 |
+
<img src="<?php echo plugins_url("images/addanewfield.png",__FILE__) ?>" onclick="enable(); Enable()" style="cursor:pointer;margin:10px 0 10px 10px; float:right"/>
|
2787 |
+
</div>
|
2788 |
+
</div>
|
2789 |
+
<div id="formMakerDiv" onclick="close_window()"></div>
|
2790 |
+
<div id="formMakerDiv1" style="padding-top:20px" align="center">
|
2791 |
+
<table border="0" width="100%" cellpadding="0" cellspacing="0" height="100%" style="border:6px #00aeef solid; background-color:#FFF">
|
2792 |
+
<tr>
|
2793 |
+
<td style="padding:0px">
|
2794 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
2795 |
+
<tr valign="top">
|
2796 |
+
<td width="15%" height="100%" style="border-right:dotted black 1px;" id="field_types">
|
2797 |
+
<div id="when_edit" style="display:none"></div>
|
2798 |
+
<table border="0" cellpadding="0" cellspacing="3" width="100%">
|
2799 |
+
<tr>
|
2800 |
+
<td align="center" onClick="addRow('customHTML')" style="cursor:pointer" id="table_editor"
|
2801 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/customHTML.png", __FILE__) ?>"
|
2802 |
+
style="margin:5px" id="img_customHTML"/></td>
|
2803 |
+
|
2804 |
+
<td align="center" onClick="addRow('text')" style="cursor:pointer" id="table_text"
|
2805 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/text.png", __FILE__) ?>"
|
2806 |
+
style="margin:5px" id="img_text"/></td>
|
2807 |
+
</tr>
|
2808 |
+
<tr>
|
2809 |
+
<td align="center" onClick="addRow('time_and_date')" style="cursor:pointer" id="table_time_and_date"
|
2810 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/time_and_date.png", __FILE__) ?>"
|
2811 |
+
style="margin:5px" id="img_time_and_date"/></td>
|
2812 |
+
|
2813 |
+
<td align="center" onClick="addRow('select')" style="cursor:pointer" id="table_select"
|
2814 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/select.png", __FILE__) ?>"
|
2815 |
+
style="margin:5px" id="img_select"/></td>
|
2816 |
+
</tr>
|
2817 |
+
<tr>
|
2818 |
+
<td align="center" onClick="addRow('checkbox')" style="cursor:pointer" id="table_checkbox"
|
2819 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/checkbox.png", __FILE__) ?>"
|
2820 |
+
style="margin:5px" id="img_checkbox"/></td>
|
2821 |
+
|
2822 |
+
<td align="center" onClick="addRow('radio')" style="cursor:pointer" id="table_radio"
|
2823 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/radio.png", __FILE__) ?>"
|
2824 |
+
style="margin:5px" id="img_radio"/></td>
|
2825 |
+
</tr>
|
2826 |
+
<tr>
|
2827 |
+
<td align="center"
|
2828 |
+
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
2829 |
+
style="background-color: rgb(114, 113, 113) !important; cursor:pointer" id="table_file_upload"
|
2830 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/file_upload.png", __FILE__) ?>"
|
2831 |
+
style="margin:5px" id="img_file_upload"/></td>
|
2832 |
+
|
2833 |
+
<td align="center" onClick="addRow('captcha')" style="cursor:pointer" id="table_captcha"
|
2834 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/captcha.png", __FILE__) ?>"
|
2835 |
+
style="margin:5px" id="img_captcha"/></td>
|
2836 |
+
</tr>
|
2837 |
+
<tr>
|
2838 |
+
<td align="center" onClick="addRow('page_break')" style="cursor:pointer" id="table_page_break"
|
2839 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/page_break.png", __FILE__) ?>"
|
2840 |
+
style="margin:5px" id="img_page_break"/></td>
|
2841 |
+
|
2842 |
+
<td align="center" onClick="addRow('section_break')" style="cursor:pointer" id="table_section_break"
|
2843 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/section_break.png", __FILE__) ?>"
|
2844 |
+
style="margin:5px" id="img_section_break"/></td>
|
2845 |
+
</tr>
|
2846 |
+
<tr>
|
2847 |
+
<td align="center"
|
2848 |
+
onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')"
|
2849 |
+
style="background-color: rgb(114, 113, 113) !important; cursor:pointer" id="table_map"
|
2850 |
+
class="field_buttons"><img src="<?php echo plugins_url("images/map.png", __FILE__) ?>"
|
2851 |
+
style="margin:5px" id="img_map"/></td>
|
2852 |
+
<td align="center" onClick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" style="background-color: rgb(114, 113, 113) !important; id="table_paypal" class="field_buttons">
|
2853 |
+
<img src="<?php echo plugins_url("images/paypal.png",__FILE__) ?>" style="margin:5px" id="img_paypal"/>
|
2854 |
+
</td>
|
2855 |
+
</tr>
|
2856 |
+
<tr>
|
2857 |
+
<td align="center" onClick="addRow('survey')" class="field_buttons" id="table_survey"><img src="<?php echo plugins_url("images/survey.png", __FILE__); ?>" style="margin:5px" id="img_survey"/></td>
|
2858 |
+
<td align="center" onClick="addRow('button')" id="table_button" class="field_buttons"><img src="<?php echo plugins_url("images/button.png", __FILE__); ?>" style="margin:5px" id="img_button"/></td>
|
2859 |
+
</tr>
|
2860 |
+
</table>
|
2861 |
+
</td>
|
2862 |
+
<td width="35%" height="100%" align="left">
|
2863 |
+
<div id="edit_table" style="padding:0px; overflow-y:scroll; height:575px"></div>
|
2864 |
+
</td>
|
2865 |
+
<td align="center" valign="top" style="background:url(<?php echo plugins_url("images/border2.png",__FILE__) ?>) repeat-y;"> </td>
|
2866 |
+
<td style="padding:15px">
|
2867 |
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
|
2868 |
+
<tr>
|
2869 |
+
<td align="right">
|
2870 |
+
<input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
|
2871 |
+
At The End
|
2872 |
+
<input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
|
2873 |
+
At The Beginning
|
2874 |
+
<input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
|
2875 |
+
Before
|
2876 |
+
<select style="width:100px; margin-left:5px" id="sel_el_pos" disabled="disabled"></select>
|
2877 |
+
<img alt="ADD" title="add" style="cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo plugins_url("images/save.png",__FILE__) ?>" onClick="add(0)"/>
|
2878 |
+
<img alt="CANCEL" title="cancel" style=" cursor:pointer; vertical-align:middle; margin:5px" src="<?php echo plugins_url("images/cancel_but.png",__FILE__) ?>" onClick="close_window()"/>
|
2879 |
+
<hr style=" margin-bottom:10px" />
|
2880 |
+
</td>
|
2881 |
+
</tr>
|
2882 |
+
<tr height="100%" valign="top">
|
2883 |
+
<td id="show_table"></td>
|
2884 |
+
</tr>
|
2885 |
+
</table>
|
2886 |
+
</td>
|
2887 |
+
</tr>
|
2888 |
+
</table>
|
2889 |
+
</td>
|
2890 |
+
</tr>
|
2891 |
+
</table>
|
2892 |
+
<input type="hidden" id="old" />
|
2893 |
+
<input type="hidden" id="old_selected" />
|
2894 |
+
<input type="hidden" id="element_type" />
|
2895 |
+
<input type="hidden" id="editing_id" />
|
2896 |
+
<input type="hidden" value="<?php echo plugins_url("",__FILE__) ?>" id="form_plugins_url" />
|
2897 |
+
<div id="main_editor" style="position:absolute; display:none; z-index:140;">
|
2898 |
+
<?php
|
2899 |
+
if (function_exists ('the_editor') || function_exists ('wp_editor')) {
|
2900 |
+
if (get_bloginfo('version') < '3.3') {
|
2901 |
+
?>
|
2902 |
+
<div style=" max-width:500px; height:300px;text-align:left" id="poststuff">
|
2903 |
+
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor("","form_maker_editor","title",$media_buttons = true, $tab_index = 1, $extended = true ); ?></div>
|
2904 |
+
</div>
|
2905 |
+
<?php
|
2906 |
+
}
|
2907 |
+
else {
|
2908 |
+
echo "<style>#wp-form_maker_editor-media-buttons{ text-align:left }</style>"; wp_editor("","form_maker_editor");
|
2909 |
+
}
|
2910 |
+
}
|
2911 |
+
else {
|
2912 |
+
?>
|
2913 |
+
<textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="6" style="width: 440px; height: 350px; " class="mce_editable" aria-hidden="true"></textarea>
|
2914 |
+
<?php
|
2915 |
+
}
|
2916 |
+
?>
|
2917 |
+
</div>
|
2918 |
+
</div>
|
2919 |
+
<?php
|
2920 |
+
if (!function_exists ('the_editor')) {
|
2921 |
+
?>
|
2922 |
+
<iframe id="tinymce" style="display:none"></iframe>
|
2923 |
+
<?php
|
2924 |
+
}
|
2925 |
+
?>
|
2926 |
+
<br />
|
2927 |
+
<br />
|
2928 |
+
<fieldset>
|
2929 |
+
<legend><h2 style="color:#00aeef">Form</h2></legend>
|
2930 |
+
<?php
|
2931 |
+
global $first_css;
|
2932 |
+
echo '<style>'.$first_css.'</style>';
|
2933 |
+
?>
|
2934 |
+
<table width="100%" style="margin:8px">
|
2935 |
+
<tr id="page_navigation">
|
2936 |
+
<td align="center" width="90%" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>">
|
2937 |
+
</td>
|
2938 |
+
<td align="left" id="edit_page_navigation"></td>
|
2939 |
+
</tr>
|
2940 |
+
</table>
|
2941 |
+
<div id="take">
|
2942 |
+
<?php
|
2943 |
+
if ($row->form) {
|
2944 |
+
echo $row->form;
|
2945 |
+
}
|
2946 |
+
else {
|
2947 |
+
echo '<table border="0" cellpadding="4" cellspacing="0" class="wdform_table1" width="100%" style="border-top:0px solid black;"><tbody id="form_view1" style="float:left;" page_title="Untitled page" next_title="Next" next_type="button" next_class="" next_checkable="true" previous_title="Previous" previous_type="button" previous_class="" previous_checkable="true"><tr><td valign="top"><table class="wdform_table2"><tbody></tbody></table></td></tr><tr><td colspan="100" valign="top"><table width="100%" style="padding-right:170px"><tbody><tr id="page_nav1"></tr></tbody></table></td></tr><tbody id="form_view_img1" style="float:right ;display:none" ><tr><td width="0%"></td><td align="right"><img src="'.plugins_url("images/minus.png",__FILE__).'" title="Show or hide the page" class="page_toolbar" onclick="show_or_hide("1")" id="show_page_img_1" /></td><td><img src="'.plugins_url("images/page_delete.png",__FILE__).'" title="Delete the page" class="page_toolbar" onclick="remove_page("1")" /></td><td><img src="'.plugins_url("images/page_delete_all.png",__FILE__).'" title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all("1")" /></td><td><img src="'.plugins_url("images/page_edit.png",__FILE__).'" title="Edit the page" class="page_toolbar" onclick="edit_page_break("1")" /></td></tr></tbody></table>';
|
2948 |
+
}
|
2949 |
+
?>
|
2950 |
+
</div>
|
2951 |
+
</fieldset>
|
2952 |
+
<input type="hidden" name="form" id="form">
|
2953 |
+
<input type="hidden" name="form_front" id="form_front">
|
2954 |
+
<input type="hidden" name="pagination" id="pagination" />
|
2955 |
+
<input type="hidden" name="show_title" id="show_title" />
|
2956 |
+
<input type="hidden" name="show_numbers" id="show_numbers" />
|
2957 |
+
<input type="hidden" name="public_key" id="public_key" />
|
2958 |
+
<input type="hidden" name="private_key" id="private_key" />
|
2959 |
+
<input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
|
2960 |
+
<input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order;?>" />
|
2961 |
+
<input type="hidden" name="counter" id="counter" value="<?php echo $row->counter;?>">
|
2962 |
+
<input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current;?>"/>
|
2963 |
+
<script type="text/javascript">
|
2964 |
+
function formOnload() {
|
2965 |
+
// Enable maps.
|
2966 |
+
for (t = 0; t < <?php echo $row->counter;?>; t++)
|
2967 |
+
if (document.getElementById(t+"_typeform_id_temp")) {
|
2968 |
+
if (document.getElementById(t+"_typeform_id_temp").value=="type_map" || document.getElementById(t+"_typeform_id_temp").value=="type_mark_map") {
|
2969 |
+
if_gmap_init(t);
|
2970 |
+
for (q = 0; q < 20; q++) {
|
2971 |
+
if (document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)) {
|
2972 |
+
w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q));
|
2973 |
+
w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q));
|
2974 |
+
w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q));
|
2975 |
+
add_marker_on_map(t,q, w_long, w_lat, w_info, false);
|
2976 |
+
}
|
2977 |
+
}
|
2978 |
+
}
|
2979 |
+
else
|
2980 |
+
if (document.getElementById(t+"_typeform_id_temp").value == "type_date") {
|
2981 |
+
Calendar.setup({
|
2982 |
+
inputField: t+"_elementform_id_temp",
|
2983 |
+
ifFormat: document.getElementById(t+"_buttonform_id_temp").getAttribute('format'),
|
2984 |
+
button: t+"_buttonform_id_temp",
|
2985 |
+
align: "Tl",
|
2986 |
+
singleClick: true,
|
2987 |
+
firstDay: 0
|
2988 |
+
});
|
2989 |
+
}
|
2990 |
+
else
|
2991 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_spinner") {
|
2992 |
+
|
2993 |
+
var spinner_value = jQuery("#" + t + "_elementform_id_temp").get( "aria-valuenow" );
|
2994 |
+
var spinner_min_value = document.getElementById(t+"_min_valueform_id_temp").value;
|
2995 |
+
var spinner_max_value = document.getElementById(t+"_max_valueform_id_temp").value;
|
2996 |
+
var spinner_step = document.getElementById(t+"_stepform_id_temp").value;
|
2997 |
+
|
2998 |
+
jQuery( "#"+t+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
|
2999 |
+
.prop( "disabled", false )
|
3000 |
+
.removeAttr( "autocomplete" )
|
3001 |
+
.removeAttr( "role" )
|
3002 |
+
.removeAttr( "aria-valuemin" )
|
3003 |
+
.removeAttr( "aria-valuemax" )
|
3004 |
+
.removeAttr( "aria-valuenow" );
|
3005 |
+
|
3006 |
+
span_ui= document.getElementById(t+"_elementform_id_temp").parentNode;
|
3007 |
+
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp"));
|
3008 |
+
span_ui.parentNode.removeChild(span_ui);
|
3009 |
+
|
3010 |
+
jQuery("#"+t+"_elementform_id_temp")[0].spin = null;
|
3011 |
+
|
3012 |
+
spinner = jQuery( "#"+t+"_elementform_id_temp" ).spinner();
|
3013 |
+
spinner.spinner( "value", spinner_value );
|
3014 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
|
3015 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
|
3016 |
+
jQuery( "#"+t+"_elementform_id_temp" ).spinner({ step: spinner_step});
|
3017 |
+
|
3018 |
+
}
|
3019 |
+
else
|
3020 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_slider") {
|
3021 |
+
|
3022 |
+
var slider_value = document.getElementById(t+"_slider_valueform_id_temp").value;
|
3023 |
+
var slider_min_value = document.getElementById(t+"_slider_min_valueform_id_temp").value;
|
3024 |
+
var slider_max_value = document.getElementById(t+"_slider_max_valueform_id_temp").value;
|
3025 |
+
|
3026 |
+
var slider_element_value = document.getElementById( t+"_element_valueform_id_temp" );
|
3027 |
+
var slider_value_save = document.getElementById( t+"_slider_valueform_id_temp" );
|
3028 |
+
|
3029 |
+
document.getElementById(t+"_elementform_id_temp").innerHTML = "";
|
3030 |
+
document.getElementById(t+"_elementform_id_temp").removeAttribute( "class" );
|
3031 |
+
document.getElementById(t+"_elementform_id_temp").removeAttribute( "aria-disabled" );
|
3032 |
+
|
3033 |
+
jQuery("#"+t+"_elementform_id_temp")[0].slide = null;
|
3034 |
+
|
3035 |
+
jQuery(function() {
|
3036 |
+
jQuery( "#"+t+"_elementform_id_temp").slider({
|
3037 |
+
range: "min",
|
3038 |
+
value: eval(slider_value),
|
3039 |
+
min: eval(slider_min_value),
|
3040 |
+
max: eval(slider_max_value),
|
3041 |
+
slide: function( event, ui ) {
|
3042 |
+
slider_element_value.innerHTML = "" + ui.value ;
|
3043 |
+
slider_value_save.value = "" + ui.value;
|
3044 |
+
|
3045 |
+
}
|
3046 |
+
});
|
3047 |
+
|
3048 |
+
|
3049 |
+
});
|
3050 |
+
|
3051 |
+
|
3052 |
+
}
|
3053 |
+
else
|
3054 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_range"){
|
3055 |
+
var spinner_value0 = jQuery("#" + t+"_elementform_id_temp0").get( "aria-valuenow" );
|
3056 |
+
var spinner_step = document.getElementById(t+"_range_stepform_id_temp").value;
|
3057 |
+
|
3058 |
+
jQuery( "#"+t+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
|
3059 |
+
.prop( "disabled", false )
|
3060 |
+
.removeAttr( "autocomplete" )
|
3061 |
+
.removeAttr( "role" )
|
3062 |
+
.removeAttr( "aria-valuenow" );
|
3063 |
+
|
3064 |
+
span_ui= document.getElementById(t+"_elementform_id_temp0").parentNode;
|
3065 |
+
span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp0"));
|
3066 |
+
span_ui.parentNode.removeChild(span_ui);
|
3067 |
+
|
3068 |
+
|
3069 |
+
jQuery("#"+t+"_elementform_id_temp0")[0].spin = null;
|
3070 |
+
jQuery("#"+t+"_elementform_id_temp1")[0].spin = null;
|
3071 |
+
|
3072 |
+
spinner0 = jQuery( "#"+t+"_elementform_id_temp0" ).spinner();
|
3073 |
+
spinner0.spinner( "value", spinner_value0 );
|
3074 |
+
jQuery( "#"+t+"_elementform_id_temp0" ).spinner({ step: spinner_step});
|
3075 |
+
|
3076 |
+
|
3077 |
+
|
3078 |
+
var spinner_value1 = jQuery("#" + t+"_elementform_id_temp1").get( "aria-valuenow" );
|
3079 |
+
|
3080 |
+
jQuery( "#"+t+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
|
3081 |
+
.prop( "disabled", false )
|
3082 |
+
.removeAttr( "autocomplete" )
|
3083 |
+
.removeAttr( "role" )
|
3084 |
+
.removeAttr( "aria-valuenow" );
|
3085 |
+
|
3086 |
+
span_ui1= document.getElementById(t+"_elementform_id_temp1").parentNode;
|
3087 |
+
span_ui1.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp1"));
|
3088 |
+
span_ui1.parentNode.removeChild(span_ui1);
|
3089 |
+
|
3090 |
+
spinner1 = jQuery( "#"+t+"_elementform_id_temp1" ).spinner();
|
3091 |
+
spinner1.spinner( "value", spinner_value1 );
|
3092 |
+
jQuery( "#"+t+"_elementform_id_temp1" ).spinner({ step: spinner_step});
|
3093 |
+
|
3094 |
+
var myu = t;
|
3095 |
+
jQuery(document).ready(function() {
|
3096 |
+
|
3097 |
+
jQuery("#"+myu+"_mini_label_from").click(function() {
|
3098 |
+
if (jQuery(this).children('input').length == 0) {
|
3099 |
+
var from = "<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
|
3100 |
+
jQuery(this).html(from);
|
3101 |
+
jQuery("input.from").focus();
|
3102 |
+
jQuery("input.from").blur(function() {
|
3103 |
+
var id_for_blur = document.getElementById('from').parentNode.id.split('_');
|
3104 |
+
var value = jQuery(this).val();
|
3105 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_from").text(value);
|
3106 |
+
});
|
3107 |
+
}
|
3108 |
+
});
|
3109 |
+
|
3110 |
+
jQuery("label#"+myu+"_mini_label_to").click(function() {
|
3111 |
+
if (jQuery(this).children('input').length == 0) {
|
3112 |
+
|
3113 |
+
var to = "<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
|
3114 |
+
jQuery(this).html(to);
|
3115 |
+
jQuery("input.to").focus();
|
3116 |
+
jQuery("input.to").blur(function() {
|
3117 |
+
var id_for_blur = document.getElementById('to').parentNode.id.split('_');
|
3118 |
+
var value = jQuery(this).val();
|
3119 |
+
|
3120 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_to").text(value);
|
3121 |
+
});
|
3122 |
+
|
3123 |
+
}
|
3124 |
+
});
|
3125 |
+
|
3126 |
+
|
3127 |
+
|
3128 |
+
});
|
3129 |
+
}
|
3130 |
+
|
3131 |
+
else
|
3132 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_name"){
|
3133 |
+
var myu = t;
|
3134 |
+
jQuery(document).ready(function() {
|
3135 |
+
|
3136 |
+
jQuery("#"+myu+"_mini_label_first").click(function() {
|
3137 |
+
|
3138 |
+
if (jQuery(this).children('input').length == 0) {
|
3139 |
+
|
3140 |
+
var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3141 |
+
jQuery(this).html(first);
|
3142 |
+
jQuery("input.first").focus();
|
3143 |
+
jQuery("input.first").blur(function() {
|
3144 |
+
|
3145 |
+
var id_for_blur = document.getElementById('first').parentNode.id.split('_');
|
3146 |
+
var value = jQuery(this).val();
|
3147 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_first").text(value);
|
3148 |
+
});
|
3149 |
+
}
|
3150 |
+
});
|
3151 |
+
|
3152 |
+
jQuery("label#"+myu+"_mini_label_last").click(function() {
|
3153 |
+
if (jQuery(this).children('input').length == 0) {
|
3154 |
+
|
3155 |
+
var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3156 |
+
jQuery(this).html(last);
|
3157 |
+
jQuery("input.last").focus();
|
3158 |
+
jQuery("input.last").blur(function() {
|
3159 |
+
var id_for_blur = document.getElementById('last').parentNode.id.split('_');
|
3160 |
+
var value = jQuery(this).val();
|
3161 |
+
|
3162 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_last").text(value);
|
3163 |
+
});
|
3164 |
+
|
3165 |
+
}
|
3166 |
+
});
|
3167 |
+
|
3168 |
+
jQuery("label#"+myu+"_mini_label_title").click(function() {
|
3169 |
+
if (jQuery(this).children('input').length == 0) {
|
3170 |
+
var title = "<input type='text' id='title' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3171 |
+
jQuery(this).html(title);
|
3172 |
+
jQuery("input.title").focus();
|
3173 |
+
jQuery("input.title").blur(function() {
|
3174 |
+
var id_for_blur = document.getElementById('title').parentNode.id.split('_');
|
3175 |
+
var value = jQuery(this).val();
|
3176 |
+
|
3177 |
+
|
3178 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_title").text(value);
|
3179 |
+
});
|
3180 |
+
}
|
3181 |
+
|
3182 |
+
});
|
3183 |
+
|
3184 |
+
|
3185 |
+
jQuery("label#"+myu+"_mini_label_middle").click(function() {
|
3186 |
+
if (jQuery(this).children('input').length == 0) {
|
3187 |
+
var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3188 |
+
jQuery(this).html(middle);
|
3189 |
+
jQuery("input.middle").focus();
|
3190 |
+
jQuery("input.middle").blur(function() {
|
3191 |
+
var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
|
3192 |
+
var value = jQuery(this).val();
|
3193 |
+
|
3194 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_middle").text(value);
|
3195 |
+
});
|
3196 |
+
}
|
3197 |
+
});
|
3198 |
+
|
3199 |
+
});
|
3200 |
+
}
|
3201 |
+
else
|
3202 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_address"){
|
3203 |
+
var myu = t;
|
3204 |
+
|
3205 |
+
jQuery(document).ready(function() {
|
3206 |
+
jQuery("label#"+myu+"_mini_label_street1").click(function() {
|
3207 |
+
|
3208 |
+
if (jQuery(this).children('input').length == 0) {
|
3209 |
+
var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3210 |
+
jQuery(this).html(street1);
|
3211 |
+
jQuery("input.street1").focus();
|
3212 |
+
jQuery("input.street1").blur(function() {
|
3213 |
+
var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
|
3214 |
+
var value = jQuery(this).val();
|
3215 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_street1").text(value);
|
3216 |
+
});
|
3217 |
+
}
|
3218 |
+
});
|
3219 |
+
|
3220 |
+
jQuery("label#"+myu+"_mini_label_street2").click(function() {
|
3221 |
+
if (jQuery(this).children('input').length == 0) {
|
3222 |
+
var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3223 |
+
jQuery(this).html(street2);
|
3224 |
+
jQuery("input.street2").focus();
|
3225 |
+
jQuery("input.street2").blur(function() {
|
3226 |
+
var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
|
3227 |
+
var value = jQuery(this).val();
|
3228 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_street2").text(value);
|
3229 |
+
});
|
3230 |
+
}
|
3231 |
+
});
|
3232 |
+
|
3233 |
+
|
3234 |
+
jQuery("label#"+myu+"_mini_label_city").click(function() {
|
3235 |
+
if (jQuery(this).children('input').length == 0) {
|
3236 |
+
var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3237 |
+
jQuery(this).html(city);
|
3238 |
+
jQuery("input.city").focus();
|
3239 |
+
jQuery("input.city").blur(function() {
|
3240 |
+
var id_for_blur = document.getElementById('city').parentNode.id.split('_');
|
3241 |
+
var value = jQuery(this).val();
|
3242 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_city").text(value);
|
3243 |
+
});
|
3244 |
+
}
|
3245 |
+
});
|
3246 |
+
|
3247 |
+
jQuery("label#"+myu+"_mini_label_state").click(function() {
|
3248 |
+
if (jQuery(this).children('input').length == 0) {
|
3249 |
+
var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3250 |
+
jQuery(this).html(state);
|
3251 |
+
jQuery("input.state").focus();
|
3252 |
+
jQuery("input.state").blur(function() {
|
3253 |
+
var id_for_blur = document.getElementById('state').parentNode.id.split('_');
|
3254 |
+
var value = jQuery(this).val();
|
3255 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_state").text(value);
|
3256 |
+
});
|
3257 |
+
}
|
3258 |
+
});
|
3259 |
+
|
3260 |
+
jQuery("label#"+myu+"_mini_label_postal").click(function() {
|
3261 |
+
if (jQuery(this).children('input').length == 0) {
|
3262 |
+
var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3263 |
+
jQuery(this).html(postal);
|
3264 |
+
jQuery("input.postal").focus();
|
3265 |
+
jQuery("input.postal").blur(function() {
|
3266 |
+
var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
|
3267 |
+
var value = jQuery(this).val();
|
3268 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_postal").text(value);
|
3269 |
+
});
|
3270 |
+
}
|
3271 |
+
});
|
3272 |
+
|
3273 |
+
|
3274 |
+
jQuery("label#"+myu+"_mini_label_country").click(function() {
|
3275 |
+
if (jQuery(this).children('input').length == 0) {
|
3276 |
+
var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3277 |
+
jQuery(this).html(country);
|
3278 |
+
jQuery("input.country").focus();
|
3279 |
+
jQuery("input.country").blur(function() {
|
3280 |
+
var id_for_blur = document.getElementById('country').parentNode.id.split('_');
|
3281 |
+
var value = jQuery(this).val();
|
3282 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_country").text(value);
|
3283 |
+
});
|
3284 |
+
}
|
3285 |
+
});
|
3286 |
+
});
|
3287 |
+
|
3288 |
+
}
|
3289 |
+
else
|
3290 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_phone"){
|
3291 |
+
var myu = t;
|
3292 |
+
|
3293 |
+
jQuery(document).ready(function() {
|
3294 |
+
jQuery("label#"+myu+"_mini_label_area_code").click(function() {
|
3295 |
+
if (jQuery(this).children('input').length == 0) {
|
3296 |
+
|
3297 |
+
var area_code = "<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3298 |
+
|
3299 |
+
jQuery(this).html(area_code);
|
3300 |
+
jQuery("input.area_code").focus();
|
3301 |
+
jQuery("input.area_code").blur(function() {
|
3302 |
+
var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
|
3303 |
+
var value = jQuery(this).val();
|
3304 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_area_code").text(value);
|
3305 |
+
});
|
3306 |
+
}
|
3307 |
+
});
|
3308 |
+
|
3309 |
+
|
3310 |
+
jQuery("label#"+myu+"_mini_label_phone_number").click(function() {
|
3311 |
+
|
3312 |
+
if (jQuery(this).children('input').length == 0) {
|
3313 |
+
var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3314 |
+
|
3315 |
+
jQuery(this).html(phone_number);
|
3316 |
+
|
3317 |
+
jQuery("input.phone_number").focus();
|
3318 |
+
jQuery("input.phone_number").blur(function() {
|
3319 |
+
var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
|
3320 |
+
var value = jQuery(this).val();
|
3321 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_phone_number").text(value);
|
3322 |
+
});
|
3323 |
+
}
|
3324 |
+
});
|
3325 |
+
|
3326 |
+
});
|
3327 |
+
}
|
3328 |
+
else
|
3329 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_date_fields"){
|
3330 |
+
var myu = t;
|
3331 |
+
|
3332 |
+
jQuery(document).ready(function() {
|
3333 |
+
jQuery("label#"+myu+"_day_label").click(function() {
|
3334 |
+
if (jQuery(this).children('input').length == 0) {
|
3335 |
+
var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3336 |
+
jQuery(this).html(day);
|
3337 |
+
jQuery("input.day").focus();
|
3338 |
+
jQuery("input.day").blur(function() {
|
3339 |
+
var id_for_blur = document.getElementById('day').parentNode.id.split('_');
|
3340 |
+
var value = jQuery(this).val();
|
3341 |
+
|
3342 |
+
jQuery("#"+id_for_blur[0]+"_day_label").text(value);
|
3343 |
+
});
|
3344 |
+
}
|
3345 |
+
});
|
3346 |
+
|
3347 |
+
|
3348 |
+
jQuery("label#"+myu+"_month_label").click(function() {
|
3349 |
+
if (jQuery(this).children('input').length == 0) {
|
3350 |
+
var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3351 |
+
jQuery(this).html(month);
|
3352 |
+
jQuery("input.month").focus();
|
3353 |
+
jQuery("input.month").blur(function() {
|
3354 |
+
var id_for_blur = document.getElementById('month').parentNode.id.split('_');
|
3355 |
+
var value = jQuery(this).val();
|
3356 |
+
|
3357 |
+
jQuery("#"+id_for_blur[0]+"_month_label").text(value);
|
3358 |
+
});
|
3359 |
+
}
|
3360 |
+
});
|
3361 |
+
|
3362 |
+
jQuery("label#"+myu+"_year_label").click(function() {
|
3363 |
+
if (jQuery(this).children('input').length == 0) {
|
3364 |
+
var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3365 |
+
jQuery(this).html(year);
|
3366 |
+
jQuery("input.year").focus();
|
3367 |
+
jQuery("input.year").blur(function() {
|
3368 |
+
var id_for_blur = document.getElementById('year').parentNode.id.split('_');
|
3369 |
+
var value = jQuery(this).val();
|
3370 |
+
|
3371 |
+
jQuery("#"+id_for_blur[0]+"_year_label").text(value);
|
3372 |
+
});
|
3373 |
+
}
|
3374 |
+
});
|
3375 |
+
|
3376 |
+
});
|
3377 |
+
|
3378 |
+
|
3379 |
+
}
|
3380 |
+
else
|
3381 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_time"){
|
3382 |
+
var myu = t;
|
3383 |
+
|
3384 |
+
jQuery(document).ready(function() {
|
3385 |
+
jQuery("label#"+myu+"_mini_label_hh").click(function() {
|
3386 |
+
if (jQuery(this).children('input').length == 0) {
|
3387 |
+
var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3388 |
+
jQuery(this).html(hh);
|
3389 |
+
jQuery("input.hh").focus();
|
3390 |
+
jQuery("input.hh").blur(function() {
|
3391 |
+
var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
|
3392 |
+
var value = jQuery(this).val();
|
3393 |
+
|
3394 |
+
|
3395 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_hh").text(value);
|
3396 |
+
});
|
3397 |
+
}
|
3398 |
+
});
|
3399 |
+
|
3400 |
+
|
3401 |
+
jQuery("label#"+myu+"_mini_label_mm").click(function() {
|
3402 |
+
if (jQuery(this).children('input').length == 0) {
|
3403 |
+
var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3404 |
+
jQuery(this).html(mm);
|
3405 |
+
jQuery("input.mm").focus();
|
3406 |
+
jQuery("input.mm").blur(function() {
|
3407 |
+
var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
|
3408 |
+
var value = jQuery(this).val();
|
3409 |
+
|
3410 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_mm").text(value);
|
3411 |
+
});
|
3412 |
+
}
|
3413 |
+
});
|
3414 |
+
|
3415 |
+
jQuery("label#"+myu+"_mini_label_ss").click(function() {
|
3416 |
+
if (jQuery(this).children('input').length == 0) {
|
3417 |
+
var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3418 |
+
jQuery(this).html(ss);
|
3419 |
+
jQuery("input.ss").focus();
|
3420 |
+
jQuery("input.ss").blur(function() {
|
3421 |
+
var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
|
3422 |
+
var value = jQuery(this).val();
|
3423 |
+
|
3424 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_ss").text(value);
|
3425 |
+
});
|
3426 |
+
}
|
3427 |
+
});
|
3428 |
+
|
3429 |
+
jQuery("label#"+myu+"_mini_label_am_pm").click(function() {
|
3430 |
+
if (jQuery(this).children('input').length == 0) {
|
3431 |
+
var am_pm = "<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3432 |
+
jQuery(this).html(am_pm);
|
3433 |
+
jQuery("input.am_pm").focus();
|
3434 |
+
jQuery("input.am_pm").blur(function() {
|
3435 |
+
var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
|
3436 |
+
var value = jQuery(this).val();
|
3437 |
+
|
3438 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_am_pm").text(value);
|
3439 |
+
});
|
3440 |
+
}
|
3441 |
+
});
|
3442 |
+
});
|
3443 |
+
|
3444 |
+
}
|
3445 |
+
|
3446 |
+
else
|
3447 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_paypal_price"){
|
3448 |
+
var myu = t;
|
3449 |
+
jQuery(document).ready(function() {
|
3450 |
+
|
3451 |
+
jQuery("#"+myu+"_mini_label_dollars").click(function() {
|
3452 |
+
|
3453 |
+
if (jQuery(this).children('input').length == 0) {
|
3454 |
+
|
3455 |
+
var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3456 |
+
jQuery(this).html(dollars);
|
3457 |
+
jQuery("input.dollars").focus();
|
3458 |
+
jQuery("input.dollars").blur(function() {
|
3459 |
+
|
3460 |
+
var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
|
3461 |
+
var value = jQuery(this).val();
|
3462 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_dollars").text(value);
|
3463 |
+
});
|
3464 |
+
}
|
3465 |
+
});
|
3466 |
+
|
3467 |
+
jQuery("label#"+myu+"_mini_label_cents").click(function() {
|
3468 |
+
if (jQuery(this).children('input').length == 0) {
|
3469 |
+
|
3470 |
+
var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3471 |
+
jQuery(this).html(cents);
|
3472 |
+
jQuery("input.cents").focus();
|
3473 |
+
jQuery("input.cents").blur(function() {
|
3474 |
+
var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
|
3475 |
+
var value = jQuery(this).val();
|
3476 |
+
|
3477 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_cents").text(value);
|
3478 |
+
});
|
3479 |
+
|
3480 |
+
}
|
3481 |
+
});
|
3482 |
+
|
3483 |
+
|
3484 |
+
|
3485 |
+
});
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
else
|
3489 |
+
if(document.getElementById(t+"_typeform_id_temp").value=="type_scale_rating"){
|
3490 |
+
var myu = t;
|
3491 |
+
jQuery(document).ready(function() {
|
3492 |
+
|
3493 |
+
jQuery("#"+myu+"_mini_label_worst").click(function() {
|
3494 |
+
|
3495 |
+
if (jQuery(this).children('input').length == 0) {
|
3496 |
+
|
3497 |
+
var worst = "<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
|
3498 |
+
jQuery(this).html(worst);
|
3499 |
+
jQuery("input.worst").focus();
|
3500 |
+
jQuery("input.worst").blur(function() {
|
3501 |
+
|
3502 |
+
var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
|
3503 |
+
var value = jQuery(this).val();
|
3504 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_worst").text(value);
|
3505 |
+
});
|
3506 |
+
}
|
3507 |
+
});
|
3508 |
+
|
3509 |
+
jQuery("label#"+myu+"_mini_label_best").click(function() {
|
3510 |
+
if (jQuery(this).children('input').length == 0) {
|
3511 |
+
|
3512 |
+
var best = "<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
|
3513 |
+
jQuery(this).html(best);
|
3514 |
+
jQuery("input.best").focus();
|
3515 |
+
jQuery("input.best").blur(function() {
|
3516 |
+
var id_for_blur = document.getElementById('best').parentNode.id.split('_');
|
3517 |
+
var value = jQuery(this).val();
|
3518 |
+
|
3519 |
+
jQuery("#"+id_for_blur[0]+"_mini_label_best").text(value);
|
3520 |
+
});
|
3521 |
+
|
3522 |
+
}
|
3523 |
+
});
|
3524 |
+
|
3525 |
+
|
3526 |
+
|
3527 |
+
});
|
3528 |
+
}
|
3529 |
+
}
|
3530 |
+
form_view = 1;
|
3531 |
+
form_view_count = 0;
|
3532 |
+
for (i = 1; i <= 30; i++) {
|
3533 |
+
if (document.getElementById('form_id_tempform_view'+i)) {
|
3534 |
+
form_view_count++;
|
3535 |
+
form_view_max=i;
|
3536 |
+
}
|
3537 |
+
}
|
3538 |
+
if (form_view_count > 1) {
|
3539 |
+
for (i=1; i<=form_view_max; i++) {
|
3540 |
+
if (document.getElementById('form_id_tempform_view'+i)) {
|
3541 |
+
first_form_view=i;
|
3542 |
+
break;
|
3543 |
+
}
|
3544 |
+
}
|
3545 |
+
form_view=form_view_max;
|
3546 |
+
generate_page_nav(first_form_view);
|
3547 |
+
var img_EDIT = document.createElement("img");
|
3548 |
+
img_EDIT.setAttribute("src", "<?php echo plugins_url('',__FILE__) ?>/images/edit.png");
|
3549 |
+
img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
|
3550 |
+
img_EDIT.setAttribute("onclick", 'el_page_navigation()');
|
3551 |
+
var td_EDIT = document.getElementById("edit_page_navigation");
|
3552 |
+
td_EDIT.appendChild(img_EDIT);
|
3553 |
+
document.getElementById('page_navigation').appendChild(td_EDIT);
|
3554 |
+
}
|
3555 |
+
//if(document.getElementById('take').innerHTML.indexOf('up_row(')==-1) location.reload(true);
|
3556 |
+
//else
|
3557 |
+
document.getElementById('form').value=document.getElementById('take').innerHTML;
|
3558 |
+
document.getElementById('araqel').value = 1;
|
3559 |
+
}
|
3560 |
+
function formAddToOnload() {
|
3561 |
+
if (formOldFunctionOnLoad) {
|
3562 |
+
formOldFunctionOnLoad();
|
3563 |
+
}
|
3564 |
+
formOnload();
|
3565 |
+
}
|
3566 |
+
function formLoadBody() {
|
3567 |
+
formOldFunctionOnLoad = window.onload;
|
3568 |
+
window.onload = formAddToOnload;
|
3569 |
+
}
|
3570 |
+
var formOldFunctionOnLoad = null;
|
3571 |
+
formLoadBody();
|
3572 |
+
</script>
|
3573 |
+
<input type="hidden" name="option" value="com_formmaker" />
|
3574 |
+
<input type="hidden" name="id" value="<?php echo $row->id?>" />
|
3575 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
3576 |
+
<input type="hidden" name="task" value="" />
|
3577 |
+
<input type="hidden" id="araqel" value="0" />
|
3578 |
+
</form>
|
3579 |
+
<script>
|
3580 |
+
plugin_url = document.getElementById('form_plugins_url').value;
|
3581 |
+
appWidth = parseInt(document.body.offsetWidth);
|
3582 |
+
appHeight = parseInt(document.body.offsetHeight);
|
3583 |
+
// document.getElementById('toolbar-popup-popup').childNodes[1].href='index.php?option=com_formmaker&task=preview&tmpl=component&theme='+document.getElementById('theme').value;
|
3584 |
+
// document.getElementById('toolbar-popup-popup').childNodes[1].setAttribute('rel',"{handler: 'iframe', size: {x:"+(appWidth-100)+", y: "+(appHeight-30)+"}}");
|
3585 |
+
</script>
|
3586 |
+
<?php
|
3587 |
}
|
3588 |
|
3589 |
+
//////////////////////////////////////////////////////////////////////////////////////////
|
3590 |
function html_form_options($row, $themes) {
|
3591 |
$label_id = array();
|
3592 |
$label_label = array();
|
3728 |
var thickDims, tbWidth, tbHeight;
|
3729 |
jQuery(document).ready(function($) {
|
3730 |
thickDims = function() {
|
3731 |
+
var tbWindow = jQuery('#TB_window'), H = jQuery(window).height(), W = jQuery(window).width(), w, h;
|
3732 |
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 40;
|
3733 |
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 40;
|
3734 |
if (tbWindow.size()) {
|
3735 |
tbWindow.width(w).height(h);
|
3736 |
+
jQuery('#TB_iframeContent').width(w).height(h - 27);
|
3737 |
tbWindow.css({'margin-left': '-' + parseInt((w / 2),10) + 'px'});
|
3738 |
if (typeof document.body.style.maxWidth != 'undefined') {
|
3739 |
tbWindow.css({'top':(H-h)/2,'margin-top':'0'});
|
3741 |
}
|
3742 |
};
|
3743 |
thickDims();
|
3744 |
+
jQuery(window).resize(function() { thickDims() });
|
3745 |
+
jQuery('a.thickbox-preview').click( function() {
|
3746 |
tb_click.call(this);
|
3747 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
3748 |
if (tbWidth = href.match(/&tbWidth=[0-9]+/)) {
|
3749 |
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
3750 |
}
|
3751 |
else {
|
3752 |
+
tbWidth = jQuery(window).width() - 120;
|
3753 |
}
|
3754 |
if (tbHeight = href.match(/&tbHeight=[0-9]+/)) {
|
3755 |
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
3756 |
}
|
3757 |
else {
|
3758 |
+
tbHeight = jQuery(window).height() - 120;
|
3759 |
}
|
3760 |
if (alink.length) {
|
3761 |
url = alink.attr('href') || '';
|
3763 |
link = ' <a href="' + url + '" target="_top" class="tb-theme-preview-link">' + text + '</a>';
|
3764 |
}
|
3765 |
else {
|
3766 |
+
text = jQuery(this).attr('title') || '';
|
3767 |
link = ' <span class="tb-theme-preview-link">' + text + '</span>';
|
3768 |
}
|
3769 |
+
jQuery('#TB_title').css({'background-color':'#222','color':'#dfdfdf'});
|
3770 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
3771 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
3772 |
+
jQuery('#TB_iframeContent').width('100%');
|
3773 |
thickDims();
|
3774 |
return false;
|
3775 |
});
|
3776 |
// Theme details.
|
3777 |
+
jQuery('.theme-detail').click(function () {
|
3778 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
3779 |
return false;
|
3780 |
});
|
3781 |
});
|
4084 |
<label for="mail">Email to send submissions to</label>
|
4085 |
</td>
|
4086 |
<td>
|
4087 |
+
<input id="mail" name="mail" value="<?php echo $row->mail; ?>" style="width:250px;"/>
|
4088 |
</td>
|
4089 |
</tr>
|
4090 |
<tr valign="top">
|
form_maker_functions.php
CHANGED
@@ -59,53 +59,55 @@ function update_form_maker() {
|
|
59 |
|
60 |
function save_update_form_maker() {
|
61 |
global $wpdb;
|
62 |
-
$id = (int)$_GET['id'];
|
63 |
$no_slash_form = stripslashes($_POST['form']);
|
64 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
65 |
$savedd = $wpdb->update($wpdb->prefix . "formmaker", array(
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
html_forchrome_update();
|
97 |
}
|
98 |
|
99 |
function display_form_lists() {
|
100 |
global $wpdb;
|
101 |
$where = '';
|
|
|
|
|
102 |
$order = "";
|
103 |
-
$sort["default_style"] = "
|
104 |
-
$sort["sortid_by"] =
|
105 |
if (isset($_POST['page_number'])) {
|
106 |
if ($_POST['asc_or_desc']) {
|
107 |
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
108 |
-
if (
|
109 |
$sort["custom_style"] = "manage-column column-title sorted asc";
|
110 |
$sort["1_or_2"] = "2";
|
111 |
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
@@ -117,7 +119,7 @@ function display_form_lists() {
|
|
117 |
}
|
118 |
}
|
119 |
if ($_POST['page_number']) {
|
120 |
-
$limit = ((int)$_POST['page_number'] - 1) * 20;
|
121 |
}
|
122 |
else {
|
123 |
$limit = 0;
|
@@ -134,14 +136,12 @@ function display_form_lists() {
|
|
134 |
}
|
135 |
if ($search_tag) {
|
136 |
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
137 |
-
}
|
138 |
-
if ($where) {
|
139 |
$where .= " AND `id` NOT IN(" . get_option('contact_form_forms', 0) . ")";
|
140 |
}
|
141 |
else {
|
142 |
$where = " WHERE `id` NOT IN(" . get_option('contact_form_forms', 0) . ")";
|
143 |
}
|
144 |
-
//
|
145 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker" . $where;
|
146 |
$total = $wpdb->get_var($query);
|
147 |
$pageNav['total'] = $total;
|
@@ -183,7 +183,7 @@ function display_form_lists() {
|
|
183 |
html_display_form_lists($rows, $pageNav, $sort, $old_version, $can_update_form);
|
184 |
}
|
185 |
|
186 |
-
|
187 |
function add_form() {
|
188 |
global $wpdb;
|
189 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes WHERE `id` NOT IN(" . get_option('contact_form_themes', 0) . ") ORDER BY title";
|
@@ -191,10 +191,10 @@ function add_form() {
|
|
191 |
html_add_form($themes);
|
192 |
}
|
193 |
|
194 |
-
|
195 |
function edit_form_maker($id) {
|
196 |
global $wpdb;
|
197 |
-
//
|
198 |
if (get_option('contact_form_forms', FALSE)) {
|
199 |
$row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "' AND `id` NOT IN(" . get_option('contact_form_forms') . ")");
|
200 |
}
|
@@ -222,7 +222,7 @@ function edit_form_maker($id) {
|
|
222 |
html_edit_form_maker($row, $labels, $themes);
|
223 |
}
|
224 |
|
225 |
-
function
|
226 |
$count_words_in_form = count(explode("_element_section", $_POST["form"])) - count(explode("and_element_section", $_POST["form"])) + count(explode("wdform_table1", $_POST["form"]));
|
227 |
if ($count_words_in_form > 9) {
|
228 |
?>
|
@@ -232,7 +232,7 @@ function save_form() {
|
|
232 |
return FALSE;
|
233 |
}
|
234 |
global $wpdb;
|
235 |
-
if (
|
236 |
if (isset($_POST["label_order"]) && isset($_POST["title"]) && isset($_POST["form"])) {
|
237 |
$no_slash_form = stripslashes($_POST['form']);
|
238 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
@@ -281,7 +281,7 @@ function before_reset()
|
|
281 |
'checkout_mode' => 'testmode',
|
282 |
'paypal_mode' => 0,
|
283 |
'from_mail' => '',
|
284 |
-
'from_name' => ''
|
285 |
), array(
|
286 |
'%d',
|
287 |
'%s',
|
@@ -319,34 +319,32 @@ function before_reset()
|
|
319 |
));
|
320 |
if (!$save_or_no) {
|
321 |
?>
|
322 |
-
|
323 |
-
|
324 |
return FALSE;
|
325 |
}
|
326 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
327 |
$save_or_no = $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
328 |
-
|
329 |
), array(
|
330 |
'%d'
|
331 |
));
|
332 |
?>
|
333 |
-
|
334 |
-
|
335 |
-
<?php
|
336 |
-
|
337 |
return TRUE;
|
338 |
}
|
339 |
else {
|
340 |
?>
|
341 |
-
|
342 |
-
|
343 |
exit;
|
344 |
}
|
345 |
}
|
346 |
else {
|
347 |
?>
|
348 |
-
|
349 |
-
|
350 |
}
|
351 |
}
|
352 |
|
@@ -359,39 +357,39 @@ function save_as_copy() {
|
|
359 |
$row_for_sav_as_copy = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=" . $form_id);
|
360 |
$javascript = $row_for_sav_as_copy->javascript;
|
361 |
$save_or_no = $wpdb->insert($wpdb->prefix . 'formmaker', array(
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
), array(
|
396 |
'%d',
|
397 |
'%s',
|
@@ -469,17 +467,18 @@ function apply_form($id) {
|
|
469 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
470 |
if ($_POST["title"] != '') {
|
471 |
$savedd = $wpdb->update($wpdb->prefix . "formmaker", array(
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
|
|
483 |
), array('id' => $id), array(
|
484 |
'%s',
|
485 |
'%s',
|
@@ -491,16 +490,17 @@ function apply_form($id) {
|
|
491 |
'%s',
|
492 |
'%s',
|
493 |
'%s',
|
|
|
494 |
'%s'
|
495 |
), array('%d'));
|
496 |
?>
|
497 |
-
|
498 |
-
|
499 |
}
|
500 |
else {
|
501 |
?>
|
502 |
-
|
503 |
-
|
504 |
}
|
505 |
}
|
506 |
|
@@ -513,16 +513,16 @@ function remove_form($id) {
|
|
513 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'";
|
514 |
if (!$wpdb->query($sql_remov_form)) {
|
515 |
?>
|
516 |
-
|
517 |
-
|
518 |
return FALSE;
|
519 |
}
|
520 |
if ($wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_views WHERE form_id='" . $id . "'")) {
|
521 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker_views WHERE form_id='" . $id . "'";
|
522 |
if (!$wpdb->query($sql_remov_form)) {
|
523 |
?>
|
524 |
-
|
525 |
-
|
526 |
return FALSE;
|
527 |
}
|
528 |
}
|
@@ -530,43 +530,37 @@ function remove_form($id) {
|
|
530 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id='" . $id . "'";
|
531 |
if (!$wpdb->query($sql_remov_form)) {
|
532 |
?>
|
533 |
-
|
534 |
-
|
535 |
return FALSE;
|
536 |
}
|
537 |
}
|
538 |
?>
|
539 |
-
<div class="updated"><p><strong><?php _e('
|
540 |
-
<?php
|
541 |
-
// Execute query
|
542 |
}
|
543 |
|
544 |
function forchrome($id) {
|
545 |
?>
|
546 |
-
<script type="text/javascript">
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
</script>
|
557 |
-
<form action="index.php" method="post" name="adminForm" id="adminForm">
|
558 |
-
</form>
|
559 |
-
<?php
|
560 |
}
|
561 |
|
562 |
function gotoedit() {
|
563 |
?>
|
564 |
-
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
565 |
-
<?php
|
566 |
}
|
567 |
|
568 |
// Form options.
|
569 |
-
function
|
570 |
global $wpdb;
|
571 |
$row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'");
|
572 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes ORDER BY title";
|
@@ -587,7 +581,7 @@ function Apply_form_options($id) {
|
|
587 |
'mail' => $_POST["mail"],
|
588 |
'theme' => $_POST["theme"],
|
589 |
'javascript' => stripslashes($_POST["javascript"]),
|
590 |
-
'submit_text' => $_POST["content"],
|
591 |
'url' => $_POST["url"],
|
592 |
'submit_text_type' => $_POST["submit_text_type"],
|
593 |
'script_mail' => stripslashes($_POST["script_mail"]),
|
@@ -599,7 +593,7 @@ function Apply_form_options($id) {
|
|
599 |
'payment_currency' => 'USD',
|
600 |
'tax' => 0,
|
601 |
'from_mail' => $_POST["from_mail"],
|
602 |
-
'from_name' => $_POST["from_name"]
|
603 |
), array('id' => $id), array(
|
604 |
'%s',
|
605 |
'%d',
|
@@ -621,4 +615,4 @@ function Apply_form_options($id) {
|
|
621 |
?>
|
622 |
<div class="updated"><p><strong><?php _e('Changes successfully saved'); ?></strong></p></div>
|
623 |
<?php
|
624 |
-
}
|
59 |
|
60 |
function save_update_form_maker() {
|
61 |
global $wpdb;
|
62 |
+
$id = (int) $_GET['id'];
|
63 |
$no_slash_form = stripslashes($_POST['form']);
|
64 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
65 |
$savedd = $wpdb->update($wpdb->prefix . "formmaker", array(
|
66 |
+
'title' => $_POST["title"],
|
67 |
+
'mail' => $_POST["mail"],
|
68 |
+
'form' => $no_slash_form,
|
69 |
+
'form_front' => $no_slash_form_front,
|
70 |
+
'theme' => $_POST["theme"],
|
71 |
+
'counter' => $_POST["counter"],
|
72 |
+
'label_order' => $_POST["label_order"],
|
73 |
+
'label_order_current' => $_POST["label_order_current"],
|
74 |
+
'pagination' => $_POST["pagination"],
|
75 |
+
'show_title' => $_POST["show_title"],
|
76 |
+
'show_numbers' => $_POST["show_numbers"],
|
77 |
+
'public_key' => $_POST["public_key"],
|
78 |
+
'private_key' => $_POST["private_key"],
|
79 |
+
'recaptcha_theme' => $_POST["recaptcha_theme"],
|
80 |
+
), array('id' => $id), array(
|
81 |
+
'%s',
|
82 |
+
'%s',
|
83 |
+
'%s',
|
84 |
+
'%s',
|
85 |
+
'%d',
|
86 |
+
'%d',
|
87 |
+
'%s',
|
88 |
+
'%s',
|
89 |
+
'%s',
|
90 |
+
'%s',
|
91 |
+
'%s',
|
92 |
+
'%s',
|
93 |
+
'%s',
|
94 |
+
'%s'
|
95 |
+
));
|
96 |
html_forchrome_update();
|
97 |
}
|
98 |
|
99 |
function display_form_lists() {
|
100 |
global $wpdb;
|
101 |
$where = '';
|
102 |
+
$sort["custom_style"] = "";
|
103 |
+
$sort["1_or_2"] = "";
|
104 |
$order = "";
|
105 |
+
$sort["default_style"] = "";
|
106 |
+
$sort["sortid_by"] = '';
|
107 |
if (isset($_POST['page_number'])) {
|
108 |
if ($_POST['asc_or_desc']) {
|
109 |
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
110 |
+
if ($_POST['asc_or_desc'] == 1) {
|
111 |
$sort["custom_style"] = "manage-column column-title sorted asc";
|
112 |
$sort["1_or_2"] = "2";
|
113 |
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
119 |
}
|
120 |
}
|
121 |
if ($_POST['page_number']) {
|
122 |
+
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
123 |
}
|
124 |
else {
|
125 |
$limit = 0;
|
136 |
}
|
137 |
if ($search_tag) {
|
138 |
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
|
|
|
|
139 |
$where .= " AND `id` NOT IN(" . get_option('contact_form_forms', 0) . ")";
|
140 |
}
|
141 |
else {
|
142 |
$where = " WHERE `id` NOT IN(" . get_option('contact_form_forms', 0) . ")";
|
143 |
}
|
144 |
+
// Get the total number of records.
|
145 |
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker" . $where;
|
146 |
$total = $wpdb->get_var($query);
|
147 |
$pageNav['total'] = $total;
|
183 |
html_display_form_lists($rows, $pageNav, $sort, $old_version, $can_update_form);
|
184 |
}
|
185 |
|
186 |
+
// Add a form.
|
187 |
function add_form() {
|
188 |
global $wpdb;
|
189 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes WHERE `id` NOT IN(" . get_option('contact_form_themes', 0) . ") ORDER BY title";
|
191 |
html_add_form($themes);
|
192 |
}
|
193 |
|
194 |
+
// Edit the form.
|
195 |
function edit_form_maker($id) {
|
196 |
global $wpdb;
|
197 |
+
// Load the row from the DB table.
|
198 |
if (get_option('contact_form_forms', FALSE)) {
|
199 |
$row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "' AND `id` NOT IN(" . get_option('contact_form_forms') . ")");
|
200 |
}
|
222 |
html_edit_form_maker($row, $labels, $themes);
|
223 |
}
|
224 |
|
225 |
+
function save_form() {
|
226 |
$count_words_in_form = count(explode("_element_section", $_POST["form"])) - count(explode("and_element_section", $_POST["form"])) + count(explode("wdform_table1", $_POST["form"]));
|
227 |
if ($count_words_in_form > 9) {
|
228 |
?>
|
232 |
return FALSE;
|
233 |
}
|
234 |
global $wpdb;
|
235 |
+
if ($_POST["title"] != '') {
|
236 |
if (isset($_POST["label_order"]) && isset($_POST["title"]) && isset($_POST["form"])) {
|
237 |
$no_slash_form = stripslashes($_POST['form']);
|
238 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
281 |
'checkout_mode' => 'testmode',
|
282 |
'paypal_mode' => 0,
|
283 |
'from_mail' => '',
|
284 |
+
'from_name' => '',
|
285 |
), array(
|
286 |
'%d',
|
287 |
'%s',
|
319 |
));
|
320 |
if (!$save_or_no) {
|
321 |
?>
|
322 |
+
<div class="updated"><p><strong><?php _e('Error. Please install plugin again'); ?></strong></p></div>
|
323 |
+
<?php
|
324 |
return FALSE;
|
325 |
}
|
326 |
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
|
327 |
$save_or_no = $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
|
328 |
+
'form_id' => $id
|
329 |
), array(
|
330 |
'%d'
|
331 |
));
|
332 |
?>
|
333 |
+
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
334 |
+
<?php
|
|
|
|
|
335 |
return TRUE;
|
336 |
}
|
337 |
else {
|
338 |
?>
|
339 |
+
<h1>Error</h1>
|
340 |
+
<?php
|
341 |
exit;
|
342 |
}
|
343 |
}
|
344 |
else {
|
345 |
?>
|
346 |
+
<div class="updated"><p><strong><?php _e('could not save form '); ?></strong></p></div>
|
347 |
+
<?php
|
348 |
}
|
349 |
}
|
350 |
|
357 |
$row_for_sav_as_copy = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=" . $form_id);
|
358 |
$javascript = $row_for_sav_as_copy->javascript;
|
359 |
$save_or_no = $wpdb->insert($wpdb->prefix . 'formmaker', array(
|
360 |
+
'id' => NULL,
|
361 |
+
'title' => $_POST["title"],
|
362 |
+
'mail' => $row_for_sav_as_copy->mail,
|
363 |
+
'form' => $no_slash_form,
|
364 |
+
'form_front' => $no_slash_form_front,
|
365 |
+
'theme' => $row_for_sav_as_copy->theme,
|
366 |
+
'counter' => $_POST["counter"],
|
367 |
+
'label_order' => $_POST["label_order"],
|
368 |
+
'pagination' => $_POST["pagination"],
|
369 |
+
'show_title' => $_POST["show_title"],
|
370 |
+
'show_numbers' => $_POST["show_numbers"],
|
371 |
+
'public_key' => $_POST["public_key"],
|
372 |
+
'private_key' => $_POST["private_key"],
|
373 |
+
'recaptcha_theme' => $_POST["recaptcha_theme"],
|
374 |
+
'javascript' => $javascript,
|
375 |
+
'script1' => $row_for_sav_as_copy->script1,
|
376 |
+
'script2' => $row_for_sav_as_copy->script2,
|
377 |
+
'script_user1' => $row_for_sav_as_copy->script_user1,
|
378 |
+
'script_user2' => $row_for_sav_as_copy->script_user2,
|
379 |
+
'submit_text' => $row_for_sav_as_copy->submit_text,
|
380 |
+
'url' => $row_for_sav_as_copy->url,
|
381 |
+
'article_id' => $row_for_sav_as_copy->article_id,
|
382 |
+
'submit_text_type' => $row_for_sav_as_copy->submit_text_type,
|
383 |
+
'script_mail' => $row_for_sav_as_copy->script_mail,
|
384 |
+
'script_mail_user' => $row_for_sav_as_copy->script_mail_user,
|
385 |
+
'paypal_mode' => $row_for_sav_as_copy->paypal_mode,
|
386 |
+
'checkout_mode' => $row_for_sav_as_copy->checkout_mode,
|
387 |
+
'paypal_email' => $row_for_sav_as_copy->paypal_email,
|
388 |
+
'payment_currency' => $row_for_sav_as_copy->payment_currency,
|
389 |
+
'tax' => $row_for_sav_as_copy->tax,
|
390 |
+
'label_order_current' => $row_for_sav_as_copy->label_order_current,
|
391 |
+
'from_mail' => $row_for_sav_as_copy->from_mail,
|
392 |
+
'from_name' => $row_for_sav_as_copy->from_name
|
393 |
), array(
|
394 |
'%d',
|
395 |
'%s',
|
467 |
$no_slash_form_front = stripslashes($_POST['form_front']);
|
468 |
if ($_POST["title"] != '') {
|
469 |
$savedd = $wpdb->update($wpdb->prefix . "formmaker", array(
|
470 |
+
'title' => $_POST["title"],
|
471 |
+
'form' => $no_slash_form,
|
472 |
+
'form_front' => $no_slash_form_front,
|
473 |
+
'counter' => $_POST["counter"],
|
474 |
+
'label_order' => $_POST["label_order"],
|
475 |
+
'label_order_current' => $_POST["label_order_current"],
|
476 |
+
'pagination' => $_POST["pagination"],
|
477 |
+
'show_title' => $_POST["show_title"],
|
478 |
+
'show_numbers' => $_POST["show_numbers"],
|
479 |
+
'public_key' => $_POST["public_key"],
|
480 |
+
'private_key' => $_POST["private_key"],
|
481 |
+
'recaptcha_theme' => $_POST["recaptcha_theme"],
|
482 |
), array('id' => $id), array(
|
483 |
'%s',
|
484 |
'%s',
|
490 |
'%s',
|
491 |
'%s',
|
492 |
'%s',
|
493 |
+
'%s',
|
494 |
'%s'
|
495 |
), array('%d'));
|
496 |
?>
|
497 |
+
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
498 |
+
<?php
|
499 |
}
|
500 |
else {
|
501 |
?>
|
502 |
+
<div class="updated"><p><strong><?php _e('could not save form'); ?></strong></p></div>
|
503 |
+
<?php
|
504 |
}
|
505 |
}
|
506 |
|
513 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'";
|
514 |
if (!$wpdb->query($sql_remov_form)) {
|
515 |
?>
|
516 |
+
<div id="message" class="error"><p>Form Not Deleted</p></div>
|
517 |
+
<?php
|
518 |
return FALSE;
|
519 |
}
|
520 |
if ($wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_views WHERE form_id='" . $id . "'")) {
|
521 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker_views WHERE form_id='" . $id . "'";
|
522 |
if (!$wpdb->query($sql_remov_form)) {
|
523 |
?>
|
524 |
+
<div id="message" class="error"><p>Form views Not Deleted</p></div>
|
525 |
+
<?php
|
526 |
return FALSE;
|
527 |
}
|
528 |
}
|
530 |
$sql_remov_form = "DELETE FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id='" . $id . "'";
|
531 |
if (!$wpdb->query($sql_remov_form)) {
|
532 |
?>
|
533 |
+
<div id="message" class="error"><p>Form submitions Not Deleted</p></div>
|
534 |
+
<?php
|
535 |
return FALSE;
|
536 |
}
|
537 |
}
|
538 |
?>
|
539 |
+
<div class="updated"><p><strong><?php _e('Form Deleted.'); ?></strong></p></div>
|
540 |
+
<?php
|
|
|
541 |
}
|
542 |
|
543 |
function forchrome($id) {
|
544 |
?>
|
545 |
+
<script type="text/javascript">
|
546 |
+
window.onload = val;
|
547 |
+
function val() {
|
548 |
+
document.getElementById('adminForm').action = "admin.php?page=Form_maker&task=gotoedit&id=<?php echo $id;?>";
|
549 |
+
document.getElementById('adminForm').submit();
|
550 |
+
}
|
551 |
+
</script>
|
552 |
+
<form method="post" name="adminForm" id="adminForm"></form>
|
553 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
554 |
}
|
555 |
|
556 |
function gotoedit() {
|
557 |
?>
|
558 |
+
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
559 |
+
<?php
|
560 |
}
|
561 |
|
562 |
// Form options.
|
563 |
+
function wd_form_options($id) {
|
564 |
global $wpdb;
|
565 |
$row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'");
|
566 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_themes ORDER BY title";
|
581 |
'mail' => $_POST["mail"],
|
582 |
'theme' => $_POST["theme"],
|
583 |
'javascript' => stripslashes($_POST["javascript"]),
|
584 |
+
'submit_text' => stripslashes($_POST["content"]),
|
585 |
'url' => $_POST["url"],
|
586 |
'submit_text_type' => $_POST["submit_text_type"],
|
587 |
'script_mail' => stripslashes($_POST["script_mail"]),
|
593 |
'payment_currency' => 'USD',
|
594 |
'tax' => 0,
|
595 |
'from_mail' => $_POST["from_mail"],
|
596 |
+
'from_name' => $_POST["from_name"],
|
597 |
), array('id' => $id), array(
|
598 |
'%s',
|
599 |
'%d',
|
615 |
?>
|
616 |
<div class="updated"><p><strong><?php _e('Changes successfully saved'); ?></strong></p></div>
|
617 |
<?php
|
618 |
+
}
|
form_maker_widget.php
CHANGED
@@ -7,7 +7,8 @@ class form_maker_widget extends WP_Widget {
|
|
7 |
$widget_ops = array(
|
8 |
'classname' => 'form_maker_widget',
|
9 |
'description' => 'Add Form Maker widget.'
|
10 |
-
);
|
|
|
11 |
$control_ops = array('id_base' => 'form_maker_widget'); // Widget Control Settings
|
12 |
$this->WP_Widget('form_maker_widget', 'Form Maker', $widget_ops, $control_ops); // Create the widget
|
13 |
}
|
@@ -22,7 +23,6 @@ class form_maker_widget extends WP_Widget {
|
|
22 |
if ($title) {
|
23 |
echo $before_title . $title . $after_title;
|
24 |
}
|
25 |
-
// echo $title;
|
26 |
global $form_maker_function__once;
|
27 |
if ($form_maker_function__once) {
|
28 |
$form_maker_function__once = 0;
|
7 |
$widget_ops = array(
|
8 |
'classname' => 'form_maker_widget',
|
9 |
'description' => 'Add Form Maker widget.'
|
10 |
+
);
|
11 |
+
// Widget Settings
|
12 |
$control_ops = array('id_base' => 'form_maker_widget'); // Widget Control Settings
|
13 |
$this->WP_Widget('form_maker_widget', 'Form Maker', $widget_ops, $control_ops); // Create the widget
|
14 |
}
|
23 |
if ($title) {
|
24 |
echo $before_title . $title . $after_title;
|
25 |
}
|
|
|
26 |
global $form_maker_function__once;
|
27 |
if ($form_maker_function__once) {
|
28 |
$form_maker_function__once = 0;
|
front_end_form_maker.php
CHANGED
@@ -1,21 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* @package Form Maker
|
5 |
* @author Web-Dorado
|
6 |
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
7 |
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
**/
|
|
|
9 |
function showform($id) {
|
10 |
global $wpdb;
|
11 |
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
12 |
-
if (!$row)
|
13 |
return FALSE;
|
14 |
-
if (isset($_POST['Itemid'])) {
|
15 |
-
$Itemid = esc_html($_POST["Itemid" . $id]);
|
16 |
-
}
|
17 |
-
else {
|
18 |
-
$Itemid = "";
|
19 |
}
|
20 |
$form_theme = $wpdb->get_var($wpdb->prepare("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $row->theme));
|
21 |
if (!$form_theme) {
|
@@ -51,7 +46,7 @@ function savedata($form, $id) {
|
|
51 |
if (!$form->form_front)
|
52 |
$id = '';
|
53 |
if (isset($_POST["counter" . $id])) {
|
54 |
-
$counter = (
|
55 |
if (isset($_POST["captcha_input"])) {
|
56 |
$captcha_input = esc_html($_POST["captcha_input"]);
|
57 |
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
@@ -59,18 +54,20 @@ function savedata($form, $id) {
|
|
59 |
$correct = TRUE;
|
60 |
}
|
61 |
else {
|
62 |
-
echo "<script> alert('" . addslashes(__('Error, incorrect Security code.', 'form_maker')) . "')
|
|
|
63 |
}
|
64 |
}
|
65 |
elseif (isset($_POST["recaptcha_response_field"])) {
|
66 |
$recaptcha_response_field = $_POST["recaptcha_response_field"];
|
67 |
$privatekey = $form->private_key;
|
68 |
-
$resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"],
|
69 |
if ($resp->is_valid) {
|
70 |
$correct = TRUE;
|
71 |
}
|
72 |
else {
|
73 |
-
echo "<script> alert('" . addslashes(__('Error, incorrect Security code.', 'form_maker')) . "')
|
|
|
74 |
}
|
75 |
}
|
76 |
else {
|
@@ -123,6 +120,9 @@ function save_db($counter, $id) {
|
|
123 |
if (!isset($_POST[$i . "_type" . $id]))
|
124 |
break;
|
125 |
}
|
|
|
|
|
|
|
126 |
switch ($type) {
|
127 |
case 'type_text':
|
128 |
case 'type_password':
|
@@ -213,6 +213,7 @@ function save_db($counter, $id) {
|
|
213 |
while (file_exists($destination . "/" . $fileName)) {
|
214 |
$to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
|
215 |
$fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
|
|
216 |
$p++;
|
217 |
}
|
218 |
if (is_dir(ABSPATH . $destination)) {
|
@@ -222,7 +223,7 @@ function save_db($counter, $id) {
|
|
222 |
}
|
223 |
}
|
224 |
else {
|
225 |
-
echo "<script> alert('" . addslashes(__('Error, file
|
226 |
return array($max + 1);
|
227 |
}
|
228 |
$value = site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
@@ -305,20 +306,97 @@ function save_db($counter, $id) {
|
|
305 |
}
|
306 |
break;
|
307 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
}
|
309 |
-
if ($type == "type_address")
|
310 |
-
if ($value == '*#*#*#')
|
311 |
-
break;
|
312 |
$unique_element = $_POST[$i . "_unique" . $id];
|
313 |
if ($unique_element == 'yes') {
|
314 |
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id_old, $i, addslashes($value)));
|
315 |
if ($unique) {
|
316 |
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
317 |
-
return ($max + 1);
|
318 |
}
|
319 |
}
|
320 |
$ip = $_SERVER['REMOTE_ADDR'];
|
321 |
$r = $wpdb->prefix . "formmaker_submits";
|
|
|
322 |
$save_or_no = $wpdb->insert($r, array(
|
323 |
'form_id' => $id_old,
|
324 |
'element_label' => $i,
|
@@ -342,10 +420,12 @@ function save_db($counter, $id) {
|
|
342 |
$str = '';
|
343 |
if ($chgnac) {
|
344 |
global $wpdb;
|
345 |
-
if (count($all_files) == 0)
|
346 |
@session_start();
|
347 |
-
|
|
|
348 |
$_SESSION['massage_after_submit'] = addslashes(addslashes(__('Nothing was submitted.', 'form_maker')));
|
|
|
349 |
$_SESSION['error_or_no'] = 1;
|
350 |
$_SESSION['form_submit_type'] = $form->submit_text_type . "," . $form->id;
|
351 |
wp_redirect($_SERVER["REQUEST_URI"]);
|
@@ -367,7 +447,7 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
367 |
$label_type = array();
|
368 |
$cc = array();
|
369 |
$row_mail_one_time = 1;
|
370 |
-
$label_all = explode('#****#', $row->
|
371 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
372 |
foreach ($label_all as $key => $label_each) {
|
373 |
$label_id_each = explode('#**id**#', $label_each);
|
@@ -457,23 +537,26 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
457 |
}
|
458 |
case "type_address":
|
459 |
{
|
460 |
-
|
461 |
-
if (isset($_POST[$i . "_street1" . $id])) {
|
462 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street1" . $id] . '</td></tr>';
|
463 |
-
|
|
|
464 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street2" . $id] . '</td></tr>';
|
465 |
-
|
|
|
466 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_city" . $id] . '</td></tr>';
|
467 |
-
|
|
|
468 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_state" . $id] . '</td></tr>';
|
469 |
-
|
|
|
470 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_postal" . $id] . '</td></tr>';
|
471 |
-
|
|
|
472 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_country" . $id] . '</td></tr>';
|
473 |
-
|
474 |
-
}
|
475 |
break;
|
476 |
-
|
477 |
case "type_date_fields":
|
478 |
{
|
479 |
$day = $_POST[$i . "_day" . $id];
|
@@ -524,7 +607,133 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
524 |
$list = $list . '</td></tr>';
|
525 |
}
|
526 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
default:
|
529 |
break;
|
530 |
}
|
@@ -633,22 +842,30 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
633 |
break;
|
634 |
}
|
635 |
case "type_address": {
|
636 |
-
|
637 |
-
if (isset($street1)) {
|
638 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
639 |
-
|
|
|
|
|
640 |
$new_value = $new_value.$_POST[$key."_street2".$id];
|
641 |
-
|
|
|
|
|
642 |
$new_value = $new_value.$_POST[$key."_city".$id];
|
643 |
-
|
|
|
|
|
644 |
$new_value = $new_value.$_POST[$key."_state".$id];
|
645 |
-
|
|
|
|
|
646 |
$new_value = $new_value.$_POST[$key."_postal".$id];
|
647 |
-
|
|
|
|
|
648 |
$new_value = $new_value.$_POST[$key."_country".$id];
|
649 |
-
|
650 |
-
}
|
651 |
-
break;
|
652 |
}
|
653 |
case "type_date_fields": {
|
654 |
$day = $_POST[$key."_day".$id];
|
@@ -698,6 +915,199 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
698 |
}
|
699 |
break;
|
700 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
701 |
default: break;
|
702 |
}
|
703 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
@@ -707,14 +1117,17 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
707 |
if (strpos($new_script, "%all%") !== FALSE) {
|
708 |
$new_script = str_replace("%all%", $list, $new_script);
|
709 |
}
|
710 |
-
$body = $new_script;
|
711 |
-
$send = wp_mail($recipient, $subject, stripslashes($body), $headers, $attachment);
|
712 |
}
|
713 |
if ($row->mail) {
|
714 |
if ($c) {
|
715 |
-
// $headers_form_mail =
|
716 |
$headers = "MIME-Version: 1.0\n" . "From: " . $c . " <" . $c . ">" . "\r\n" . "Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n";
|
717 |
}
|
|
|
|
|
|
|
718 |
if ($row_mail_one_time) {
|
719 |
$recipient = $row->mail;
|
720 |
$subject = $row->title;
|
@@ -789,7 +1202,7 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
789 |
if (isset($element_first)) {
|
790 |
$element_title = $_POST[$key."_element_title".$id];
|
791 |
if (isset($element_title)) {
|
792 |
-
$new_value = $_POST[$key."_element_title".$id].' '.$_POST[$key."_element_first".$id].' '.$_POST[$
|
793 |
}
|
794 |
else {
|
795 |
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
@@ -799,21 +1212,30 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
799 |
}
|
800 |
case "type_address": {
|
801 |
$street1 = $_POST[$key."_street1".$id];
|
802 |
-
if (isset($
|
803 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
804 |
-
|
|
|
|
|
805 |
$new_value=$new_value.$_POST[$key."_street2".$id];
|
806 |
-
|
|
|
|
|
807 |
$new_value=$new_value.$_POST[$key."_city".$id];
|
808 |
-
|
|
|
|
|
809 |
$new_value=$new_value.$_POST[$key."_state".$id];
|
810 |
-
|
|
|
|
|
811 |
$new_value=$new_value.$_POST[$key."_postal".$id];
|
812 |
-
|
|
|
|
|
813 |
$new_value=$new_value.$_POST[$key."_country".$id];
|
814 |
-
|
815 |
-
}
|
816 |
-
break;
|
817 |
}
|
818 |
case "type_date_fields": {
|
819 |
$day = $_POST[$key."_day".$id];
|
@@ -863,6 +1285,170 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
863 |
}
|
864 |
break;
|
865 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
866 |
default: break;
|
867 |
}
|
868 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
@@ -874,7 +1460,7 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
874 |
}
|
875 |
$body = $new_script;
|
876 |
$mode = 1;
|
877 |
-
$send = wp_mail($recipient, $subject, stripslashes($body), $headers, $attachment);
|
878 |
$row_mail_one_time = 0;
|
879 |
}
|
880 |
}
|
@@ -963,22 +1549,30 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
963 |
break;
|
964 |
}
|
965 |
case "type_address": {
|
966 |
-
|
967 |
-
if (isset($street1)) {
|
968 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
969 |
-
|
|
|
|
|
970 |
$new_value = $new_value.$_POST[$key."_street2".$id];
|
971 |
-
|
|
|
|
|
972 |
$new_value = $new_value.$_POST[$key."_city".$id];
|
973 |
-
|
|
|
|
|
974 |
$new_value = $new_value.$_POST[$key."_state".$id];
|
975 |
-
|
|
|
|
|
976 |
$new_value = $new_value.$_POST[$key."_postal".$id];
|
977 |
-
|
|
|
|
|
978 |
$new_value = $new_value.$_POST[$key."_country".$id];
|
979 |
-
|
980 |
}
|
981 |
-
break;
|
982 |
}
|
983 |
case "type_date_fields": {
|
984 |
$day = $_POST[$key."_day".$id];
|
@@ -1028,6 +1622,199 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
1028 |
}
|
1029 |
break;
|
1030 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1031 |
default: break;
|
1032 |
}
|
1033 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
@@ -1038,7 +1825,7 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
1038 |
$new_script = str_replace("%all%", $list, $new_script);
|
1039 |
}
|
1040 |
$body = $new_script;
|
1041 |
-
$send = wp_mail($recipient, $subject, stripslashes($body), $headers, $attachment);
|
1042 |
}
|
1043 |
}
|
1044 |
if ($row->mail) {
|
@@ -1087,8 +1874,9 @@ function gen_mail($counter, $all_files, $id, $str) {
|
|
1087 |
case "4":
|
1088 |
{
|
1089 |
@session_start();
|
1090 |
-
if ($row->submit_text_type != 4)
|
1091 |
$_SESSION['massage_after_submit'] = $msg;
|
|
|
1092 |
$_SESSION['form_submit_type'] = $row->submit_text_type . "," . $row->id;
|
1093 |
$redirect_url = $row->url;
|
1094 |
break;
|
@@ -1120,9 +1908,8 @@ function remove($group_id) {
|
|
1120 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
|
1121 |
}
|
1122 |
|
1123 |
-
|
1124 |
function form_maker_front_end($id) {
|
1125 |
-
global $wp_filter;
|
1126 |
$form_maker_front_end = "";
|
1127 |
$result = showform($id);
|
1128 |
if (!$result) {
|
@@ -1138,12 +1925,13 @@ function form_maker_front_end($id) {
|
|
1138 |
$label_id = $result[2];
|
1139 |
$label_type = $result[3];
|
1140 |
$form_theme = $result[4];
|
1141 |
-
if (isset($_SESSION['show_submit_text' . $id]))
|
1142 |
if ($_SESSION['show_submit_text' . $id] == 1) {
|
1143 |
$_SESSION['show_submit_text' . $id] = 0;
|
1144 |
$form_maker_front_end .= $row->submit_text;
|
1145 |
return;
|
1146 |
}
|
|
|
1147 |
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
1148 |
$vives_form = $vives_form + 1;
|
1149 |
$wpdb->update($wpdb->prefix . "formmaker_views", array(
|
@@ -1161,12 +1949,10 @@ function form_maker_front_end($id) {
|
|
1161 |
$body_or_classes[$i] = explode('}', $new_form_theme[$i]);
|
1162 |
}
|
1163 |
for ($i = 0; $i < $count_after_explod_theme; $i++) {
|
1164 |
-
if ($i == 0)
|
1165 |
$body_or_classes[$i][0] = "#form" . $id . ' ' . str_replace(',', ", #form" . $id, $body_or_classes[$i][0]);
|
1166 |
-
|
1167 |
-
else {
|
1168 |
$body_or_classes[$i][1] = "#form" . $id . ' ' . str_replace(',', ", #form" . $id, $body_or_classes[$i][1]);
|
1169 |
-
}
|
1170 |
}
|
1171 |
for ($i = 0; $i < $count_after_explod_theme; $i++) {
|
1172 |
$body_or_classes_implode[$i] = implode('}', $body_or_classes[$i]);
|
@@ -1204,6 +1990,11 @@ function form_maker_front_end($id) {
|
|
1204 |
"<!--repstart-->Country<!--repend-->",
|
1205 |
"<!--repstart-->Area Code<!--repend-->",
|
1206 |
"<!--repstart-->Phone Number<!--repend-->",
|
|
|
|
|
|
|
|
|
|
|
1207 |
$captcha_url,
|
1208 |
'class="captcha_img"',
|
1209 |
plugins_url("images/refresh.png", __FILE__),
|
@@ -1235,6 +2026,11 @@ function form_maker_front_end($id) {
|
|
1235 |
addslashes(__("Country", 'form_maker')),
|
1236 |
addslashes(__("Area Code", 'form_maker')),
|
1237 |
addslashes(__("Phone Number", 'form_maker')),
|
|
|
|
|
|
|
|
|
|
|
1238 |
$captcha_rep_url,
|
1239 |
'class="captcha_img" style="display:none"',
|
1240 |
plugins_url("images/refresh.png", __FILE__),
|
@@ -1250,14 +2046,14 @@ function form_maker_front_end($id) {
|
|
1250 |
$form_maker_front_end .= $untilupload;
|
1251 |
$is_recaptcha = FALSE;
|
1252 |
$form_maker_front_end .= '<script type="text/javascript">';
|
1253 |
-
$form_maker_front_end .= 'WDF_FILE_TYPE_ERROR = \'' . addslashes(__("Sorry, you are not allowed to upload this type of file.", 'form_maker')) . '\';
|
1254 |
-
';
|
1255 |
-
$form_maker_front_end .= '
|
1256 |
-
';
|
1257 |
-
$form_maker_front_end .= 'REQUEST_URI = "' . $_SERVER['REQUEST_URI'] . '";
|
1258 |
-
';
|
1259 |
-
$form_maker_front_end .= '
|
1260 |
-
';
|
1261 |
$form_maker_front_end .= 'function formOnload' . $id . '()
|
1262 |
{
|
1263 |
';
|
@@ -1319,42 +2115,133 @@ function form_maker_front_end($id) {
|
|
1319 |
case 'type_radio':
|
1320 |
case 'type_checkbox':
|
1321 |
$form_maker_front_end .= 'if(document.getElementById(\'' . $label_id[$key] . '_randomize' . $id . '\'))
|
1322 |
-
if(document.getElementById(\'' . $label_id[$key] . '_randomize' . $id . '\').value=="yes")
|
1323 |
-
|
1324 |
-
choises_randomize(\'' . $label_id[$key] . '\', \'' . $id . '\');
|
1325 |
-
}';
|
1326 |
break;
|
1327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
break;
|
1329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1330 |
}
|
1331 |
-
$
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
{
|
1339 |
-
|
1340 |
-
|
1341 |
-
}
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
var
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1351 |
}
|
1352 |
-
|
1353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1354 |
}
|
1355 |
-
|
1356 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1357 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
$old_key = -1;
|
1359 |
if (isset($counter)) {
|
1360 |
foreach ($label_type as $key => $type) {
|
@@ -1448,6 +2335,120 @@ formLoadBody' . $id . '();';
|
|
1448 |
}";
|
1449 |
break;
|
1450 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1451 |
case "type_address":
|
1452 |
{
|
1453 |
if ($key > $old_key) {
|
@@ -1560,12 +2561,12 @@ formLoadBody' . $id . '();';
|
|
1560 |
}
|
1561 |
case "type_date_fields":
|
1562 |
{
|
1563 |
-
$date_fields = explode('-', $_POST[$label_id[$key] . "_element" . $id]);
|
1564 |
$form_maker_front_end .= "if(document.getElementById('" . $label_id[$key] . "_day" . $id . "'))
|
1565 |
{
|
1566 |
-
document.getElementById('" . $label_id[$key] . "_day" . $id . "').value='" . $
|
1567 |
-
document.getElementById('" . $label_id[$key] . "_month" . $id . "').value='" . $
|
1568 |
-
document.getElementById('" . $label_id[$key] . "_year" . $id . "').value='" . $
|
1569 |
}";
|
1570 |
break;
|
1571 |
}
|
@@ -1623,17 +2624,18 @@ theme: "' . $row->recaptcha_theme . '"
|
|
1623 |
$form_maker_front_end .= recaptcha_get_html($publickey, $error);
|
1624 |
$form_maker_front_end .= '</div>
|
1625 |
<script>
|
1626 |
-
recaptcha_html=document.getElementById(\'main_recaptcha\').innerHTML.replace(\'Recaptcha.widget = Recaptcha.$("recaptcha_widget_div"); Recaptcha.challenge_callback();\',"");
|
1627 |
document.getElementById(\'main_recaptcha\').innerHTML="";
|
1628 |
-
if(document.getElementById(\'wd_recaptcha' . $id . '\'))
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
|
|
1632 |
</script>';
|
1633 |
}
|
1634 |
}
|
1635 |
else {
|
1636 |
-
$form_maker_front_end .= '<script type="text/javascript">' . str_replace("
|
1637 |
", " ", $row->javascript) . '</script>';
|
1638 |
$form_maker_front_end .= '<style>' . str_replace('[SITE_ROOT]', plugins_url("", __FILE__), str_replace('.wdform_table1', '.form_view', str_replace("
|
1639 |
", " ", $form_theme))) . '</style>';
|
@@ -1714,7 +2716,9 @@ theme: "' . $row->recaptcha_theme . '"
|
|
1714 |
}
|
1715 |
function formAddToOnload()
|
1716 |
{
|
1717 |
-
if(formOldFunctionOnLoad){
|
|
|
|
|
1718 |
formOnload();
|
1719 |
}
|
1720 |
function formLoadBody()
|
@@ -1725,11 +2729,8 @@ theme: "' . $row->recaptcha_theme . '"
|
|
1725 |
var formOldFunctionOnLoad = null;
|
1726 |
formLoadBody();
|
1727 |
";
|
1728 |
-
if (isset($_POST["captcha_input"])) {
|
1729 |
-
$captcha_input = esc_html($_POST["captcha_input"]);
|
1730 |
-
}
|
1731 |
if (isset($_POST["counter"])) {
|
1732 |
-
$counter = (
|
1733 |
}
|
1734 |
if (isset($counter))
|
1735 |
if (isset($_POST["captcha_input"]) or is_numeric($ok)) {
|
@@ -2252,5 +3253,3 @@ form_.submit();
|
|
2252 |
}
|
2253 |
return $form_maker_front_end;
|
2254 |
}
|
2255 |
-
|
2256 |
-
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* @package Form Maker
|
4 |
* @author Web-Dorado
|
5 |
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
6 |
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
7 |
**/
|
8 |
+
|
9 |
function showform($id) {
|
10 |
global $wpdb;
|
11 |
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
|
12 |
+
if (!$row) {
|
13 |
return FALSE;
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
$form_theme = $wpdb->get_var($wpdb->prepare("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $row->theme));
|
16 |
if (!$form_theme) {
|
46 |
if (!$form->form_front)
|
47 |
$id = '';
|
48 |
if (isset($_POST["counter" . $id])) {
|
49 |
+
$counter = esc_html($_POST["counter" . $id]);
|
50 |
if (isset($_POST["captcha_input"])) {
|
51 |
$captcha_input = esc_html($_POST["captcha_input"]);
|
52 |
$session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
|
54 |
$correct = TRUE;
|
55 |
}
|
56 |
else {
|
57 |
+
echo "<script> alert('" . addslashes(__('Error, incorrect Security code.', 'form_maker')) . "');
|
58 |
+
</script>";
|
59 |
}
|
60 |
}
|
61 |
elseif (isset($_POST["recaptcha_response_field"])) {
|
62 |
$recaptcha_response_field = $_POST["recaptcha_response_field"];
|
63 |
$privatekey = $form->private_key;
|
64 |
+
$resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $recaptcha_response_field);
|
65 |
if ($resp->is_valid) {
|
66 |
$correct = TRUE;
|
67 |
}
|
68 |
else {
|
69 |
+
echo "<script> alert('" . addslashes(__('Error, incorrect Security code.', 'form_maker')) . "');
|
70 |
+
</script>";
|
71 |
}
|
72 |
}
|
73 |
else {
|
120 |
if (!isset($_POST[$i . "_type" . $id]))
|
121 |
break;
|
122 |
}
|
123 |
+
if ($type == 'type_paypal_total') {
|
124 |
+
continue;
|
125 |
+
}
|
126 |
switch ($type) {
|
127 |
case 'type_text':
|
128 |
case 'type_password':
|
213 |
while (file_exists($destination . "/" . $fileName)) {
|
214 |
$to = strlen($file['name']) - strlen($uploadedFileExtension) - 1;
|
215 |
$fileName = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
|
216 |
+
$file['name'] = $fileName;
|
217 |
$p++;
|
218 |
}
|
219 |
if (is_dir(ABSPATH . $destination)) {
|
223 |
}
|
224 |
}
|
225 |
else {
|
226 |
+
echo "<script> alert('" . addslashes(__('Error, file destination does not exist.', 'form_maker')) . "');</script>";
|
227 |
return array($max + 1);
|
228 |
}
|
229 |
$value = site_url() . '/' . $destination . '/' . $fileName . '*@@url@@*';
|
306 |
}
|
307 |
break;
|
308 |
}
|
309 |
+
case "type_star_rating": {
|
310 |
+
if (isset($_POST[$i."_selected_star_amount".$id]) && $_POST[$i."_selected_star_amount".$id] != "") {
|
311 |
+
$selected_star_amount = $_POST[$i."_selected_star_amount".$id];
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
$selected_star_amount = 0;
|
315 |
+
}
|
316 |
+
$value = (isset($_POST[$i."_star_amount".$id]) ? $_POST[$i."_star_amount".$id] : '').'***'.$selected_star_amount.'***'.(isset($_POST[$i."_star_color".$id]) ? $_POST[$i."_star_color".$id] : '').'***star_rating***';
|
317 |
+
break;
|
318 |
+
}
|
319 |
+
case "type_scale_rating": {
|
320 |
+
$value = (isset($_POST[$i."_scale_radio".$id]) ? $_POST[$i."_scale_radio".$id] : 0).'/'.(isset($_POST[$i."_scale_amount".$id]) ? $_POST[$i."_scale_amount".$id] : '');
|
321 |
+
break;
|
322 |
+
}
|
323 |
+
case "type_spinner": {
|
324 |
+
$value = (isset($_POST[$i."_element".$id]) ? $_POST[$i."_element".$id] : '');
|
325 |
+
break;
|
326 |
+
}
|
327 |
+
case "type_slider": {
|
328 |
+
$value = (isset($_POST[$i."_slider_value".$id]) ? $_POST[$i."_slider_value".$id] : '');
|
329 |
+
break;
|
330 |
+
}
|
331 |
+
case "type_range": {
|
332 |
+
$value = (isset($_POST[$i."_element".$id . '0']) ? $_POST[$i."_element".$id . '0'] : '') .'-'.(isset($_POST[$i."_element".$id.'1']) ? $_POST[$i."_element".$id.'1'] : '');
|
333 |
+
break;
|
334 |
+
}
|
335 |
+
case "type_grading": {
|
336 |
+
$value = "";
|
337 |
+
if (isset($_POST[$i."_hidden_item".$id])) {
|
338 |
+
$items = explode(":", $_POST[$i."_hidden_item".$id]);
|
339 |
+
for ($k = 0; $k < sizeof($items) - 1; $k++) {
|
340 |
+
if (isset($_POST[$i."_element".$id.$k])) {
|
341 |
+
$value .= $_POST[$i."_element".$id.$k].':';
|
342 |
+
}
|
343 |
+
}
|
344 |
+
$value .= $_POST[$i."_hidden_item".$id].'***grading***';
|
345 |
+
}
|
346 |
+
break;
|
347 |
+
}
|
348 |
+
case "type_matrix": {
|
349 |
+
$rows_of_matrix = explode("***",$_POST[$i."_hidden_row".$id]);
|
350 |
+
$rows_count= sizeof($rows_of_matrix)-1;
|
351 |
+
$column_of_matrix=explode("***",$_POST[$i."_hidden_column".$id]);
|
352 |
+
$columns_count= sizeof($column_of_matrix)-1;
|
353 |
+
$row_ids=explode(",",substr($_POST[$i."_row_ids".$id], 0, -1));
|
354 |
+
$column_ids=explode(",",substr($_POST[$i."_column_ids".$id], 0, -1));
|
355 |
+
if ($_POST[$i."_input_type".$id]=="radio") {
|
356 |
+
$input_value="";
|
357 |
+
foreach($row_ids as $row_id) {
|
358 |
+
$input_value.=(isset($_POST[$i."_input_element".$id.$row_id]) ? $_POST[$i."_input_element".$id.$row_id] : 0)."***";
|
359 |
+
}
|
360 |
+
}
|
361 |
+
if ($_POST[$i."_input_type".$id]=="checkbox") {
|
362 |
+
$input_value="";
|
363 |
+
foreach($row_ids as $row_id)
|
364 |
+
foreach($column_ids as $column_id)
|
365 |
+
$input_value .= (isset($_POST[$i."_input_element".$id.$row_id.'_'.$column_id]) ? $_POST[$i."_input_element".$id.$row_id.'_'.$column_id] : 0)."***";
|
366 |
+
}
|
367 |
+
if ($_POST[$i."_input_type".$id]=="text") {
|
368 |
+
$input_value="";
|
369 |
+
foreach($row_ids as $row_id)
|
370 |
+
foreach($column_ids as $column_id)
|
371 |
+
$input_value.=$_POST[$i."_input_element".$id.$row_id.'_'.$column_id]."***";
|
372 |
+
}
|
373 |
+
if ($_POST[$i."_input_type".$id]=="select") {
|
374 |
+
$input_value="";
|
375 |
+
foreach($row_ids as $row_id)
|
376 |
+
foreach($column_ids as $column_id)
|
377 |
+
$input_value.=$_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id]."***";
|
378 |
+
}
|
379 |
+
$value=$rows_count.'***'.$_POST[$i."_hidden_row".$id].$columns_count.'***'.$_POST[$i."_hidden_column".$id].$_POST[$i."_input_type".$id].'***'.$input_value.'***matrix***';
|
380 |
+
break;
|
381 |
+
}
|
382 |
+
}
|
383 |
+
if ($type == "type_address") {
|
384 |
+
if ($value == '*#*#*#') {
|
385 |
+
//break;?????????????????????????????????????????????????????
|
386 |
+
continue;
|
387 |
+
}
|
388 |
}
|
|
|
|
|
|
|
389 |
$unique_element = $_POST[$i . "_unique" . $id];
|
390 |
if ($unique_element == 'yes') {
|
391 |
$unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id_old, $i, addslashes($value)));
|
392 |
if ($unique) {
|
393 |
echo "<script> alert('" . addslashes(__('This field %s requires a unique entry and this value was already submitted.', 'form_maker')) . "'.replace('%s','" . $label_label[$key] . "'));</script>";
|
394 |
+
return array($max + 1);
|
395 |
}
|
396 |
}
|
397 |
$ip = $_SERVER['REMOTE_ADDR'];
|
398 |
$r = $wpdb->prefix . "formmaker_submits";
|
399 |
+
|
400 |
$save_or_no = $wpdb->insert($r, array(
|
401 |
'form_id' => $id_old,
|
402 |
'element_label' => $i,
|
420 |
$str = '';
|
421 |
if ($chgnac) {
|
422 |
global $wpdb;
|
423 |
+
if (count($all_files) == 0) {
|
424 |
@session_start();
|
425 |
+
}
|
426 |
+
if ($form->submit_text_type != 4) {
|
427 |
$_SESSION['massage_after_submit'] = addslashes(addslashes(__('Nothing was submitted.', 'form_maker')));
|
428 |
+
}
|
429 |
$_SESSION['error_or_no'] = 1;
|
430 |
$_SESSION['form_submit_type'] = $form->submit_text_type . "," . $form->id;
|
431 |
wp_redirect($_SERVER["REQUEST_URI"]);
|
447 |
$label_type = array();
|
448 |
$cc = array();
|
449 |
$row_mail_one_time = 1;
|
450 |
+
$label_all = explode('#****#', $row->label_order_current);
|
451 |
$label_all = array_slice($label_all, 0, count($label_all) - 1);
|
452 |
foreach ($label_all as $key => $label_each) {
|
453 |
$label_id_each = explode('#**id**#', $label_each);
|
537 |
}
|
538 |
case "type_address":
|
539 |
{
|
540 |
+
if (isset($_POST[$i . "_street1" . $id]))
|
|
|
541 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street1" . $id] . '</td></tr>';
|
542 |
+
$i++;
|
543 |
+
if (isset($_POST[$i."_street2".$id]))
|
544 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_street2" . $id] . '</td></tr>';
|
545 |
+
$i++;
|
546 |
+
if (isset($_POST[$i."_city".$id]))
|
547 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_city" . $id] . '</td></tr>';
|
548 |
+
$i++;
|
549 |
+
if (isset($_POST[$i."_state".$id]))
|
550 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_state" . $id] . '</td></tr>';
|
551 |
+
$i++;
|
552 |
+
if (isset($_POST[$i."_postal".$id]))
|
553 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_postal" . $id] . '</td></tr>';
|
554 |
+
$i++;
|
555 |
+
if (isset($_POST[$i."_country".$id]))
|
556 |
$list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $_POST[$i . "_country" . $id] . '</td></tr>';
|
557 |
+
$i++;
|
|
|
558 |
break;
|
559 |
+
}
|
560 |
case "type_date_fields":
|
561 |
{
|
562 |
$day = $_POST[$i . "_day" . $id];
|
607 |
$list = $list . '</td></tr>';
|
608 |
}
|
609 |
break;
|
610 |
+
}
|
611 |
+
case "type_star_rating": {
|
612 |
+
$selected = (isset($_POST[$i."_selected_star_amount".$id]) ? $_POST[$i."_selected_star_amount".$id] : 0);
|
613 |
+
if (isset($_POST[$i."_star_amount".$id])) {
|
614 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$selected.'/'.$_POST[$i."_star_amount".$id].'</pre></td></tr>';
|
615 |
+
}
|
616 |
+
break;
|
617 |
+
}
|
618 |
+
case "type_scale_rating": {
|
619 |
+
$selected = (isset($_POST[$i."_scale_radio".$id]) ? $_POST[$i."_scale_radio".$id] : 0);
|
620 |
+
if (isset($_POST[$i."_scale_amount".$id])) {
|
621 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$selected.'/'.$_POST[$i."_scale_radio".$id].'</pre></td></tr>';
|
622 |
+
}
|
623 |
+
break;
|
624 |
+
}
|
625 |
+
case "type_spinner": {
|
626 |
+
if (isset($_POST[$i."_element".$id])) {
|
627 |
+
$list=$list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$_POST[$i."_element".$id].'</pre></td></tr>';
|
628 |
+
}
|
629 |
+
break;
|
630 |
+
}
|
631 |
+
case "type_slider": {
|
632 |
+
if (isset($_POST[$i."_slider_value".$id])) {
|
633 |
+
$list=$list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$_POST[$i."_slider_value".$id].'</pre></td></tr>';
|
634 |
+
}
|
635 |
+
break;
|
636 |
+
}
|
637 |
+
case "type_range": {
|
638 |
+
if(isset($_POST[$i."_element".$id.'0']) || isset($_POST[$i."_element".$id.'1'])) {
|
639 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">From:'.$_POST[$i."_element".$id.'0'].'<span style="margin-left:6px">To</span>:'.$_POST[$i."_element".$id.'1'].'</pre></td></tr>';
|
640 |
+
}
|
641 |
+
break;
|
642 |
+
}
|
643 |
+
case "type_grading": {
|
644 |
+
if (isset($_POST[$i."_hidden_item".$id])) {
|
645 |
+
$element = $_POST[$i."_hidden_item".$id];
|
646 |
+
$grading = explode(":", $element);
|
647 |
+
$items_count = sizeof($grading) - 1;
|
648 |
+
$total = "";
|
649 |
+
for ($k = 0; $k < $items_count; $k++) {
|
650 |
+
if (isset($_POST[$i."_element".$id.$k])) {
|
651 |
+
$element .= $grading[$k].":".$_POST[$i."_element".$id.$k]." ";
|
652 |
+
$total += $_POST[$i."_element".$id.$k];
|
653 |
+
}
|
654 |
+
}
|
655 |
+
$element .= "Total:".$total;
|
656 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$element.'</pre></td></tr>';
|
657 |
+
}
|
658 |
+
break;
|
659 |
+
}
|
660 |
+
case "type_matrix": {
|
661 |
+
$input_type=$_POST[$i."_input_type".$id];
|
662 |
+
|
663 |
+
$mat_rows = $_POST[$i."_hidden_row".$id];
|
664 |
+
$mat_rows = explode('***', $mat_rows);
|
665 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
666 |
+
$mat_columns = $_POST[$i."_hidden_column".$id];
|
667 |
+
$mat_columns = explode('***', $mat_columns);
|
668 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
669 |
+
$row_ids=explode(",",substr($_POST[$i."_row_ids".$id], 0, -1));
|
670 |
+
$column_ids=explode(",",substr($_POST[$i."_column_ids".$id], 0, -1));
|
671 |
+
$matrix = "<table>";
|
672 |
+
$matrix .= '<tr><td></td>';
|
673 |
+
for ($k = 0; $k < count($mat_columns); $k++) {
|
674 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
675 |
+
}
|
676 |
+
$matrix .= '</tr>';
|
677 |
+
$aaa = Array();
|
678 |
+
$k = 0;
|
679 |
+
foreach ($row_ids as $row_id) {
|
680 |
+
$matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
681 |
+
if ($input_type=="radio") {
|
682 |
+
$mat_radio = (isset($_POST[$i."_input_element".$id.$row_id]) ? $_POST[$i."_input_element".$id.$row_id] : 0);
|
683 |
+
if ($mat_radio == 0) {
|
684 |
+
$checked = "";
|
685 |
+
$aaa[1] = "";
|
686 |
+
}
|
687 |
+
else {
|
688 |
+
$aaa = explode("_", $mat_radio);
|
689 |
+
}
|
690 |
+
foreach ($column_ids as $column_id) {
|
691 |
+
if ($aaa[1] == $column_id) {
|
692 |
+
$checked = "checked";
|
693 |
+
}
|
694 |
+
else {
|
695 |
+
$checked = "";
|
696 |
+
}
|
697 |
+
$matrix .= '<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
698 |
+
}
|
699 |
+
}
|
700 |
+
else {
|
701 |
+
if ($input_type=="checkbox") {
|
702 |
+
foreach($column_ids as $column_id) {
|
703 |
+
$checked = $_POST[$i."_input_element".$id.$row_id.'_'.$column_id];
|
704 |
+
if ($checked == 1) {
|
705 |
+
$checked = "checked";
|
706 |
+
}
|
707 |
+
else {
|
708 |
+
$checked = "";
|
709 |
+
}
|
710 |
+
$matrix .= '<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
711 |
+
}
|
712 |
+
}
|
713 |
+
else {
|
714 |
+
if ($input_type=="text") {
|
715 |
+
foreach ($column_ids as $column_id) {
|
716 |
+
$checked = $_POST[$i."_input_element".$id.$row_id.'_'.$column_id];
|
717 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
718 |
+
}
|
719 |
+
}
|
720 |
+
else {
|
721 |
+
foreach ($column_ids as $column_id) {
|
722 |
+
$checked = $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id];
|
723 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
724 |
+
}
|
725 |
+
}
|
726 |
+
}
|
727 |
+
}
|
728 |
+
$matrix .= '</tr>';
|
729 |
+
$k++;
|
730 |
}
|
731 |
+
$matrix .= '</table>';
|
732 |
+
if (isset($matrix)) {
|
733 |
+
$list = $list.'<tr valign="top"><td >'.$element_label.'</td><td ><pre style="font-family:inherit; margin:0px; padding:0px">'.$matrix.'</pre></td></tr>';
|
734 |
+
}
|
735 |
+
break;
|
736 |
+
}
|
737 |
default:
|
738 |
break;
|
739 |
}
|
842 |
break;
|
843 |
}
|
844 |
case "type_address": {
|
845 |
+
if (isset($_POST[$key."_street1".$id])) {
|
|
|
846 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
847 |
+
break;
|
848 |
+
}
|
849 |
+
if (isset($_POST[$key."_street2".$id])) {
|
850 |
$new_value = $new_value.$_POST[$key."_street2".$id];
|
851 |
+
break;
|
852 |
+
}
|
853 |
+
if (isset($_POST[$key."_city".$id])) {
|
854 |
$new_value = $new_value.$_POST[$key."_city".$id];
|
855 |
+
break;
|
856 |
+
}
|
857 |
+
if (isset($_POST[$key."_state".$id])) {
|
858 |
$new_value = $new_value.$_POST[$key."_state".$id];
|
859 |
+
break;
|
860 |
+
}
|
861 |
+
if (isset($_POST[$key."_postal".$id])) {
|
862 |
$new_value = $new_value.$_POST[$key."_postal".$id];
|
863 |
+
break;
|
864 |
+
}
|
865 |
+
if (isset($_POST[$key."_country".$id])) {
|
866 |
$new_value = $new_value.$_POST[$key."_country".$id];
|
867 |
+
break;
|
868 |
+
}
|
|
|
869 |
}
|
870 |
case "type_date_fields": {
|
871 |
$day = $_POST[$key."_day".$id];
|
915 |
}
|
916 |
break;
|
917 |
}
|
918 |
+
case "type_star_rating":
|
919 |
+
{
|
920 |
+
$element=$_POST[$key."_star_amount".$id];
|
921 |
+
$selected=(isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
922 |
+
|
923 |
+
|
924 |
+
if(isset($element))
|
925 |
+
{
|
926 |
+
$new_value=$new_value.$selected.'/'.$element;
|
927 |
+
}
|
928 |
+
break;
|
929 |
+
}
|
930 |
+
|
931 |
+
|
932 |
+
case "type_scale_rating":
|
933 |
+
{
|
934 |
+
$element=$_POST[$key."_scale_amount".$id];
|
935 |
+
$selected=(isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
936 |
+
|
937 |
+
|
938 |
+
if(isset($element))
|
939 |
+
{
|
940 |
+
$new_value=$new_value.$selected.'/'.$element;
|
941 |
+
}
|
942 |
+
break;
|
943 |
+
}
|
944 |
+
|
945 |
+
case "type_spinner":
|
946 |
+
{
|
947 |
+
|
948 |
+
if (isset($_POST[$key."_element".$id])) {
|
949 |
+
$new_value = $new_value . $_POST[$key."_element".$id];
|
950 |
+
}
|
951 |
+
break;
|
952 |
+
}
|
953 |
+
|
954 |
+
case "type_slider":
|
955 |
+
{
|
956 |
+
|
957 |
+
$element=$_POST[$key."_slider_value".$id];
|
958 |
+
if(isset($element))
|
959 |
+
{
|
960 |
+
$new_value=$new_value.$element;
|
961 |
+
}
|
962 |
+
break;
|
963 |
+
}
|
964 |
+
case "type_range":
|
965 |
+
{
|
966 |
+
|
967 |
+
$element0=$_POST[$key."_element".$id.'0'];
|
968 |
+
$element1=$_POST[$key."_element".$id.'1'];
|
969 |
+
if(isset($element0) || isset($element1))
|
970 |
+
{
|
971 |
+
$new_value=$new_value.$element0.'-'.$element1;
|
972 |
+
}
|
973 |
+
break;
|
974 |
+
}
|
975 |
+
|
976 |
+
case "type_grading":
|
977 |
+
{
|
978 |
+
$element=$_POST[$key."_hidden_item".$id];
|
979 |
+
$grading = explode(":",$element);
|
980 |
+
$items_count = sizeof($grading)-1;
|
981 |
+
|
982 |
+
$element = "";
|
983 |
+
$total = "";
|
984 |
+
|
985 |
+
for($k=0;$k<$items_count;$k++)
|
986 |
+
|
987 |
+
{
|
988 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
989 |
+
$total += $_POST[$key."_element".$id.$k];
|
990 |
+
}
|
991 |
+
|
992 |
+
$element .="Total:".$total;
|
993 |
+
|
994 |
+
|
995 |
+
if(isset($element))
|
996 |
+
{
|
997 |
+
$new_value=$new_value.$element;
|
998 |
+
}
|
999 |
+
break;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
case "type_matrix":
|
1003 |
+
{
|
1004 |
+
|
1005 |
+
|
1006 |
+
$input_type=$_POST[$key."_input_type".$id];
|
1007 |
+
|
1008 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
1009 |
+
$mat_rows = explode('***', $mat_rows);
|
1010 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
1011 |
+
|
1012 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
1013 |
+
$mat_columns = explode('***', $mat_columns);
|
1014 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
1015 |
+
|
1016 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
1017 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
1018 |
+
|
1019 |
+
|
1020 |
+
$matrix="<table>";
|
1021 |
+
|
1022 |
+
$matrix .='<tr><td></td>';
|
1023 |
+
|
1024 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
1025 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
1026 |
+
$matrix .='</tr>';
|
1027 |
+
|
1028 |
+
$aaa=Array();
|
1029 |
+
$k=0;
|
1030 |
+
foreach( $row_ids as $row_id){
|
1031 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
1032 |
+
|
1033 |
+
if($input_type=="radio"){
|
1034 |
+
|
1035 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
1036 |
+
if($mat_radio==0){
|
1037 |
+
$checked="";
|
1038 |
+
$aaa[1]="";
|
1039 |
+
}
|
1040 |
+
else{
|
1041 |
+
$aaa=explode("_",$mat_radio);
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
foreach( $column_ids as $column_id){
|
1045 |
+
if($aaa[1]==$column_id)
|
1046 |
+
$checked="checked";
|
1047 |
+
else
|
1048 |
+
$checked="";
|
1049 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
1050 |
+
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
}
|
1054 |
+
else{
|
1055 |
+
if($input_type=="checkbox")
|
1056 |
+
{
|
1057 |
+
foreach( $column_ids as $column_id){
|
1058 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1059 |
+
if($checked==1)
|
1060 |
+
$checked = "checked";
|
1061 |
+
else
|
1062 |
+
$checked = "";
|
1063 |
+
|
1064 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
1065 |
+
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
}
|
1069 |
+
else
|
1070 |
+
{
|
1071 |
+
if($input_type=="text")
|
1072 |
+
{
|
1073 |
+
|
1074 |
+
foreach( $column_ids as $column_id){
|
1075 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1076 |
+
|
1077 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
1078 |
+
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
}
|
1082 |
+
else{
|
1083 |
+
foreach( $column_ids as $column_id){
|
1084 |
+
$checked = $_POST[$key."_select_yes_no".$id.$row_id.'_'.$column_id];
|
1085 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
1086 |
+
|
1087 |
+
|
1088 |
+
|
1089 |
+
}
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
}
|
1095 |
+
$matrix .='</tr>';
|
1096 |
+
$k++;
|
1097 |
+
}
|
1098 |
+
$matrix .='</table>';
|
1099 |
+
|
1100 |
+
|
1101 |
+
|
1102 |
+
|
1103 |
+
|
1104 |
+
if(isset($matrix))
|
1105 |
+
{
|
1106 |
+
$new_value=$new_value.$matrix;
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
break;
|
1110 |
+
}
|
1111 |
default: break;
|
1112 |
}
|
1113 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
1117 |
if (strpos($new_script, "%all%") !== FALSE) {
|
1118 |
$new_script = str_replace("%all%", $list, $new_script);
|
1119 |
}
|
1120 |
+
$body = $new_script;
|
1121 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
1122 |
}
|
1123 |
if ($row->mail) {
|
1124 |
if ($c) {
|
1125 |
+
// $headers_form_mail = "From: " . $c . " <" . $c . ">" . "\r\n";
|
1126 |
$headers = "MIME-Version: 1.0\n" . "From: " . $c . " <" . $c . ">" . "\r\n" . "Content-Type: text/html; charset=\"" . get_option('blog_charset') . "\"\n";
|
1127 |
}
|
1128 |
+
// else {
|
1129 |
+
// $headers_form_mail = "";
|
1130 |
+
// }
|
1131 |
if ($row_mail_one_time) {
|
1132 |
$recipient = $row->mail;
|
1133 |
$subject = $row->title;
|
1202 |
if (isset($element_first)) {
|
1203 |
$element_title = $_POST[$key."_element_title".$id];
|
1204 |
if (isset($element_title)) {
|
1205 |
+
$new_value = $_POST[$key."_element_title".$id].' '.$_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id].' '.$_POST[$key."_element_middle".$id];
|
1206 |
}
|
1207 |
else {
|
1208 |
$new_value = $_POST[$key."_element_first".$id].' '.$_POST[$key."_element_last".$id];
|
1212 |
}
|
1213 |
case "type_address": {
|
1214 |
$street1 = $_POST[$key."_street1".$id];
|
1215 |
+
if (isset($_POST[$key."_street1".$id])) {
|
1216 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
1217 |
+
break;
|
1218 |
+
}
|
1219 |
+
if (isset($_POST[$key."_street2".$id])) {
|
1220 |
$new_value=$new_value.$_POST[$key."_street2".$id];
|
1221 |
+
break;
|
1222 |
+
}
|
1223 |
+
if (isset($_POST[$key."_city".$id])) {
|
1224 |
$new_value=$new_value.$_POST[$key."_city".$id];
|
1225 |
+
break;
|
1226 |
+
}
|
1227 |
+
if (isset($_POST[$key."_state".$id])) {
|
1228 |
$new_value=$new_value.$_POST[$key."_state".$id];
|
1229 |
+
break;
|
1230 |
+
}
|
1231 |
+
if (isset($_POST[$key."_postal".$id])) {
|
1232 |
$new_value=$new_value.$_POST[$key."_postal".$id];
|
1233 |
+
break;
|
1234 |
+
}
|
1235 |
+
if (isset($_POST[$key."_country".$id])) {
|
1236 |
$new_value=$new_value.$_POST[$key."_country".$id];
|
1237 |
+
break;
|
1238 |
+
}
|
|
|
1239 |
}
|
1240 |
case "type_date_fields": {
|
1241 |
$day = $_POST[$key."_day".$id];
|
1285 |
}
|
1286 |
break;
|
1287 |
}
|
1288 |
+
case "type_star_rating": {
|
1289 |
+
if (isset($_POST[$key."_star_amount".$id])) {
|
1290 |
+
$selected = (isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
1291 |
+
$new_value = $new_value.$selected.'/'.$_POST[$key."_star_amount".$id];
|
1292 |
+
}
|
1293 |
+
break;
|
1294 |
+
}
|
1295 |
+
case "type_scale_rating": {
|
1296 |
+
if (isset($_POST[$key."_scale_amount".$id])) {
|
1297 |
+
$selected = (isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
1298 |
+
$new_value=$new_value.$selected.'/'.$_POST[$key."_scale_amount".$id];
|
1299 |
+
}
|
1300 |
+
break;
|
1301 |
+
}
|
1302 |
+
case "type_spinner": {
|
1303 |
+
if(isset($_POST[$key."_element".$id])) {
|
1304 |
+
$new_value = $new_value.$_POST[$key."_element".$id];
|
1305 |
+
}
|
1306 |
+
break;
|
1307 |
+
}
|
1308 |
+
case "type_slider": {
|
1309 |
+
if (isset($_POST[$key."_slider_value".$id])) {
|
1310 |
+
$new_value = $new_value.$_POST[$key."_slider_value".$id];
|
1311 |
+
}
|
1312 |
+
break;
|
1313 |
+
}
|
1314 |
+
case "type_range": {
|
1315 |
+
if (isset($_POST[$key."_element".$id.'0']) || isset($_POST[$key."_element".$id.'1'])) {
|
1316 |
+
$new_value=$new_value.$_POST[$key."_element".$id.'0'].'-'.$_POST[$key."_element".$id.'1'];
|
1317 |
+
}
|
1318 |
+
break;
|
1319 |
+
}
|
1320 |
+
|
1321 |
+
case "type_grading":
|
1322 |
+
{
|
1323 |
+
$element=$_POST[$key."_hidden_item".$id];
|
1324 |
+
$grading = explode(":",$element);
|
1325 |
+
$items_count = sizeof($grading)-1;
|
1326 |
+
|
1327 |
+
$element = "";
|
1328 |
+
$total = "";
|
1329 |
+
|
1330 |
+
for($k=0;$k<$items_count;$k++) {
|
1331 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
1332 |
+
$total += $_POST[$key."_element".$id.$k];
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
$element .="Total:".$total;
|
1336 |
+
|
1337 |
+
|
1338 |
+
if(isset($element))
|
1339 |
+
{
|
1340 |
+
$new_value=$new_value.$element;
|
1341 |
+
}
|
1342 |
+
break;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
case "type_matrix":
|
1346 |
+
{
|
1347 |
+
|
1348 |
+
|
1349 |
+
$input_type=$_POST[$key."_input_type".$id];
|
1350 |
+
|
1351 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
1352 |
+
$mat_rows = explode('***', $mat_rows);
|
1353 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
1354 |
+
|
1355 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
1356 |
+
$mat_columns = explode('***', $mat_columns);
|
1357 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
1358 |
+
|
1359 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
1360 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
1361 |
+
$matrix="<table>";
|
1362 |
+
|
1363 |
+
$matrix .='<tr><td></td>';
|
1364 |
+
|
1365 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
1366 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
1367 |
+
$matrix .='</tr>';
|
1368 |
+
|
1369 |
+
$aaa=Array();
|
1370 |
+
$k=0;
|
1371 |
+
foreach( $row_ids as $row_id){
|
1372 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
1373 |
+
|
1374 |
+
if($input_type=="radio"){
|
1375 |
+
|
1376 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
1377 |
+
if($mat_radio==0){
|
1378 |
+
$checked="";
|
1379 |
+
$aaa[1]="";
|
1380 |
+
}
|
1381 |
+
else{
|
1382 |
+
$aaa=explode("_",$mat_radio);
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
foreach( $column_ids as $column_id){
|
1386 |
+
if($aaa[1]==$column_id)
|
1387 |
+
$checked="checked";
|
1388 |
+
else
|
1389 |
+
$checked="";
|
1390 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
1391 |
+
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
}
|
1395 |
+
else{
|
1396 |
+
if($input_type=="checkbox")
|
1397 |
+
{
|
1398 |
+
foreach( $column_ids as $column_id){
|
1399 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1400 |
+
if($checked==1)
|
1401 |
+
$checked = "checked";
|
1402 |
+
else
|
1403 |
+
$checked = "";
|
1404 |
+
|
1405 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
1406 |
+
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
}
|
1410 |
+
else
|
1411 |
+
{
|
1412 |
+
if($input_type=="text")
|
1413 |
+
{
|
1414 |
+
|
1415 |
+
foreach( $column_ids as $column_id){
|
1416 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1417 |
+
|
1418 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
1419 |
+
|
1420 |
+
}
|
1421 |
+
|
1422 |
+
}
|
1423 |
+
else{
|
1424 |
+
foreach( $column_ids as $column_id){
|
1425 |
+
$checked = $_POST[$key."_select_yes_no".$id.$row_id.'_'.$column_id];
|
1426 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
1427 |
+
|
1428 |
+
|
1429 |
+
|
1430 |
+
}
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
}
|
1434 |
+
|
1435 |
+
}
|
1436 |
+
$matrix .='</tr>';
|
1437 |
+
$k++;
|
1438 |
+
}
|
1439 |
+
$matrix .='</table>';
|
1440 |
+
|
1441 |
+
|
1442 |
+
|
1443 |
+
|
1444 |
+
|
1445 |
+
if(isset($matrix))
|
1446 |
+
{
|
1447 |
+
$new_value=$new_value.$matrix;
|
1448 |
+
}
|
1449 |
+
|
1450 |
+
break;
|
1451 |
+
}
|
1452 |
default: break;
|
1453 |
}
|
1454 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
1460 |
}
|
1461 |
$body = $new_script;
|
1462 |
$mode = 1;
|
1463 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
1464 |
$row_mail_one_time = 0;
|
1465 |
}
|
1466 |
}
|
1549 |
break;
|
1550 |
}
|
1551 |
case "type_address": {
|
1552 |
+
if (isset($_POST[$key."_street1".$id])) {
|
|
|
1553 |
$new_value = $new_value.$_POST[$key."_street1".$id];
|
1554 |
+
break;
|
1555 |
+
}
|
1556 |
+
if (isset($_POST[$key."_street2".$id])) {
|
1557 |
$new_value = $new_value.$_POST[$key."_street2".$id];
|
1558 |
+
break;
|
1559 |
+
}
|
1560 |
+
if (isset($_POST[$key."_city".$id])) {
|
1561 |
$new_value = $new_value.$_POST[$key."_city".$id];
|
1562 |
+
break;
|
1563 |
+
}
|
1564 |
+
if (isset($_POST[$key."_state".$id])) {
|
1565 |
$new_value = $new_value.$_POST[$key."_state".$id];
|
1566 |
+
break;
|
1567 |
+
}
|
1568 |
+
if (isset($_POST[$key."_postal".$id])) {
|
1569 |
$new_value = $new_value.$_POST[$key."_postal".$id];
|
1570 |
+
break;
|
1571 |
+
}
|
1572 |
+
if (isset($_POST[$key."_country".$id])) {
|
1573 |
$new_value = $new_value.$_POST[$key."_country".$id];
|
1574 |
+
break;
|
1575 |
}
|
|
|
1576 |
}
|
1577 |
case "type_date_fields": {
|
1578 |
$day = $_POST[$key."_day".$id];
|
1622 |
}
|
1623 |
break;
|
1624 |
}
|
1625 |
+
case "type_star_rating":
|
1626 |
+
{
|
1627 |
+
$element=$_POST[$key."_star_amount".$id];
|
1628 |
+
$selected=(isset($_POST[$key."_selected_star_amount".$id]) ? $_POST[$key."_selected_star_amount".$id] : 0);
|
1629 |
+
if(isset($element))
|
1630 |
+
{
|
1631 |
+
$new_value=$new_value.$selected.'/'.$element;
|
1632 |
+
}
|
1633 |
+
break;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
|
1637 |
+
case "type_scale_rating":
|
1638 |
+
{
|
1639 |
+
$element=$_POST[$key."_scale_amount".$id];
|
1640 |
+
$selected=(isset($_POST[$key."_scale_radio".$id]) ? $_POST[$key."_scale_radio".$id] : 0);
|
1641 |
+
|
1642 |
+
|
1643 |
+
if(isset($element))
|
1644 |
+
{
|
1645 |
+
$new_value=$new_value.$selected.'/'.$element;
|
1646 |
+
}
|
1647 |
+
break;
|
1648 |
+
}
|
1649 |
+
|
1650 |
+
case "type_spinner":
|
1651 |
+
{
|
1652 |
+
|
1653 |
+
if(isset($_POST[$key."_element".$id]))
|
1654 |
+
{
|
1655 |
+
$new_value=$new_value.$_POST[$key."_element".$id];
|
1656 |
+
}
|
1657 |
+
break;
|
1658 |
+
}
|
1659 |
+
|
1660 |
+
case "type_slider":
|
1661 |
+
{
|
1662 |
+
|
1663 |
+
$element=$_POST[$key."_slider_value".$id];
|
1664 |
+
if(isset($element))
|
1665 |
+
{
|
1666 |
+
$new_value=$new_value.$element;
|
1667 |
+
}
|
1668 |
+
break;
|
1669 |
+
}
|
1670 |
+
case "type_range":
|
1671 |
+
{
|
1672 |
+
|
1673 |
+
$element0=$_POST[$key."_element".$id.'0'];
|
1674 |
+
$element1=$_POST[$key."_element".$id.'1'];
|
1675 |
+
if(isset($element0) || isset($element1))
|
1676 |
+
{
|
1677 |
+
$new_value=$new_value.$element0.'-'.$element1;
|
1678 |
+
}
|
1679 |
+
break;
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
case "type_grading":
|
1683 |
+
{
|
1684 |
+
$element=$_POST[$key."_hidden_item".$id];
|
1685 |
+
$grading = explode(":",$element);
|
1686 |
+
$items_count = sizeof($grading)-1;
|
1687 |
+
|
1688 |
+
$element = "";
|
1689 |
+
$total = "";
|
1690 |
+
|
1691 |
+
for($k=0;$k<$items_count;$k++)
|
1692 |
+
|
1693 |
+
{
|
1694 |
+
$element .= $grading[$k].":".$_POST[$key."_element".$id.$k]." ";
|
1695 |
+
$total += $_POST[$key."_element".$id.$k];
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
$element .="Total:".$total;
|
1699 |
+
|
1700 |
+
|
1701 |
+
if(isset($element))
|
1702 |
+
{
|
1703 |
+
$new_value=$new_value.$element;
|
1704 |
+
}
|
1705 |
+
break;
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
case "type_matrix":
|
1709 |
+
{
|
1710 |
+
|
1711 |
+
|
1712 |
+
$input_type=$_POST[$key."_input_type".$id];
|
1713 |
+
|
1714 |
+
$mat_rows = $_POST[$key."_hidden_row".$id];
|
1715 |
+
$mat_rows = explode('***', $mat_rows);
|
1716 |
+
$mat_rows = array_slice($mat_rows,0, count($mat_rows)-1);
|
1717 |
+
|
1718 |
+
$mat_columns = $_POST[$key."_hidden_column".$id];
|
1719 |
+
$mat_columns = explode('***', $mat_columns);
|
1720 |
+
$mat_columns = array_slice($mat_columns,0, count($mat_columns)-1);
|
1721 |
+
|
1722 |
+
$row_ids=explode(",",substr($_POST[$key."_row_ids".$id], 0, -1));
|
1723 |
+
$column_ids=explode(",",substr($_POST[$key."_column_ids".$id], 0, -1));
|
1724 |
+
|
1725 |
+
|
1726 |
+
$matrix="<table>";
|
1727 |
+
|
1728 |
+
$matrix .='<tr><td></td>';
|
1729 |
+
|
1730 |
+
for( $k=0;$k< count($mat_columns) ;$k++)
|
1731 |
+
$matrix .='<td style="background-color:#BBBBBB; padding:5px; ">'.$mat_columns[$k].'</td>';
|
1732 |
+
$matrix .='</tr>';
|
1733 |
+
|
1734 |
+
$aaa=Array();
|
1735 |
+
$k=0;
|
1736 |
+
foreach($row_ids as $row_id)
|
1737 |
+
{
|
1738 |
+
$matrix .='<tr><td style="background-color:#BBBBBB; padding:5px;">'.$mat_rows[$k].'</td>';
|
1739 |
+
|
1740 |
+
if($input_type=="radio"){
|
1741 |
+
|
1742 |
+
$mat_radio = (isset($_POST[$key."_input_element".$id.$row_id]) ? $_POST[$key."_input_element".$id.$row_id] : 0);
|
1743 |
+
if($mat_radio==0){
|
1744 |
+
$checked="";
|
1745 |
+
$aaa[1]="";
|
1746 |
+
}
|
1747 |
+
else{
|
1748 |
+
$aaa=explode("_",$mat_radio);
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
foreach($column_ids as $column_id){
|
1752 |
+
if($aaa[1]==$column_id)
|
1753 |
+
$checked="checked";
|
1754 |
+
else
|
1755 |
+
$checked="";
|
1756 |
+
$matrix .='<td style="text-align:center"><input type="radio" '.$checked.' disabled /></td>';
|
1757 |
+
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
}
|
1761 |
+
else{
|
1762 |
+
if($input_type=="checkbox")
|
1763 |
+
{
|
1764 |
+
foreach($column_ids as $column_id){
|
1765 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1766 |
+
if($checked==1)
|
1767 |
+
$checked = "checked";
|
1768 |
+
else
|
1769 |
+
$checked = "";
|
1770 |
+
|
1771 |
+
$matrix .='<td style="text-align:center"><input type="checkbox" '.$checked.' disabled /></td>';
|
1772 |
+
|
1773 |
+
}
|
1774 |
+
|
1775 |
+
}
|
1776 |
+
else
|
1777 |
+
{
|
1778 |
+
if($input_type=="text")
|
1779 |
+
{
|
1780 |
+
|
1781 |
+
foreach($column_ids as $column_id){
|
1782 |
+
$checked = $_POST[$key."_input_element".$id.$row_id.'_'.$column_id];
|
1783 |
+
|
1784 |
+
$matrix .='<td style="text-align:center"><input type="text" value="'.$checked.'" disabled /></td>';
|
1785 |
+
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
}
|
1789 |
+
else{
|
1790 |
+
foreach($column_ids as $column_id){
|
1791 |
+
$checked = $_POST[$i."_select_yes_no".$id.$row_id.'_'.$column_id];
|
1792 |
+
$matrix .='<td style="text-align:center">'.$checked.'</td>';
|
1793 |
+
|
1794 |
+
|
1795 |
+
|
1796 |
+
}
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
}
|
1802 |
+
$matrix .='</tr>';
|
1803 |
+
$k++;
|
1804 |
+
}
|
1805 |
+
$matrix .='</table>';
|
1806 |
+
|
1807 |
+
|
1808 |
+
|
1809 |
+
|
1810 |
+
|
1811 |
+
if(isset($matrix))
|
1812 |
+
{
|
1813 |
+
$new_value=$new_value.$matrix;
|
1814 |
+
}
|
1815 |
+
|
1816 |
+
break;
|
1817 |
+
}
|
1818 |
default: break;
|
1819 |
}
|
1820 |
$new_script = str_replace("%".$label_each."%", $new_value, $new_script);
|
1825 |
$new_script = str_replace("%all%", $list, $new_script);
|
1826 |
}
|
1827 |
$body = $new_script;
|
1828 |
+
$send = wp_mail(str_replace(' ', '', $recipient), $subject, stripslashes($body), $headers, $attachment);
|
1829 |
}
|
1830 |
}
|
1831 |
if ($row->mail) {
|
1874 |
case "4":
|
1875 |
{
|
1876 |
@session_start();
|
1877 |
+
if ($row->submit_text_type != 4) {
|
1878 |
$_SESSION['massage_after_submit'] = $msg;
|
1879 |
+
}
|
1880 |
$_SESSION['form_submit_type'] = $row->submit_text_type . "," . $row->id;
|
1881 |
$redirect_url = $row->url;
|
1882 |
break;
|
1908 |
$wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
|
1909 |
}
|
1910 |
|
1911 |
+
// Form maker frontend.
|
1912 |
function form_maker_front_end($id) {
|
|
|
1913 |
$form_maker_front_end = "";
|
1914 |
$result = showform($id);
|
1915 |
if (!$result) {
|
1925 |
$label_id = $result[2];
|
1926 |
$label_type = $result[3];
|
1927 |
$form_theme = $result[4];
|
1928 |
+
if (isset($_SESSION['show_submit_text' . $id])) {
|
1929 |
if ($_SESSION['show_submit_text' . $id] == 1) {
|
1930 |
$_SESSION['show_submit_text' . $id] = 0;
|
1931 |
$form_maker_front_end .= $row->submit_text;
|
1932 |
return;
|
1933 |
}
|
1934 |
+
}
|
1935 |
$vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
|
1936 |
$vives_form = $vives_form + 1;
|
1937 |
$wpdb->update($wpdb->prefix . "formmaker_views", array(
|
1949 |
$body_or_classes[$i] = explode('}', $new_form_theme[$i]);
|
1950 |
}
|
1951 |
for ($i = 0; $i < $count_after_explod_theme; $i++) {
|
1952 |
+
if ($i == 0)
|
1953 |
$body_or_classes[$i][0] = "#form" . $id . ' ' . str_replace(',', ", #form" . $id, $body_or_classes[$i][0]);
|
1954 |
+
else
|
|
|
1955 |
$body_or_classes[$i][1] = "#form" . $id . ' ' . str_replace(',', ", #form" . $id, $body_or_classes[$i][1]);
|
|
|
1956 |
}
|
1957 |
for ($i = 0; $i < $count_after_explod_theme; $i++) {
|
1958 |
$body_or_classes_implode[$i] = implode('}', $body_or_classes[$i]);
|
1990 |
"<!--repstart-->Country<!--repend-->",
|
1991 |
"<!--repstart-->Area Code<!--repend-->",
|
1992 |
"<!--repstart-->Phone Number<!--repend-->",
|
1993 |
+
"<!--repstart-->From<!--repend-->",
|
1994 |
+
"<!--repstart-->To<!--repend-->",
|
1995 |
+
"<!--repstart-->$300<!--repend-->",
|
1996 |
+
"<!--repstart-->product 1 $100<!--repend-->",
|
1997 |
+
"<!--repstart-->product 2 $200<!--repend-->",
|
1998 |
$captcha_url,
|
1999 |
'class="captcha_img"',
|
2000 |
plugins_url("images/refresh.png", __FILE__),
|
2026 |
addslashes(__("Country", 'form_maker')),
|
2027 |
addslashes(__("Area Code", 'form_maker')),
|
2028 |
addslashes(__("Phone Number", 'form_maker')),
|
2029 |
+
addslashes(__("From", 'form_maker')),
|
2030 |
+
addslashes(__("To", 'form_maker')),
|
2031 |
+
'',
|
2032 |
+
'',
|
2033 |
+
'',
|
2034 |
$captcha_rep_url,
|
2035 |
'class="captcha_img" style="display:none"',
|
2036 |
plugins_url("images/refresh.png", __FILE__),
|
2046 |
$form_maker_front_end .= $untilupload;
|
2047 |
$is_recaptcha = FALSE;
|
2048 |
$form_maker_front_end .= '<script type="text/javascript">';
|
2049 |
+
$form_maker_front_end .= 'WDF_FILE_TYPE_ERROR = \'' . addslashes(__("Sorry, you are not allowed to upload this type of file.", 'form_maker')) . '\';';
|
2050 |
+
$form_maker_front_end .= 'WDF_GRADING_TEXT = \'' . addslashes(__("Your score should be less than", 'form_maker')) . '\';';
|
2051 |
+
$form_maker_front_end .= 'WDF_INVALID_GRADING = \'' . addslashes(sprintf(__("Your score should be less than", 'form_maker'), '`grading_label`', '`grading_total`')) . '\';';
|
2052 |
+
$form_maker_front_end .= 'WDF_INVALID_EMAIL = \'' . addslashes(__("This is not a valid email address.", 'form_maker')) . '\';';
|
2053 |
+
$form_maker_front_end .= 'REQUEST_URI = "' . $_SERVER['REQUEST_URI'] . '";';
|
2054 |
+
$form_maker_front_end .= 'ReqFieldMsg =\'`FIELDNAME` ' . addslashes(__('field is required.', 'form_maker')) . '\';';
|
2055 |
+
$form_maker_front_end .= 'FormCurrency = "";';
|
2056 |
+
$form_maker_front_end .= 'FormPaypalTax = "";';
|
2057 |
$form_maker_front_end .= 'function formOnload' . $id . '()
|
2058 |
{
|
2059 |
';
|
2115 |
case 'type_radio':
|
2116 |
case 'type_checkbox':
|
2117 |
$form_maker_front_end .= 'if(document.getElementById(\'' . $label_id[$key] . '_randomize' . $id . '\'))
|
2118 |
+
if (document.getElementById(\'' . $label_id[$key] . '_randomize' . $id . '\').value == "yes") {
|
2119 |
+
choises_randomize(\'' . $label_id[$key] . '\', \'' . $id . '\');}';
|
|
|
|
|
2120 |
break;
|
2121 |
+
case 'type_spinner':
|
2122 |
+
$form_maker_front_end .= '
|
2123 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\')) {
|
2124 |
+
var spinner_value = document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\').getAttribute(\'aria-valuenow\');
|
2125 |
+
}
|
2126 |
+
if (document.getElementById(\'' . $label_id[$key] . '_min_value' . $id . '\'))
|
2127 |
+
var spinner_min_value = document.getElementById(\'' . $label_id[$key] . '_min_value' . $id . '\').value;
|
2128 |
+
if (document.getElementById(\'' . $label_id[$key] . '_max_value' . $id . '\'))
|
2129 |
+
var spinner_max_value = document.getElementById(\'' . $label_id[$key] . '_max_value' . $id . '\').value;
|
2130 |
+
if (document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\'))
|
2131 |
+
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_step' . $id . '\').value;
|
2132 |
+
jQuery( \'' . $label_id[$key] . '_element' . $id . '\' ).removeClass( \'ui-spinner-input\')
|
2133 |
+
.prop( \'disabled\', false )
|
2134 |
+
.removeAttr( \'autocomplete\' )
|
2135 |
+
.removeAttr( \'role\' )
|
2136 |
+
.removeAttr( \'aria-valuemin\' )
|
2137 |
+
.removeAttr( \'aria-valuemax\' )
|
2138 |
+
.removeAttr( \'aria-valuenow\' );
|
2139 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\')) {
|
2140 |
+
span_ui= document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\').parentNode;
|
2141 |
+
span_ui.parentNode.appendChild(document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\'));
|
2142 |
+
span_ui.parentNode.removeChild(span_ui);
|
2143 |
+
jQuery(\'#' . $label_id[$key] . '_element' . $id . '\')[0].spin = null;
|
2144 |
+
}
|
2145 |
+
spinner = jQuery( \'#' . $label_id[$key] . '_element' . $id . '\' ).spinner();
|
2146 |
+
spinner.spinner( \'value\', spinner_value );
|
2147 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '\' ).spinner({ min: spinner_min_value});
|
2148 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '\' ).spinner({ max: spinner_max_value});
|
2149 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '\' ).spinner({ step: spinner_step});';
|
2150 |
break;
|
2151 |
+
case 'type_slider':
|
2152 |
+
$form_maker_front_end .= '
|
2153 |
+
if (document.getElementById(\'' . $label_id[$key] . '_slider_value' . $id . '\'))
|
2154 |
+
var slider_value = document.getElementById(\'' . $label_id[$key] . '_slider_value' . $id . '\').value;
|
2155 |
+
if (document.getElementById(\'' . $label_id[$key] . '_slider_min_value' . $id . '\'))
|
2156 |
+
var slider_min_value = document.getElementById(\'' . $label_id[$key] . '_slider_min_value' . $id . '\').value;
|
2157 |
+
if (document.getElementById(\'' . $label_id[$key] . '_slider_max_value' . $id . '\'))
|
2158 |
+
var slider_max_value = document.getElementById(\'' . $label_id[$key] . '_slider_max_value' . $id . '\').value;
|
2159 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element_value' . $id . '\'))
|
2160 |
+
var slider_element_value = document.getElementById(\'' . $label_id[$key] . '_element_value' . $id . '\' );
|
2161 |
+
if (document.getElementById(\'' . $label_id[$key] . '_slider_value' . $id . '\'))
|
2162 |
+
var slider_value_save = document.getElementById( \'' . $label_id[$key] . '_slider_value' . $id . '\' );
|
2163 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\')) {
|
2164 |
+
document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\').innerHTML = \'\';
|
2165 |
+
document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\').removeAttribute( \'class\' );
|
2166 |
+
document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\').removeAttribute( \'aria-disabled\' );
|
2167 |
}
|
2168 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '\'))
|
2169 |
+
jQuery(\'#' . $label_id[$key] . '_element' . $id . '\')[0].slide = null;
|
2170 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '\').slider({
|
2171 |
+
range: \'min\',
|
2172 |
+
value: eval(slider_value),
|
2173 |
+
min: eval(slider_min_value),
|
2174 |
+
max: eval(slider_max_value),
|
2175 |
+
slide: function( event, ui ) {
|
2176 |
+
slider_element_value.innerHTML = \'\' + ui.value;
|
2177 |
+
slider_value_save.value = \'\' + ui.value;
|
2178 |
+
}
|
2179 |
+
});';
|
2180 |
+
break;
|
2181 |
+
case 'type_range':
|
2182 |
+
$form_maker_front_end .= '
|
2183 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '0\'))
|
2184 |
+
var spinner_value0 = document.getElementById(\'' . $label_id[$key] . '_element' . $id . '0\').getAttribute( \'aria-valuenow\' );
|
2185 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '1\'))
|
2186 |
+
var spinner_value1 = document.getElementById(\'' . $label_id[$key] . '_element' . $id . '1\').getAttribute( \'aria-valuenow\' );
|
2187 |
+
if (document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\'))
|
2188 |
+
var spinner_step = document.getElementById(\'' . $label_id[$key] . '_range_step' . $id . '\').value;
|
2189 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).removeClass( \'ui-spinner-input\' )
|
2190 |
+
.prop( \'disabled\', false )
|
2191 |
+
.removeAttr( \'autocomplete\' )
|
2192 |
+
.removeAttr( \'role\' )
|
2193 |
+
.removeAttr( \'aria-valuenow\' );
|
2194 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '0\')) {
|
2195 |
+
span_ui= document.getElementById(\'' . $label_id[$key] . '_element' . $id . '0\').parentNode;
|
2196 |
+
span_ui.parentNode.appendChild(document.getElementById(\'' . $label_id[$key] . '_element' . $id . '0\'));
|
2197 |
+
span_ui.parentNode.removeChild(span_ui);
|
2198 |
+
jQuery(\'#' . $label_id[$key] . '_element' . $id . '0\')[0].spin = null;
|
2199 |
}
|
2200 |
+
spinner0 = jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).spinner();
|
2201 |
+
spinner0.spinner( \'value\', spinner_value0 );
|
2202 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '0\' ).spinner({ step: spinner_step});
|
2203 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '1\' ).removeClass( \'ui-spinner-input\' )
|
2204 |
+
.prop( \'disabled\', false )
|
2205 |
+
.removeAttr( \'autocomplete\' )
|
2206 |
+
.removeAttr( \'role\' )
|
2207 |
+
.removeAttr( \'aria-valuenow\' );
|
2208 |
+
if (document.getElementById(\'' . $label_id[$key] . '_element' . $id . '1\')) {
|
2209 |
+
span_ui1= document.getElementById(\'' . $label_id[$key] . '_element' . $id . '1\').parentNode;
|
2210 |
+
span_ui1.parentNode.appendChild(document.getElementById(\'' . $label_id[$key] . '_element' . $id . '1\'));
|
2211 |
+
span_ui1.parentNode.removeChild(span_ui1);
|
2212 |
+
jQuery(\'#' . $label_id[$key] . '_element' . $id . '1\')[0].spin = null;
|
2213 |
}
|
2214 |
+
spinner1 = jQuery( \'#' . $label_id[$key] . '_element' . $id . '1\' ).spinner();
|
2215 |
+
spinner1.spinner( \'value\', spinner_value1 );
|
2216 |
+
jQuery( \'#' . $label_id[$key] . '_element' . $id . '1\').spinner({ step: spinner_step});';
|
2217 |
+
break;
|
2218 |
+
case 'type_paypal_total':
|
2219 |
+
$form_maker_front_end .= '
|
2220 |
+
set_total_value(' . $label_id[$key] . ', ' . $id . ');';
|
2221 |
+
break;
|
2222 |
+
default:
|
2223 |
+
break;
|
2224 |
+
}
|
2225 |
}
|
2226 |
+
$form_maker_front_end .= '
|
2227 |
+
if (window.before_load) {
|
2228 |
+
before_load();
|
2229 |
+
}
|
2230 |
+
}';
|
2231 |
+
$form_maker_front_end .= '
|
2232 |
+
function formAddToOnload' . $id . '() {
|
2233 |
+
if (formOldFunctionOnLoad' . $id . ') {
|
2234 |
+
formOldFunctionOnLoad' . $id . '();
|
2235 |
+
}
|
2236 |
+
formOnload' . $id . '();
|
2237 |
+
}
|
2238 |
+
function formLoadBody' . $id . '() {
|
2239 |
+
formOldFunctionOnLoad' . $id . ' = window.onload;
|
2240 |
+
window.onload = formAddToOnload' . $id . ';
|
2241 |
+
}
|
2242 |
+
var formOldFunctionOnLoad' . $id . ' = null;
|
2243 |
+
formLoadBody' . $id . '();';
|
2244 |
+
$counter = $_POST["counter" . $id];
|
2245 |
$old_key = -1;
|
2246 |
if (isset($counter)) {
|
2247 |
foreach ($label_type as $key => $type) {
|
2335 |
}";
|
2336 |
break;
|
2337 |
}
|
2338 |
+
case "type_star_rating": {
|
2339 |
+
$form_maker_front_end .=
|
2340 |
+
"if(document.getElementById('".$label_id[$key]."_element".$id."')) {
|
2341 |
+
document.getElementById('".$label_id[$key]."_selected_star_amount".$id."').value='".addslashes($_POST[$label_id[$key]."_selected_star_amount".$id])."';
|
2342 |
+
if (document.getElementById('".$label_id[$key]."_selected_star_amount".$id."').value)
|
2343 |
+
select_star_rating((document.getElementById('".$label_id[$key]."_selected_star_amount".$id."').value-1),".$label_id[$key].",".$id.");
|
2344 |
+
}";
|
2345 |
+
break;
|
2346 |
+
|
2347 |
+
}
|
2348 |
+
|
2349 |
+
case "type_scale_rating": {
|
2350 |
+
$form_maker_front_end .=
|
2351 |
+
"for (k=0; k<100; k++) {
|
2352 |
+
if (document.getElementById('".$label_id[$key]."_scale_radio".$id."_'+k)) {
|
2353 |
+
document.getElementById('".$label_id[$key]."_scale_radio".$id."_'+k).removeAttribute('checked');
|
2354 |
+
if (document.getElementById('".$label_id[$key]."_scale_radio".$id."_'+k).value=='".$_POST[$label_id[$key]."_scale_radio".$id]."')
|
2355 |
+
document.getElementById('".$label_id[$key]."_scale_radio".$id."_'+k).setAttribute('checked', 'checked');
|
2356 |
+
}
|
2357 |
+
}";
|
2358 |
+
break;
|
2359 |
+
|
2360 |
+
}
|
2361 |
+
case "type_spinner": {
|
2362 |
+
$form_maker_front_end .=
|
2363 |
+
"if (document.getElementById('".$label_id[$key]."_element".$id."')) {
|
2364 |
+
document.getElementById('".$label_id[$key]."_element".$id."').setAttribute('aria-valuenow','".$_POST[$label_id[$key]."_element".$id]."');
|
2365 |
+
}";
|
2366 |
+
break;
|
2367 |
+
|
2368 |
+
}
|
2369 |
+
case "type_slider": {
|
2370 |
+
$form_maker_front_end .=
|
2371 |
+
"if (document.getElementById('".$label_id[$key]."_element".$id."'))
|
2372 |
+
document.getElementById('".$label_id[$key]."_element".$id."').setAttribute('aria-valuenow','".$_POST[$label_id[$key]."_slider_value".$id]."');
|
2373 |
+
if (document.getElementById('".$label_id[$key]."_slider_value".$id."'))
|
2374 |
+
document.getElementById('".$label_id[$key]."_slider_value".$id."').value='".$_POST[$label_id[$key]."_slider_value".$id]."';
|
2375 |
+
if (document.getElementById('".$label_id[$key]."_element_value".$id."'))
|
2376 |
+
document.getElementById('".$label_id[$key]."_element_value".$id."').innerHTML='".$_POST[$label_id[$key]."_slider_value".$id]."';";
|
2377 |
+
break;
|
2378 |
+
|
2379 |
+
}
|
2380 |
+
case "type_range": {
|
2381 |
+
$form_maker_front_end .=
|
2382 |
+
"if (document.getElementById('".$label_id[$key]."_element".$id."0'))
|
2383 |
+
document.getElementById('".$label_id[$key]."_element".$id."0').setAttribute('aria-valuenow','".$_POST[$label_id[$key]."_element".$id."0"]."');
|
2384 |
+
if (document.getElementById('".$label_id[$key]."_element".$id."1'))
|
2385 |
+
document.getElementById('".$label_id[$key]."_element".$id."1').setAttribute('aria-valuenow','".$_POST[$label_id[$key]."_element".$id."1"]."');";
|
2386 |
+
break;
|
2387 |
+
|
2388 |
+
}
|
2389 |
+
case "type_grading": {
|
2390 |
+
for ($k = 0; $k < 100; $k++) {
|
2391 |
+
$form_maker_front_end .= "if (document.getElementById('".$label_id[$key]."_element".$id.$k."')) {
|
2392 |
+
document.getElementById('".$label_id[$key]."_element".$id.$k."').value='".$_POST[$label_id[$key]."_element".$id.$k]."';}";
|
2393 |
+
}
|
2394 |
+
$form_maker_front_end .= "sum_grading_values(".$label_id[$key].",".$id.");";
|
2395 |
+
break;
|
2396 |
+
|
2397 |
+
}
|
2398 |
+
case "type_matrix": {
|
2399 |
+
$form_maker_front_end .=
|
2400 |
+
"if (document.getElementById('".$label_id[$key]."_input_type".$id."').value == 'radio') {";
|
2401 |
+
for ($k = 1; $k < 40; $k++) {
|
2402 |
+
for ($l = 1; $l < 40; $l++) {
|
2403 |
+
$form_maker_front_end .=
|
2404 |
+
"if (document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."')) {
|
2405 |
+
document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').removeAttribute('checked');
|
2406 |
+
if (document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').value=='".$_POST[$label_id[$key]."_input_element".$id.$k]."')
|
2407 |
+
document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').setAttribute('checked', 'checked');
|
2408 |
+
}";
|
2409 |
+
}
|
2410 |
+
}
|
2411 |
+
$form_maker_front_end .=
|
2412 |
+
"}
|
2413 |
+
else
|
2414 |
+
if (document.getElementById('".$label_id[$key]."_input_type".$id."').value == 'checkbox') {";
|
2415 |
+
for ($k = 1; $k < 40; $k++) {
|
2416 |
+
for ($l = 1; $l < 40; $l++) {
|
2417 |
+
$form_maker_front_end .=
|
2418 |
+
"if (document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."')) {
|
2419 |
+
document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').removeAttribute('checked');
|
2420 |
+
if (document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').value=='".$_POST[$label_id[$key]."_input_element".$id.$k."_".$l]."')
|
2421 |
+
document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').setAttribute('checked', 'checked');
|
2422 |
+
}";
|
2423 |
+
}
|
2424 |
+
}
|
2425 |
+
$form_maker_front_end .=
|
2426 |
+
"}
|
2427 |
+
else
|
2428 |
+
if (document.getElementById('".$label_id[$key]."_input_type".$id."').value == 'text') {";
|
2429 |
+
for ($k = 1; $k < 40; $k++) {
|
2430 |
+
for ($l = 1; $l < 40; $l++) {
|
2431 |
+
$form_maker_front_end .=
|
2432 |
+
"if (document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."'))
|
2433 |
+
document.getElementById('".$label_id[$key]."_input_element".$id.$k."_".$l."').value='".$_POST[$label_id[$key]."_input_element".$id.$k."_".$l]."';";
|
2434 |
+
}
|
2435 |
+
}
|
2436 |
+
$form_maker_front_end .= "
|
2437 |
+
}
|
2438 |
+
else
|
2439 |
+
if (document.getElementById('".$label_id[$key]."_input_type".$id."').value == 'select') {";
|
2440 |
+
for ($k = 1; $k < 40; $k++) {
|
2441 |
+
for ($l = 1; $l < 40; $l++) {
|
2442 |
+
$form_maker_front_end .=
|
2443 |
+
"if (document.getElementById('".$label_id[$key]."_select_yes_no".$id.$k."_".$l."'))
|
2444 |
+
document.getElementById('".$label_id[$key]."_select_yes_no".$id.$k."_".$l."').value='".$_POST[$label_id[$key]."_select_yes_no".$id.$k."_".$l]."';";
|
2445 |
+
}
|
2446 |
+
}
|
2447 |
+
$form_maker_front_end .=
|
2448 |
+
"}";
|
2449 |
+
break;
|
2450 |
+
|
2451 |
+
}
|
2452 |
case "type_address":
|
2453 |
{
|
2454 |
if ($key > $old_key) {
|
2561 |
}
|
2562 |
case "type_date_fields":
|
2563 |
{
|
2564 |
+
// $date_fields = explode('-', $_POST[$label_id[$key] . "_element" . $id]);
|
2565 |
$form_maker_front_end .= "if(document.getElementById('" . $label_id[$key] . "_day" . $id . "'))
|
2566 |
{
|
2567 |
+
document.getElementById('" . $label_id[$key] . "_day" . $id . "').value='" . $_POST[$label_id[$key] . "_day" . $id] . "';
|
2568 |
+
document.getElementById('" . $label_id[$key] . "_month" . $id . "').value='" . $_POST[$label_id[$key] . "_month" . $id] . "';
|
2569 |
+
document.getElementById('" . $label_id[$key] . "_year" . $id . "').value='" . $_POST[$label_id[$key] . "_year" . $id] . "';
|
2570 |
}";
|
2571 |
break;
|
2572 |
}
|
2624 |
$form_maker_front_end .= recaptcha_get_html($publickey, $error);
|
2625 |
$form_maker_front_end .= '</div>
|
2626 |
<script>
|
2627 |
+
recaptcha_html = document.getElementById(\'main_recaptcha\').innerHTML.replace(\'Recaptcha.widget = Recaptcha.$("recaptcha_widget_div"); Recaptcha.challenge_callback();\',"");
|
2628 |
document.getElementById(\'main_recaptcha\').innerHTML="";
|
2629 |
+
if (document.getElementById(\'wd_recaptcha' . $id . '\')) {
|
2630 |
+
document.getElementById(\'wd_recaptcha' . $id . '\').innerHTML=recaptcha_html;
|
2631 |
+
Recaptcha.widget = Recaptcha.$("recaptcha_widget_div");
|
2632 |
+
Recaptcha.challenge_callback();
|
2633 |
+
}
|
2634 |
</script>';
|
2635 |
}
|
2636 |
}
|
2637 |
else {
|
2638 |
+
$form_maker_front_end .= '<div><script type="text/javascript">' . str_replace("
|
2639 |
", " ", $row->javascript) . '</script>';
|
2640 |
$form_maker_front_end .= '<style>' . str_replace('[SITE_ROOT]', plugins_url("", __FILE__), str_replace('.wdform_table1', '.form_view', str_replace("
|
2641 |
", " ", $form_theme))) . '</style>';
|
2716 |
}
|
2717 |
function formAddToOnload()
|
2718 |
{
|
2719 |
+
if(formOldFunctionOnLoad){
|
2720 |
+
formOldFunctionOnLoad();
|
2721 |
+
}
|
2722 |
formOnload();
|
2723 |
}
|
2724 |
function formLoadBody()
|
2729 |
var formOldFunctionOnLoad = null;
|
2730 |
formLoadBody();
|
2731 |
";
|
|
|
|
|
|
|
2732 |
if (isset($_POST["counter"])) {
|
2733 |
+
$counter = esc_html($_POST["counter"]);
|
2734 |
}
|
2735 |
if (isset($counter))
|
2736 |
if (isset($_POST["captcha_input"]) or is_numeric($ok)) {
|
3253 |
}
|
3254 |
return $form_maker_front_end;
|
3255 |
}
|
|
|
|
images/delete_el.png
CHANGED
Binary file
|
images/delete_el_hover.png
ADDED
Binary file
|
images/down.png
CHANGED
Binary file
|
images/down_hover.png
ADDED
Binary file
|
images/dublicate.png
CHANGED
Binary file
|
images/dublicate_hover.png
ADDED
Binary file
|
images/edit.png
CHANGED
Binary file
|
images/edit_hover.png
ADDED
Binary file
|
images/left-hover.png
ADDED
Binary file
|
images/left.png
CHANGED
Binary file
|
images/left_hover.png
ADDED
Binary file
|
images/minus.png
CHANGED
Binary file
|
images/minus_hover.png
ADDED
Binary file
|
images/page_delete.png
CHANGED
Binary file
|
images/page_delete_all.png
CHANGED
Binary file
|
images/page_delete_all_hover.png
ADDED
Binary file
|
images/page_delete_hover.png
ADDED
Binary file
|
images/page_down.png
CHANGED
Binary file
|
images/page_down_hover.png
ADDED
Binary file
|
images/page_edit.png
CHANGED
Binary file
|
images/page_edit_hover.png
ADDED
Binary file
|
images/page_up.png
CHANGED
Binary file
|
images/page_up_hover.png
ADDED
Binary file
|
images/plus.png
CHANGED
Binary file
|
images/plus_hover.png
ADDED
Binary file
|
images/right.png
CHANGED
Binary file
|
images/right_hover.png
ADDED
Binary file
|
images/star.png
ADDED
Binary file
|
images/star_blue.png
ADDED
Binary file
|
images/star_green.png
ADDED
Binary file
|
images/star_red.png
ADDED
Binary file
|
images/star_yellow.png
ADDED
Binary file
|
images/survey.png
ADDED
Binary file
|
images/up.png
CHANGED
Binary file
|
images/up_hover.png
ADDED
Binary file
|
js/editor_plugin.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
(function() {
|
2 |
tinymce.create('tinymce.plugins.Form_Maker_mce', {
|
|
|
3 |
init : function(ed, url){
|
4 |
|
5 |
ed.addCommand('mceForm_Maker_mce', function() {
|
1 |
(function() {
|
2 |
tinymce.create('tinymce.plugins.Form_Maker_mce', {
|
3 |
+
|
4 |
init : function(ed, url){
|
5 |
|
6 |
ed.addCommand('mceForm_Maker_mce', function() {
|
js/formmaker_free.js
CHANGED
@@ -1,16679 +1,24070 @@
|
|
1 |
-
|
|
|
2 |
var c;
|
3 |
var need_enable = true;
|
4 |
var a = new Array();
|
5 |
var plugin_url = "";
|
6 |
var id_ifr_editor = 500;
|
7 |
var count_of_filds_form = 7;
|
8 |
-
if (ajaxurl.indexOf("://") != -1)
|
9 |
var url_for_ajax = ajaxurl;
|
10 |
-
|
|
|
11 |
var url_for_ajax = location.protocol + '//' + location.host + ajaxurl;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Remove witespaces from childNodes.
|
15 |
-
*/
|
16 |
-
function form_maker_remove_spaces(parent) {
|
17 |
-
if (!parent) {
|
18 |
-
parent = document;
|
19 |
-
}
|
20 |
-
var children = parent.childNodes;
|
21 |
-
for (var i = children.length - 1; i >= 0; i--) {
|
22 |
-
var child = children[i];
|
23 |
-
if (child.nodeType == 3) {
|
24 |
-
if (child.data.match(/^\s+$/)) {
|
25 |
-
parent.removeChild(child);
|
26 |
-
}
|
27 |
-
}
|
28 |
-
else {
|
29 |
-
form_maker_remove_spaces(child);
|
30 |
-
}
|
31 |
-
}
|
32 |
}
|
33 |
|
34 |
function active_reset(val, id) {
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
}
|
42 |
|
43 |
function check_required() {
|
44 |
-
|
45 |
}
|
46 |
|
47 |
function isNumber(n) {
|
48 |
return !isNaN(parseFloat(n)) && isFinite(n);
|
49 |
}
|
50 |
function change_field_name(id, x) {
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
else {
|
66 |
-
|
67 |
-
document.getElementById(id + '_element_labelform_id_temp').innerHTML = value;
|
68 |
}
|
69 |
}
|
70 |
|
71 |
-
function change_field_value(id, value) {
|
72 |
-
document.getElementById(id + '_elementform_id_temp').value = value;
|
73 |
-
}
|
74 |
-
|
75 |
function return_attributes(id) {
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
for (i = 0; i < 30; i++)
|
82 |
if (atr[i]) {
|
83 |
if (atr[i].name.indexOf("add_") == 0) {
|
84 |
attr_names.push(atr[i].name.replace('add_', ''));
|
85 |
attr_value.push(atr[i].value);
|
86 |
}
|
87 |
}
|
88 |
-
|
|
|
89 |
return Array(attr_names, attr_value);
|
90 |
}
|
91 |
|
92 |
function refresh_attr(x, type) {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
-
function add_id_and_name(i,
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
edit_main_tr0.setAttribute("valing", "top");
|
234 |
-
|
235 |
var edit_main_td0 = document.createElement('td');
|
236 |
edit_main_td0.style.cssText = "padding-top:10px";
|
237 |
-
|
238 |
var edit_main_td0_1 = document.createElement('td');
|
239 |
edit_main_td0_1.style.cssText = "padding-top:10px";
|
240 |
-
|
241 |
var br = document.createElement('br');
|
242 |
var br1 = document.createElement('br');
|
243 |
-
|
244 |
var field_id = document.createElement('label');
|
245 |
-
field_id.style.cssText =
|
246 |
field_id.innerHTML = "Field id ";
|
247 |
-
|
248 |
-
|
249 |
var field_id_text = document.createElement('input');
|
250 |
field_id_text.setAttribute("size", "50");
|
251 |
field_id_text.setAttribute("type", "text");
|
252 |
field_id_text.setAttribute("disabled", "disabled");
|
253 |
-
field_id_text.setAttribute("value", i
|
254 |
-
|
255 |
var field_name = document.createElement('label');
|
256 |
-
field_name.style.cssText =
|
257 |
field_name.innerHTML = "Field name ";
|
258 |
-
|
259 |
var field_name_text = document.createElement('input');
|
260 |
field_name_text.setAttribute("size", "50");
|
261 |
field_name_text.setAttribute("type", "text");
|
262 |
field_name_text.setAttribute("disabled", "disabled");
|
263 |
-
field_name_text.setAttribute("value", i
|
264 |
-
|
265 |
edit_main_td0.appendChild(field_id);
|
266 |
edit_main_td0.appendChild(br);
|
267 |
edit_main_td0.appendChild(field_name);
|
268 |
-
|
269 |
edit_main_td0_1.appendChild(field_id_text);
|
270 |
edit_main_td0_1.appendChild(br1);
|
271 |
edit_main_td0_1.appendChild(field_name_text);
|
272 |
edit_main_tr0.appendChild(edit_main_td0);
|
273 |
edit_main_tr0.appendChild(edit_main_td0_1);
|
274 |
-
edit_main_table.insertBefore(edit_main_tr0,
|
275 |
break;
|
276 |
-
}
|
277 |
-
|
278 |
-
case 'type_address':
|
279 |
-
{
|
280 |
-
var edit_main_table = document.getElementById("edit_main_table");
|
281 |
|
282 |
-
|
|
|
|
|
|
|
283 |
edit_main_tr0.setAttribute("valing", "top");
|
284 |
-
|
285 |
var edit_main_td0 = document.createElement('td');
|
286 |
edit_main_td0.style.cssText = "padding-top:10px";
|
287 |
-
|
288 |
-
|
289 |
var br = document.createElement('br');
|
290 |
-
|
291 |
var field_id = document.createElement('label');
|
292 |
-
field_id.style.cssText =
|
293 |
-
field_id.innerHTML = "
|
294 |
-
|
295 |
-
|
296 |
var field_id_text = document.createElement('input');
|
|
|
297 |
field_id_text.setAttribute("type", "text");
|
298 |
-
field_id_text.setAttribute("id", "field_id");
|
299 |
field_id_text.setAttribute("disabled", "disabled");
|
300 |
-
field_id_text.setAttribute("
|
301 |
-
field_id_text.setAttribute("value", i + "_street1form_id_temp, " + i + "_street2form_id_temp, " + i + "_cityform_id_temp, " + i + "_stateform_id_temp, " + i + "_postalform_id_temp, " + i + "_countryform_id_temp");
|
302 |
-
|
303 |
var field_name = document.createElement('label');
|
304 |
-
field_name.style.cssText =
|
305 |
-
field_name.innerHTML = "
|
306 |
-
|
307 |
var field_name_text = document.createElement('input');
|
|
|
308 |
field_name_text.setAttribute("type", "text");
|
309 |
-
field_name_text.setAttribute("id", "field_name");
|
310 |
field_name_text.setAttribute("disabled", "disabled");
|
311 |
-
field_name_text.setAttribute("
|
312 |
-
field_name_text.setAttribute("value", i + "_street1form_id_temp, " + i + "_street2form_id_temp, " + i + "_cityform_id_temp, " + i + "_stateform_id_temp, " + i + "_postalform_id_temp, " + i + "_countryform_id_temp");
|
313 |
-
|
314 |
edit_main_td0.appendChild(field_id);
|
315 |
-
edit_main_td0.appendChild(field_id_text);
|
316 |
edit_main_td0.appendChild(br);
|
317 |
edit_main_td0.appendChild(field_name);
|
318 |
-
|
|
|
|
|
319 |
edit_main_tr0.appendChild(edit_main_td0);
|
320 |
-
|
|
|
321 |
break;
|
322 |
-
}
|
323 |
-
|
324 |
-
case 'type_name':
|
325 |
-
{
|
326 |
-
var edit_main_table = document.getElementById("edit_main_table");
|
327 |
|
328 |
-
|
|
|
|
|
|
|
329 |
edit_main_tr0.setAttribute("valing", "top");
|
330 |
-
|
331 |
var edit_main_td0 = document.createElement('td');
|
332 |
edit_main_td0.style.cssText = "padding-top:10px";
|
333 |
edit_main_td0.setAttribute("colspan", "2");
|
334 |
-
|
335 |
var br = document.createElement('br');
|
336 |
-
|
337 |
var field_id = document.createElement('label');
|
338 |
-
field_id.style.cssText =
|
339 |
field_id.innerHTML = "Fields id ";
|
340 |
-
|
341 |
-
|
342 |
var field_id_text = document.createElement('input');
|
343 |
field_id_text.setAttribute("type", "text");
|
344 |
field_id_text.setAttribute("id", "field_id");
|
345 |
field_id_text.setAttribute("disabled", "disabled");
|
346 |
field_id_text.setAttribute("style", "width:350px");
|
347 |
-
field_id_text.setAttribute("value",
|
348 |
-
|
349 |
var field_name = document.createElement('label');
|
350 |
-
field_name.style.cssText =
|
351 |
field_name.innerHTML = "Fields name ";
|
352 |
-
|
353 |
var field_name_text = document.createElement('input');
|
354 |
field_name_text.setAttribute("type", "text");
|
355 |
field_name_text.setAttribute("id", "field_name");
|
356 |
field_name_text.setAttribute("disabled", "disabled");
|
357 |
field_name_text.setAttribute("style", "width:350px");
|
358 |
-
field_name_text.setAttribute("value",
|
359 |
-
|
360 |
edit_main_td0.appendChild(field_id);
|
361 |
edit_main_td0.appendChild(field_id_text);
|
362 |
edit_main_td0.appendChild(br);
|
363 |
edit_main_td0.appendChild(field_name);
|
364 |
edit_main_td0.appendChild(field_name_text);
|
365 |
edit_main_tr0.appendChild(edit_main_td0);
|
366 |
-
edit_main_table.insertBefore(edit_main_tr0,
|
|
|
367 |
break;
|
368 |
-
}
|
369 |
-
|
370 |
-
case 'type_radio':
|
371 |
-
{
|
372 |
-
var edit_main_table = document.getElementById("edit_main_table");
|
373 |
|
374 |
-
|
|
|
|
|
|
|
375 |
edit_main_tr0.setAttribute("valing", "top");
|
376 |
-
|
377 |
var edit_main_td0 = document.createElement('td');
|
378 |
edit_main_td0.style.cssText = "padding-top:10px";
|
379 |
edit_main_td0.setAttribute("colspan", "2");
|
380 |
-
|
381 |
var br = document.createElement('br');
|
382 |
-
|
383 |
var field_id = document.createElement('label');
|
384 |
-
field_id.style.cssText =
|
385 |
field_id.innerHTML = "Fields id ";
|
386 |
-
|
387 |
-
|
388 |
var field_id_text = document.createElement('input');
|
389 |
field_id_text.setAttribute("type", "text");
|
390 |
field_id_text.setAttribute("id", "field_id");
|
391 |
field_id_text.setAttribute("disabled", "disabled");
|
392 |
field_id_text.setAttribute("style", "width:350px");
|
393 |
-
field_id_text.setAttribute("value",
|
394 |
-
|
395 |
var field_name = document.createElement('label');
|
396 |
-
field_name.style.cssText =
|
397 |
field_name.innerHTML = "Fields name ";
|
398 |
-
|
399 |
var field_name_text = document.createElement('input');
|
400 |
field_name_text.setAttribute("type", "text");
|
401 |
field_name_text.setAttribute("id", "field_name");
|
402 |
field_name_text.setAttribute("disabled", "disabled");
|
403 |
field_name_text.setAttribute("style", "width:350px");
|
404 |
field_name_text.setAttribute("value", '');
|
405 |
-
|
406 |
edit_main_td0.appendChild(field_id);
|
407 |
edit_main_td0.appendChild(field_id_text);
|
408 |
edit_main_td0.appendChild(br);
|
409 |
edit_main_td0.appendChild(field_name);
|
410 |
edit_main_td0.appendChild(field_name_text);
|
411 |
edit_main_tr0.appendChild(edit_main_td0);
|
412 |
-
edit_main_table.insertBefore(edit_main_tr0,
|
413 |
refresh_id_name(i, type);
|
414 |
break;
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
{
|
419 |
-
var edit_main_table = document.getElementById("edit_main_table");
|
420 |
|
421 |
-
var edit_main_tr0 = document.createElement('tr');
|
422 |
-
edit_main_tr0.setAttribute("valing", "top");
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
|
428 |
-
var br = document.createElement('br');
|
429 |
|
430 |
-
var field_id = document.createElement('label');
|
431 |
-
field_id.style.cssText = "color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
432 |
-
field_id.innerHTML = "Fields id ";
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
|
442 |
-
|
443 |
-
|
444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
refresh_id_name(i, type);
|
461 |
-
break;
|
462 |
-
}
|
463 |
|
464 |
-
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
|
468 |
-
|
469 |
-
|
|
|
|
|
|
|
|
|
|
|
470 |
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
|
|
|
|
475 |
|
476 |
-
|
477 |
-
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
|
|
|
|
|
|
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
|
502 |
-
|
503 |
-
edit_main_td0.appendChild(br1);
|
504 |
-
edit_main_td0.appendChild(field_name);
|
505 |
-
edit_main_td0_1.appendChild(field_id_text);
|
506 |
-
edit_main_td0_1.appendChild(br);
|
507 |
-
edit_main_td0_1.appendChild(field_name_text);
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
var edit_main_td0 = document.createElement('td');
|
523 |
-
edit_main_td0.style.cssText = "padding-top:10px";
|
524 |
-
edit_main_td0.setAttribute("colspan", "2");
|
525 |
-
|
526 |
-
var br = document.createElement('br');
|
527 |
-
|
528 |
-
var field_id = document.createElement('label');
|
529 |
-
field_id.style.cssText = "color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
530 |
-
field_id.innerHTML = "Fields id ";
|
531 |
-
|
532 |
-
|
533 |
-
var field_id_text = document.createElement('input');
|
534 |
-
field_id_text.setAttribute("size", "50");
|
535 |
-
field_id_text.setAttribute("type", "text");
|
536 |
-
field_id_text.setAttribute("id", "field_id");
|
537 |
-
field_id_text.setAttribute("disabled", "disabled");
|
538 |
-
field_id_text.setAttribute("value", i + "_dayform_id_temp, " + i + "_monthform_id_temp, " + i + "_yearform_id_temp");
|
539 |
-
|
540 |
-
var field_name = document.createElement('label');
|
541 |
-
field_name.style.cssText = "color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
542 |
-
field_name.innerHTML = "Fields name ";
|
543 |
-
|
544 |
-
var field_name_text = document.createElement('input');
|
545 |
-
field_name_text.setAttribute("size", "50");
|
546 |
-
field_name_text.setAttribute("type", "text");
|
547 |
-
field_name_text.setAttribute("id", "field_name");
|
548 |
-
field_name_text.setAttribute("disabled", "disabled");
|
549 |
-
field_name_text.setAttribute("value", i + "_dayform_id_temp, " + i + "_monthform_id_temp, " + i + "_yearform_id_temp");
|
550 |
-
|
551 |
-
edit_main_td0.appendChild(field_id);
|
552 |
-
edit_main_td0.appendChild(field_id_text);
|
553 |
-
edit_main_td0.appendChild(br);
|
554 |
-
edit_main_td0.appendChild(field_name);
|
555 |
-
edit_main_td0.appendChild(field_name_text);
|
556 |
-
edit_main_tr0.appendChild(edit_main_td0);
|
557 |
-
edit_main_table.insertBefore(edit_main_tr0, edit_main_table.childNodes[0]);
|
558 |
-
break;
|
559 |
}
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
var field_name = document.createElement('label');
|
590 |
-
field_name.style.cssText = "color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
591 |
-
field_name.innerHTML = "Fields name ";
|
592 |
-
|
593 |
-
var field_name_text = document.createElement('input');
|
594 |
-
field_name_text.setAttribute("size", "50");
|
595 |
-
field_name_text.setAttribute("type", "text");
|
596 |
-
field_name_text.setAttribute("id", "field_name");
|
597 |
-
field_name_text.setAttribute("disabled", "disabled");
|
598 |
-
field_name_text.setAttribute("value", "captcha_inputform_id_temp");
|
599 |
-
|
600 |
-
edit_main_td0.appendChild(field_id);
|
601 |
-
edit_main_td0.appendChild(br1);
|
602 |
-
edit_main_td0.appendChild(field_name);
|
603 |
-
edit_main_td0_1.appendChild(field_id_text);
|
604 |
-
edit_main_td0_1.appendChild(br);
|
605 |
-
edit_main_td0_1.appendChild(field_name_text);
|
606 |
-
edit_main_tr0.appendChild(edit_main_td0);
|
607 |
-
edit_main_tr0.appendChild(edit_main_td0_1);
|
608 |
-
edit_main_table.insertBefore(edit_main_tr0, edit_main_table.childNodes[0]);
|
609 |
-
break;
|
610 |
}
|
|
|
|
|
|
|
611 |
|
612 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
}
|
614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
|
616 |
-
function
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
document.getElementById('field_id').value = a;
|
627 |
-
document.getElementById('field_name').value = i + '_element';
|
628 |
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
document.getElementById('field_name').value = a;
|
642 |
|
643 |
-
|
644 |
-
}
|
645 |
-
}
|
646 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
}
|
648 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
649 |
|
650 |
-
function
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
}
|
694 |
|
695 |
-
function
|
696 |
-
|
697 |
-
|
698 |
-
return
|
699 |
}
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
return
|
704 |
}
|
705 |
-
|
706 |
-
|
707 |
-
}
|
708 |
-
|
709 |
-
function change_attribute_name(id, x, type) {
|
710 |
-
value = x.value;
|
711 |
-
if (!value) {
|
712 |
-
alert('The name of the attribute is required.');
|
713 |
-
return;
|
714 |
}
|
715 |
-
|
716 |
-
|
717 |
-
alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.');
|
718 |
-
return;
|
719 |
}
|
|
|
|
|
720 |
|
721 |
-
|
722 |
-
|
723 |
-
|
|
|
724 |
}
|
725 |
-
|
726 |
-
|
727 |
-
var regExp = /\s+/g;
|
728 |
-
value = value.replace(regExp, '');
|
729 |
-
x.value = value;
|
730 |
-
alert("The name of the attribute cannot contain a space.");
|
731 |
-
refresh_attr(id, type);
|
732 |
-
return;
|
733 |
}
|
734 |
-
|
735 |
-
refresh_attr(id, type);
|
736 |
-
|
737 |
}
|
738 |
|
739 |
-
function
|
740 |
-
|
741 |
-
|
742 |
-
|
|
|
|
|
743 |
}
|
744 |
|
745 |
-
function
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
|
|
|
|
|
|
750 |
}
|
751 |
|
752 |
-
function
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
j = 1;
|
758 |
-
var table_button = document.createElement('table');
|
759 |
-
|
760 |
-
table_button.setAttribute("width", "100%");
|
761 |
-
table_button.setAttribute("border", "0");
|
762 |
-
table_button.setAttribute("id", "button_opt" + j);
|
763 |
-
table_button.setAttribute("idi", j);
|
764 |
-
var tr_button = document.createElement('tr');
|
765 |
-
var tr_hr = document.createElement('tr');
|
766 |
-
|
767 |
-
var td_button = document.createElement('td');
|
768 |
-
var td_X = document.createElement('td');
|
769 |
-
var td_hr = document.createElement('td');
|
770 |
-
td_hr.setAttribute("colspan", "3");
|
771 |
-
|
772 |
-
tr_hr.appendChild(td_hr);
|
773 |
-
tr_button.appendChild(td_button);
|
774 |
-
tr_button.appendChild(td_X);
|
775 |
-
table_button.appendChild(tr_hr);
|
776 |
-
table_button.appendChild(tr_button);
|
777 |
-
|
778 |
-
var br1 = document.createElement('br');
|
779 |
-
|
780 |
-
var hr = document.createElement('hr');
|
781 |
-
|
782 |
-
hr.setAttribute("id", "br" + j);
|
783 |
-
|
784 |
-
|
785 |
-
var el_title_label = document.createElement('label');
|
786 |
-
|
787 |
-
el_title_label.style.cssText = "color:#00aeef; font-weight:bold; font-size: 13px";
|
788 |
-
|
789 |
-
el_title_label.innerHTML = "Button name";
|
790 |
-
|
791 |
-
var el_title = document.createElement('input');
|
792 |
-
|
793 |
-
el_title.setAttribute("id", "el_title" + j);
|
794 |
-
|
795 |
-
el_title.setAttribute("type", "text");
|
796 |
-
|
797 |
-
el_title.setAttribute("value", "Button");
|
798 |
-
|
799 |
-
el_title.style.cssText = "width:100px; margin-left:43px; padding:0; border-width: 1px";
|
800 |
-
|
801 |
-
el_title.setAttribute("onKeyUp", "change_label('" + i + "_elementform_id_temp" + j + "', this.value);");
|
802 |
|
|
|
|
|
|
|
|
|
|
|
803 |
|
804 |
-
|
|
|
|
|
|
|
805 |
|
806 |
-
|
|
|
|
|
|
|
807 |
|
808 |
-
|
|
|
|
|
|
|
809 |
|
810 |
-
|
|
|
|
|
|
|
811 |
|
812 |
-
|
|
|
|
|
|
|
|
|
|
|
813 |
|
814 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
815 |
|
816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
|
818 |
-
|
819 |
|
820 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
|
822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
|
824 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
825 |
|
826 |
-
|
827 |
|
828 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
829 |
|
830 |
-
|
831 |
|
832 |
-
el_choices_remove.setAttribute("onClick", "remove_button(" + j + "," + i + ")");
|
833 |
|
834 |
|
835 |
-
|
|
|
|
|
|
|
|
|
836 |
|
837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
|
839 |
-
|
840 |
-
|
841 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
|
843 |
-
|
844 |
-
|
845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
|
847 |
-
|
848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
|
850 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
|
|
859 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
|
861 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
862 |
|
863 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
864 |
}
|
865 |
|
866 |
-
function
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
|
|
|
|
871 |
}
|
872 |
|
873 |
-
function
|
874 |
-
|
875 |
-
|
876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
}
|
878 |
|
879 |
-
function
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
|
|
|
|
884 |
}
|
885 |
|
886 |
-
function
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
891 |
}
|
892 |
|
893 |
-
function
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
}
|
903 |
|
904 |
-
function
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
911 |
}
|
912 |
|
913 |
-
function
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
920 |
}
|
921 |
-
function show_other_input(num) {
|
922 |
-
for (k = 0; k < 50; k++)
|
923 |
-
if (document.getElementById(num + "_elementform_id_temp" + k))
|
924 |
-
if (document.getElementById(num + "_elementform_id_temp" + k).getAttribute('other'))
|
925 |
-
if (document.getElementById(num + "_elementform_id_temp" + k).getAttribute('other') == 1) {
|
926 |
-
element_other = document.getElementById(num + "_elementform_id_temp" + k);
|
927 |
-
break;
|
928 |
-
}
|
929 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
|
931 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
|
933 |
-
|
934 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
935 |
|
936 |
-
|
937 |
-
el_other.setAttribute("id", num + "_other_inputform_id_temp");
|
938 |
-
el_other.setAttribute("name", num + "_other_inputform_id_temp");
|
939 |
-
el_other.setAttribute("type", "text");
|
940 |
-
el_other.setAttribute("class", "other_input");
|
941 |
-
parent.appendChild(br);
|
942 |
-
parent.appendChild(el_other);
|
943 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
944 |
}
|
945 |
|
946 |
-
function
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
break;
|
955 |
-
}
|
956 |
|
|
|
|
|
|
|
957 |
}
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
967 |
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
td.setAttribute("valign", "top");
|
973 |
-
td.setAttribute("id", num + "_td_little" + j);
|
974 |
-
td.setAttribute("idi", j);
|
975 |
-
var adding = document.createElement(element);
|
976 |
-
adding.setAttribute("type", type);
|
977 |
-
adding.setAttribute("value", "other");
|
978 |
-
adding.setAttribute("other", "1");
|
979 |
-
adding.setAttribute("id", num + "_elementform_id_temp" + j);
|
980 |
-
if (type == "checkbox") {
|
981 |
-
adding.setAttribute("onClick", "if(set_checked('" + num + "','" + j + "','form_id_temp')) show_other_input('" + num + "','form_id_temp');");
|
982 |
-
adding.setAttribute("name", num + "_elementform_id_temp" + j);
|
983 |
-
}
|
984 |
-
else {
|
985 |
-
adding.setAttribute("onClick", "set_default('" + num + "','" + j + "','form_id_temp'); show_other_input('" + num + "','form_id_temp');");
|
986 |
-
adding.setAttribute("name", num + "_elementform_id_temp");
|
987 |
-
}
|
988 |
|
|
|
|
|
|
|
989 |
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
label_adding.setAttribute("for", num + "_elementform_id_temp" + j);
|
994 |
-
label_adding.innerHTML = "other";
|
995 |
-
td.appendChild(adding);
|
996 |
-
td.appendChild(label_adding);
|
997 |
-
tr.appendChild(td);
|
998 |
-
table.appendChild(tr);
|
999 |
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
el_choices.setAttribute("id", "el_choices" + j);
|
1005 |
-
el_choices.setAttribute("type", "text");
|
1006 |
-
el_choices.setAttribute("value", "other");
|
1007 |
-
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
1008 |
-
el_choices.setAttribute("onKeyUp", "change_label('" + num + "_label_element" + j + "', this.value); change_in_value('" + num + "_elementform_id_temp" + j + "', this.value)");
|
1009 |
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
choices_td.appendChild(br);
|
1018 |
choices_td.appendChild(el_choices);
|
1019 |
choices_td.appendChild(el_choices_remove);
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
}
|
1025 |
}
|
1026 |
|
1027 |
-
function
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1043 |
}
|
1044 |
-
|
1045 |
-
function flow_ver(id) {
|
1046 |
-
tbody = document.getElementById(id + '_table_little');
|
1047 |
-
tr = document.getElementById(id + '_hor');
|
1048 |
-
td_array = new Array();
|
1049 |
-
n = tr.childNodes.length;
|
1050 |
-
|
1051 |
-
for (k = 0; k < n; k++)
|
1052 |
-
td_array[k] = tr.childNodes[k];
|
1053 |
-
|
1054 |
-
tbody.removeChild(tr);
|
1055 |
-
|
1056 |
-
for (k = 0; k < n; k++) {
|
1057 |
-
var tr_little = document.createElement('tr');
|
1058 |
-
tr_little.setAttribute("id", id + "_element_tr" + td_array[k].getAttribute("idi"));
|
1059 |
-
tr_little.appendChild(td_array[k]);
|
1060 |
-
tbody.appendChild(tr_little);
|
1061 |
-
}
|
1062 |
}
|
1063 |
|
1064 |
-
function
|
1065 |
-
|
1066 |
-
var
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
|
|
|
|
1072 |
}
|
1073 |
|
1074 |
-
function
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1083 |
|
1084 |
}
|
1085 |
|
1086 |
-
function
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1099 |
}
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
}
|
1112 |
|
1113 |
-
function
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
var mm_ = document.createElement('span');
|
1128 |
-
mm_.setAttribute("class", 'wdform_colon');
|
1129 |
-
mm_.style.cssText = "font-style:bold; vertical-align:middle";
|
1130 |
-
mm_.innerHTML = " : ";
|
1131 |
-
td_time_input2_ket.appendChild(mm_);
|
1132 |
-
|
1133 |
-
var ss = document.createElement('input');
|
1134 |
-
|
1135 |
-
ss.setAttribute("type", 'text');
|
1136 |
-
ss.setAttribute("value", w_ss);
|
1137 |
-
|
1138 |
-
ss.setAttribute("class", "time_box");
|
1139 |
-
ss.setAttribute("id", id + "_ssform_id_temp");
|
1140 |
-
ss.setAttribute("name", id + "_ssform_id_temp");
|
1141 |
-
ss.setAttribute("onKeyPress", "return check_second(event, '" + id + "_ssform_id_temp')");
|
1142 |
-
ss.setAttribute("onKeyUp", "change_second('" + id + "_ssform_id_temp')");
|
1143 |
-
ss.setAttribute("onBlur", "add_0('" + id + "_ssform_id_temp')");
|
1144 |
-
var ss_label = document.createElement('label');
|
1145 |
-
ss_label.setAttribute("class", "mini_label");
|
1146 |
-
ss_label.innerHTML = "SS";
|
1147 |
|
1148 |
-
td_time_input3.appendChild(ss);
|
1149 |
-
td_time_label3.appendChild(ss_label);
|
1150 |
|
1151 |
-
if (document.getElementById(id + '_am_pm_select')) {
|
1152 |
-
select_ = document.getElementById(id + "_am_pm_select");
|
1153 |
-
select_text = document.getElementById(id + "_am_pm_label");
|
1154 |
|
1155 |
-
time_box.insertBefore(td_time_input3, select_);
|
1156 |
-
time_box.insertBefore(td_time_input2_ket, td_time_input3);
|
1157 |
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1169 |
|
1170 |
-
function check_isnum(e) {
|
1171 |
|
1172 |
-
var chCode1 = e.which || e.keyCode;
|
1173 |
-
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
1174 |
-
return false;
|
1175 |
-
return true;
|
1176 |
}
|
1177 |
|
1178 |
-
function change_w_style(id, w) {
|
1179 |
-
if (document.getElementById(id))
|
1180 |
-
document.getElementById(id).style.width = w + "px";
|
1181 |
-
}
|
1182 |
|
1183 |
-
function
|
1184 |
-
|
1185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1186 |
}
|
1187 |
-
|
1188 |
-
function change_h_style(id, h) {
|
1189 |
-
document.getElementById(id).style.height = h + "px";
|
1190 |
}
|
1191 |
|
1192 |
-
function
|
1193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1194 |
}
|
1195 |
|
1196 |
-
function
|
1197 |
-
document.getElementById(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
}
|
1199 |
|
1200 |
-
function
|
1201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1202 |
}
|
1203 |
|
1204 |
-
function
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1208 |
}
|
1209 |
|
1210 |
-
function
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
}
|
1220 |
-
|
1221 |
-
|
1222 |
-
up = form.childNodes[k - 1];
|
1223 |
-
down = form.childNodes[k];
|
1224 |
-
form.removeChild(down);
|
1225 |
-
form.insertBefore(down, up);
|
1226 |
-
return;
|
1227 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1233 |
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1239 |
}
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
if (
|
1243 |
-
|
1244 |
-
|
|
|
|
|
|
|
|
|
|
|
1245 |
}
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
|
1249 |
-
///////////pagei mej
|
1250 |
-
page_up(id);
|
1251 |
}
|
1252 |
|
1253 |
-
function
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
|
1272 |
-
|
1273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1274 |
}
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
current_tr.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1283 |
-
return;
|
1284 |
-
}
|
1285 |
}
|
1286 |
else {
|
1287 |
-
|
1288 |
-
current_tr.nextSibling.nextSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1289 |
-
return;
|
1290 |
-
}
|
1291 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1292 |
|
|
|
1293 |
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1297 |
}
|
1298 |
|
1299 |
-
function
|
1300 |
-
tr = document.getElementById(id);
|
1301 |
-
table_big = tr.parentNode.parentNode;
|
1302 |
-
td_big = tr.parentNode.parentNode.parentNode;
|
1303 |
-
if (table_big.nextSibling != null) {
|
1304 |
-
td_next = table_big.nextSibling;
|
1305 |
-
td_next.firstChild.appendChild(tr);
|
1306 |
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1318 |
|
1319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1320 |
|
1321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1322 |
|
1323 |
-
|
1324 |
|
1325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1326 |
|
1327 |
-
|
1328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1330 |
}
|
1331 |
|
1332 |
-
function
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1337 |
|
1338 |
-
|
1339 |
-
|
|
|
|
|
|
|
1340 |
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1344 |
|
|
|
|
|
|
|
|
|
|
|
1345 |
}
|
1346 |
|
1347 |
-
function
|
1348 |
-
form = document.getElementById(id).parentNode;
|
1349 |
|
1350 |
-
|
1351 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1352 |
|
1353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1354 |
|
1355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1356 |
|
1357 |
-
|
1358 |
-
table = table.previousSibling;
|
1359 |
-
while (table) {
|
1360 |
-
if (table.tagName == "TABLE")
|
1361 |
-
break;
|
1362 |
-
else
|
1363 |
-
table = table.previousSibling;
|
1364 |
-
}
|
1365 |
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1373 |
|
1374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1376 |
|
1377 |
-
|
1378 |
|
1379 |
-
|
1380 |
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1395 |
|
|
|
1396 |
|
1397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1398 |
|
|
|
|
|
|
|
1399 |
|
1400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1401 |
|
1402 |
-
|
1403 |
-
form = document.getElementById(id).parentNode;
|
1404 |
|
1405 |
-
|
1406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1407 |
|
1408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1409 |
|
1410 |
-
|
1411 |
-
|
1412 |
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1419 |
|
1420 |
-
|
1421 |
-
alert('Unable to move');
|
1422 |
-
return;
|
1423 |
-
}
|
1424 |
|
1425 |
-
|
1426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1427 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1428 |
|
1429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1430 |
|
1431 |
-
|
1432 |
-
|
1433 |
|
|
|
1434 |
}
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1441 |
}
|
1442 |
|
1443 |
-
function
|
1444 |
-
|
1445 |
-
pos[0].setAttribute("checked", "checked");
|
1446 |
-
|
1447 |
-
select_ = document.getElementById('sel_el_pos');
|
1448 |
-
select_.innerHTML = "";
|
1449 |
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1458 |
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1472 |
}
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1476 |
}
|
1477 |
|
1478 |
-
function
|
1479 |
-
|
1480 |
-
for (k = 1; k <= form_view_max; k++)
|
1481 |
-
if (document.getElementById('form_id_tempform_view' + k)) {
|
1482 |
-
form_view_element = document.getElementById('form_id_tempform_view' + k);
|
1483 |
-
form_maker_remove_spaces(form_view_element);
|
1484 |
-
n = form_view_element.childNodes.length - 2;
|
1485 |
-
for (z = 0; z <= n; z++) {
|
1486 |
-
if (!form_view_element.childNodes[z].id) {
|
1487 |
-
GLOBAL_tr = form_view_element.childNodes[z];
|
1488 |
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1500 |
|
1501 |
-
|
1502 |
-
}
|
1503 |
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1517 |
}
|
1518 |
-
|
1519 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1520 |
}
|
1521 |
|
1522 |
-
function
|
1523 |
-
|
1524 |
-
if (document.getElementById(id + "_elementform_id_temp" + k))
|
1525 |
-
if (!document.getElementById(id + "_elementform_id_temp" + k).checked)
|
1526 |
-
document.getElementById(id + "_elementform_id_temp" + k).removeAttribute("checked");
|
1527 |
-
else
|
1528 |
-
document.getElementById(id + "_elementform_id_temp" + j).setAttribute("checked", "checked");
|
1529 |
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1535 |
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1543 |
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1550 |
}
|
1551 |
|
1552 |
-
function
|
1553 |
-
if (check_hour(ev, id, hour_interval)) {
|
1554 |
-
input = document.getElementById(id);
|
1555 |
-
input.setAttribute("value", input.value);
|
1556 |
-
}
|
1557 |
-
}
|
1558 |
|
1559 |
-
|
1560 |
-
if (check_minute(ev, id)) {
|
1561 |
-
input = document.getElementById(id);
|
1562 |
-
input.setAttribute("value", input.value);
|
1563 |
-
}
|
1564 |
-
}
|
1565 |
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1572 |
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1578 |
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1583 |
}
|
1584 |
|
1585 |
-
function
|
1586 |
|
|
|
1587 |
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1592 |
|
1593 |
-
minute = parseFloat(minute);
|
1594 |
-
if ((minute < 0) || (minute > 59))
|
1595 |
-
return false;
|
1596 |
-
return true;
|
1597 |
}
|
1598 |
|
1599 |
-
function
|
|
|
|
|
1600 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1601 |
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1606 |
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
}
|
1612 |
|
1613 |
-
|
1614 |
-
|
1615 |
-
input = document.getElementById(id);
|
1616 |
-
input.setAttribute("value", input.value);
|
1617 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1618 |
}
|
1619 |
|
1620 |
-
function
|
1621 |
-
|
1622 |
-
|
1623 |
-
input.setAttribute("value", input.value);
|
1624 |
-
}
|
1625 |
-
}
|
1626 |
|
1627 |
-
|
1628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1629 |
|
1630 |
-
|
1631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1632 |
|
1633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1634 |
|
1635 |
-
if ((year >= from) && (year <= to))
|
1636 |
-
document.getElementById(id).setAttribute("value", year);
|
1637 |
-
else
|
1638 |
-
document.getElementById(id).setAttribute("value", '');
|
1639 |
}
|
1640 |
|
1641 |
-
function
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
|
1647 |
-
if (day.length > 2)
|
1648 |
-
return false;
|
1649 |
|
1650 |
-
|
1651 |
-
return false;
|
1652 |
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
}
|
1658 |
|
1659 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1660 |
|
|
|
1661 |
|
1662 |
-
|
1663 |
-
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
1664 |
-
return false;
|
1665 |
-
month = "" + document.getElementById(id).value + String.fromCharCode(chCode1);
|
1666 |
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Choices id.
|
2 |
+
j = 2;
|
3 |
var c;
|
4 |
var need_enable = true;
|
5 |
var a = new Array();
|
6 |
var plugin_url = "";
|
7 |
var id_ifr_editor = 500;
|
8 |
var count_of_filds_form = 7;
|
9 |
+
if (ajaxurl.indexOf("://") != -1) {
|
10 |
var url_for_ajax = ajaxurl;
|
11 |
+
}
|
12 |
+
else {
|
13 |
var url_for_ajax = location.protocol + '//' + location.host + ajaxurl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
function active_reset(val, id) {
|
17 |
+
if (val) {
|
18 |
+
document.getElementById(id+'_element_resetform_id_temp').style.display = "inline";
|
19 |
+
}
|
20 |
+
else {
|
21 |
+
document.getElementById(id+'_element_resetform_id_temp').style.display = "none";
|
22 |
+
}
|
23 |
}
|
24 |
|
25 |
function check_required() {
|
26 |
+
alert('"Submit" and "Reset" buttons are disabled in back end.');
|
27 |
}
|
28 |
|
29 |
function isNumber(n) {
|
30 |
return !isNaN(parseFloat(n)) && isFinite(n);
|
31 |
}
|
32 |
function change_field_name(id, x) {
|
33 |
+
value = x.value;
|
34 |
+
if (value == parseInt(value)) {
|
35 |
+
alert('The name of the field cannot be a number.');
|
36 |
+
x.value="";
|
37 |
+
document.getElementById(id+'_elementform_id_temp').name='';
|
38 |
+
document.getElementById(id+'_element_labelform_id_temp').innerHTML='';
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
if (value == id + "_elementform_id_temp") {
|
42 |
+
alert('"Field Name" should differ from "Field Id".')
|
43 |
+
x.value="";
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
document.getElementById(id+'_elementform_id_temp').name=value;
|
47 |
+
document.getElementById(id+'_element_labelform_id_temp').innerHTML=value;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
function change_field_value(id, value) {
|
52 |
+
document.getElementById(id+'_elementform_id_temp').value = value;
|
53 |
+
}
|
54 |
|
55 |
+
function chnage_icons_src(img, icon) {
|
56 |
+
if (img.src.indexOf("hover") != -1) {
|
57 |
+
img.src = plugin_url+'/images/' + icon + ".png";
|
58 |
}
|
59 |
else {
|
60 |
+
img.src = plugin_url+'/images/' + icon + "_hover.png";
|
|
|
61 |
}
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
64 |
function return_attributes(id) {
|
65 |
+
attr_names = new Array();
|
66 |
+
attr_value = new Array();
|
67 |
+
var input = document.getElementById(id);
|
68 |
+
if (input) {
|
69 |
+
atr = input.attributes;
|
70 |
+
for (i = 0; i < 30; i++) {
|
71 |
if (atr[i]) {
|
72 |
if (atr[i].name.indexOf("add_") == 0) {
|
73 |
attr_names.push(atr[i].name.replace('add_', ''));
|
74 |
attr_value.push(atr[i].value);
|
75 |
}
|
76 |
}
|
77 |
+
}
|
78 |
+
}
|
79 |
return Array(attr_names, attr_value);
|
80 |
}
|
81 |
|
82 |
function refresh_attr(x, type) {
|
83 |
+
switch(type) {
|
84 |
+
case "type_text": {
|
85 |
+
id_array = Array();
|
86 |
+
id_array[0] = x + '_elementform_id_temp';
|
87 |
+
break;
|
88 |
+
}
|
89 |
+
case "type_star_rating": {
|
90 |
+
id_array = Array();
|
91 |
+
id_array[0] = x + '_elementform_id_temp';
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
|
95 |
+
case "type_scale_rating": {
|
96 |
+
id_array = Array();
|
97 |
+
id_array[0] = x + '_elementform_id_temp';
|
98 |
+
break;
|
99 |
+
}
|
100 |
+
|
101 |
+
case "type_spinner": {
|
102 |
+
id_array = Array();
|
103 |
+
id_array[0] = x + '_elementform_id_temp';
|
104 |
+
break;
|
105 |
+
}
|
106 |
+
|
107 |
+
case "type_slider": {
|
108 |
+
id_array = Array();
|
109 |
+
id_array[0] = x + '_elementform_id_temp';
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
|
113 |
+
case "type_range": {
|
114 |
+
id_array = Array();
|
115 |
+
id_array[0] = x + '_elementform_id_temp0';
|
116 |
+
id_array[1] = x + '_elementform_id_temp1';
|
117 |
+
break;
|
118 |
+
}
|
119 |
+
|
120 |
+
case "type_grading": {
|
121 |
+
id_array = Array();
|
122 |
+
id_array[0] = x + '_elementform_id_temp';
|
123 |
+
break;
|
124 |
+
}
|
125 |
+
|
126 |
+
case "type_matrix": {
|
127 |
+
id_array = Array();
|
128 |
+
id_array[0] = x + '_elementform_id_temp';
|
129 |
+
break;
|
130 |
+
}
|
131 |
+
|
132 |
+
case "type_name": {
|
133 |
+
id_array=Array();
|
134 |
+
id_array[0]=x+'_element_firstform_id_temp';
|
135 |
+
id_array[1]=x+'_element_lastform_id_temp';
|
136 |
+
id_array[2]=x+'_element_titleform_id_temp';
|
137 |
+
id_array[3]=x+'_element_middleform_id_temp';
|
138 |
+
break;
|
139 |
+
}
|
140 |
+
|
141 |
+
case "type_address":
|
142 |
+
|
143 |
+
{
|
144 |
+
id_array=Array();
|
145 |
+
id_array[0]=x+'_street1form_id_temp';
|
146 |
+
id_array[1]=x+'_street2form_id_temp';
|
147 |
+
id_array[2]=x+'_cityform_id_temp';
|
148 |
+
id_array[3]=x+'_stateform_id_temp';
|
149 |
+
id_array[4]=x+'_postalform_id_temp';
|
150 |
+
id_array[5]=x+'_countryform_id_temp';
|
151 |
+
break;
|
152 |
+
}
|
153 |
+
|
154 |
+
case "type_checkbox":
|
155 |
+
|
156 |
+
{
|
157 |
+
id_array=Array();
|
158 |
+
for(z=0;z<50;z++)
|
159 |
+
id_array[z]=x+'_elementform_id_temp'+z;
|
160 |
+
break;
|
161 |
+
}
|
162 |
+
|
163 |
+
case "type_time":
|
164 |
+
|
165 |
+
{
|
166 |
+
id_array=Array();
|
167 |
+
id_array[0]=x+'_hhform_id_temp';
|
168 |
+
id_array[1]=x+'_mmform_id_temp';
|
169 |
+
id_array[2]=x+'_ssform_id_temp';
|
170 |
+
id_array[3]=x+'_am_pmform_id_temp';
|
171 |
+
break;
|
172 |
+
}
|
173 |
+
case "type_date":
|
174 |
+
|
175 |
+
{
|
176 |
+
id_array=Array();
|
177 |
+
id_array[0]=x+'_elementform_id_temp';
|
178 |
+
id_array[1]=x+'_buttonform_id_temp';
|
179 |
+
break;
|
180 |
+
}
|
181 |
+
|
182 |
+
case "type_date_fields":
|
183 |
+
|
184 |
+
{
|
185 |
+
id_array=Array();
|
186 |
+
id_array[0]=x+'_dayform_id_temp';
|
187 |
+
id_array[1]=x+'_monthform_id_temp';
|
188 |
+
id_array[2]=x+'_yearform_id_temp';
|
189 |
+
break;
|
190 |
+
}
|
191 |
+
|
192 |
+
case "type_captcha":
|
193 |
+
|
194 |
+
{
|
195 |
+
id_array=Array();
|
196 |
+
id_array[0]='_wd_captchaform_id_temp';
|
197 |
+
id_array[1]='_wd_captcha_inputform_id_temp';
|
198 |
+
id_array[2]='_element_refreshform_id_temp';
|
199 |
+
break;
|
200 |
+
}
|
201 |
+
|
202 |
+
case "type_recaptcha":
|
203 |
+
|
204 |
+
{
|
205 |
+
id_array=Array();
|
206 |
+
id_array[0]='wd_recaptchaform_id_temp';
|
207 |
+
break;
|
208 |
+
}
|
209 |
+
|
210 |
+
case "type_submit_reset":
|
211 |
+
|
212 |
+
{
|
213 |
+
id_array=Array();
|
214 |
+
id_array[0]=x+'_element_submitform_id_temp';
|
215 |
+
id_array[1]=x+'_element_resetform_id_temp';
|
216 |
+
break;
|
217 |
+
}
|
218 |
+
|
219 |
+
case "type_page_break":
|
220 |
+
|
221 |
+
{
|
222 |
+
id_array=Array();
|
223 |
+
id_array[0]='_div_between';
|
224 |
+
break;
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
for(q=0; q<id_array.length;q++)
|
229 |
+
{
|
230 |
+
id=id_array[q];
|
231 |
+
var input=document.getElementById(id);
|
232 |
+
if(input)
|
233 |
+
{
|
234 |
+
atr=input.attributes;
|
235 |
+
for(i=0;i<30;i++)
|
236 |
+
if(atr[i])
|
237 |
+
{
|
238 |
+
if(atr[i].name.indexOf("add_")==0)
|
239 |
+
{
|
240 |
+
input.removeAttribute(atr[i].name);
|
241 |
+
i--;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
for(i=0;i<10;i++)
|
246 |
+
if(document.getElementById("attr_name"+i))
|
247 |
+
{
|
248 |
+
try{input.setAttribute("add_"+document.getElementById("attr_name"+i).value, document.getElementById("attr_value"+i).value)}
|
249 |
+
catch(err)
|
250 |
+
{
|
251 |
+
alert('Only letters, numbers, hyphens and underscores are allowed.');
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|
256 |
}
|
257 |
|
258 |
+
function add_id_and_name(i,type)
|
259 |
+
{
|
260 |
+
switch(type)
|
261 |
+
{
|
262 |
+
case 'type_text':
|
263 |
+
{
|
264 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
265 |
+
|
266 |
+
var edit_main_tr0 = document.createElement('tr');
|
267 |
+
edit_main_tr0.setAttribute("valing", "top");
|
268 |
+
|
269 |
+
var edit_main_td0 = document.createElement('td');
|
270 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
271 |
+
|
272 |
+
var edit_main_td0_1 = document.createElement('td');
|
273 |
+
edit_main_td0_1.style.cssText = "padding-top:10px";
|
274 |
+
|
275 |
+
var br = document.createElement('br');
|
276 |
+
var br1 = document.createElement('br');
|
277 |
+
|
278 |
+
var field_id = document.createElement('label');
|
279 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
280 |
+
field_id.innerHTML = "Field id ";
|
281 |
+
|
282 |
+
|
283 |
+
var field_id_text = document.createElement('input');
|
284 |
+
field_id_text.setAttribute("size", "50");
|
285 |
+
field_id_text.setAttribute("type", "text");
|
286 |
+
field_id_text.setAttribute("disabled", "disabled");
|
287 |
+
field_id_text.setAttribute("value", i+"_elementform_id_temp");
|
288 |
+
|
289 |
+
var field_name = document.createElement('label');
|
290 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
291 |
+
field_name.innerHTML = "Field name ";
|
292 |
+
|
293 |
+
var field_name_text = document.createElement('input');
|
294 |
+
field_name_text.setAttribute("size", "50");
|
295 |
+
field_name_text.setAttribute("type", "text");
|
296 |
+
field_name_text.setAttribute("disabled", "disabled");
|
297 |
+
field_name_text.setAttribute("value", i+"_elementform_id_temp");
|
298 |
+
|
299 |
+
edit_main_td0.appendChild(field_id);
|
300 |
+
edit_main_td0.appendChild(br);
|
301 |
+
edit_main_td0.appendChild(field_name);
|
302 |
+
|
303 |
+
edit_main_td0_1.appendChild(field_id_text);
|
304 |
+
edit_main_td0_1.appendChild(br1);
|
305 |
+
edit_main_td0_1.appendChild(field_name_text);
|
306 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
307 |
+
edit_main_tr0.appendChild(edit_main_td0_1);
|
308 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
309 |
+
break;
|
310 |
+
}
|
311 |
+
|
312 |
+
case 'type_address':
|
313 |
+
{
|
314 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
315 |
+
|
316 |
+
var edit_main_tr0 = document.createElement('tr');
|
317 |
+
edit_main_tr0.setAttribute("valing", "top");
|
318 |
+
|
319 |
+
var edit_main_td0 = document.createElement('td');
|
320 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
321 |
+
edit_main_td0.setAttribute("colspan", "2");
|
322 |
+
|
323 |
+
var br = document.createElement('br');
|
324 |
+
|
325 |
+
var field_id = document.createElement('label');
|
326 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
327 |
+
field_id.innerHTML = "Fields id ";
|
328 |
+
|
329 |
+
|
330 |
+
var field_id_text = document.createElement('input');
|
331 |
+
field_id_text.setAttribute("type", "text");
|
332 |
+
field_id_text.setAttribute("id", "field_id");
|
333 |
+
field_id_text.setAttribute("disabled", "disabled");
|
334 |
+
field_id_text.setAttribute("style", "width:350px");
|
335 |
+
field_id_text.setAttribute("value", i+"_street1form_id_temp, "+i+"_street2form_id_temp, "+i+"_cityform_id_temp, "+i+"_stateform_id_temp, "+i+"_postalform_id_temp, "+i+"_countryform_id_temp");
|
336 |
+
|
337 |
+
var field_name = document.createElement('label');
|
338 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
339 |
+
field_name.innerHTML = "Fields name ";
|
340 |
+
|
341 |
+
var field_name_text = document.createElement('input');
|
342 |
+
field_name_text.setAttribute("type", "text");
|
343 |
+
field_name_text.setAttribute("id", "field_name");
|
344 |
+
field_name_text.setAttribute("disabled", "disabled");
|
345 |
+
field_name_text.setAttribute("style", "width:350px");
|
346 |
+
field_name_text.setAttribute("value", i+"_street1form_id_temp, "+i+"_street2form_id_temp, "+i+"_cityform_id_temp, "+i+"_stateform_id_temp, "+i+"_postalform_id_temp, "+i+"_countryform_id_temp");
|
347 |
+
|
348 |
+
edit_main_td0.appendChild(field_id);
|
349 |
+
edit_main_td0.appendChild(field_id_text);
|
350 |
+
edit_main_td0.appendChild(br);
|
351 |
+
edit_main_td0.appendChild(field_name);
|
352 |
+
edit_main_td0.appendChild(field_name_text);
|
353 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
354 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
355 |
+
break;
|
356 |
+
}
|
357 |
+
|
358 |
+
case 'type_name':
|
359 |
+
{
|
360 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
361 |
+
|
362 |
+
var edit_main_tr0 = document.createElement('tr');
|
363 |
+
edit_main_tr0.setAttribute("valing", "top");
|
364 |
+
|
365 |
+
var edit_main_td0 = document.createElement('td');
|
366 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
367 |
+
edit_main_td0.setAttribute("colspan", "2");
|
368 |
+
|
369 |
+
var br = document.createElement('br');
|
370 |
+
|
371 |
+
var field_id = document.createElement('label');
|
372 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
373 |
+
field_id.innerHTML = "Fields id ";
|
374 |
+
|
375 |
+
|
376 |
+
var field_id_text = document.createElement('input');
|
377 |
+
field_id_text.setAttribute("type", "text");
|
378 |
+
field_id_text.setAttribute("id", "field_id");
|
379 |
+
field_id_text.setAttribute("disabled", "disabled");
|
380 |
+
field_id_text.setAttribute("style", "width:350px");
|
381 |
+
field_id_text.setAttribute("value", i+"_element_firstform_id_temp, "+i+"_element_lastform_id_temp");
|
382 |
+
|
383 |
+
var field_name = document.createElement('label');
|
384 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
385 |
+
field_name.innerHTML = "Fields name ";
|
386 |
+
|
387 |
+
var field_name_text = document.createElement('input');
|
388 |
+
field_name_text.setAttribute("type", "text");
|
389 |
+
field_name_text.setAttribute("id", "field_name");
|
390 |
+
field_name_text.setAttribute("disabled", "disabled");
|
391 |
+
field_name_text.setAttribute("style", "width:350px");
|
392 |
+
field_name_text.setAttribute("value", i+"_element_firstform_id_temp, "+i+"_element_lastform_id_temp");
|
393 |
+
|
394 |
+
edit_main_td0.appendChild(field_id);
|
395 |
+
edit_main_td0.appendChild(field_id_text);
|
396 |
+
edit_main_td0.appendChild(br);
|
397 |
+
edit_main_td0.appendChild(field_name);
|
398 |
+
edit_main_td0.appendChild(field_name_text);
|
399 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
400 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
401 |
+
break;
|
402 |
+
}
|
403 |
+
|
404 |
+
case 'type_radio':
|
405 |
+
{
|
406 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
407 |
+
|
408 |
+
var edit_main_tr0 = document.createElement('tr');
|
409 |
+
edit_main_tr0.setAttribute("valing", "top");
|
410 |
+
|
411 |
+
var edit_main_td0 = document.createElement('td');
|
412 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
413 |
+
edit_main_td0.setAttribute("colspan", "2");
|
414 |
+
|
415 |
+
var br = document.createElement('br');
|
416 |
+
|
417 |
+
var field_id = document.createElement('label');
|
418 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
419 |
+
field_id.innerHTML = "Fields id ";
|
420 |
+
|
421 |
+
|
422 |
+
var field_id_text = document.createElement('input');
|
423 |
+
field_id_text.setAttribute("type", "text");
|
424 |
+
field_id_text.setAttribute("id", "field_id");
|
425 |
+
field_id_text.setAttribute("disabled", "disabled");
|
426 |
+
field_id_text.setAttribute("style", "width:350px");
|
427 |
+
field_id_text.setAttribute("value", '');
|
428 |
+
|
429 |
+
var field_name = document.createElement('label');
|
430 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
431 |
+
field_name.innerHTML = "Fields name ";
|
432 |
+
|
433 |
+
var field_name_text = document.createElement('input');
|
434 |
+
field_name_text.setAttribute("type", "text");
|
435 |
+
field_name_text.setAttribute("id", "field_name");
|
436 |
+
field_name_text.setAttribute("disabled", "disabled");
|
437 |
+
field_name_text.setAttribute("style", "width:350px");
|
438 |
+
field_name_text.setAttribute("value", '');
|
439 |
+
|
440 |
+
edit_main_td0.appendChild(field_id);
|
441 |
+
edit_main_td0.appendChild(field_id_text);
|
442 |
+
edit_main_td0.appendChild(br);
|
443 |
+
edit_main_td0.appendChild(field_name);
|
444 |
+
edit_main_td0.appendChild(field_name_text);
|
445 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
446 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
447 |
+
refresh_id_name(i, type);
|
448 |
+
break;
|
449 |
+
}
|
450 |
+
|
451 |
+
case 'type_checkbox':
|
452 |
+
{
|
453 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
454 |
+
|
455 |
+
var edit_main_tr0 = document.createElement('tr');
|
456 |
+
edit_main_tr0.setAttribute("valing", "top");
|
457 |
+
|
458 |
+
var edit_main_td0 = document.createElement('td');
|
459 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
460 |
+
edit_main_td0.setAttribute("colspan", "2");
|
461 |
+
|
462 |
+
var br = document.createElement('br');
|
463 |
+
|
464 |
+
var field_id = document.createElement('label');
|
465 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
466 |
+
field_id.innerHTML = "Fields id ";
|
467 |
+
|
468 |
+
|
469 |
+
var field_id_text = document.createElement('input');
|
470 |
+
field_id_text.setAttribute("type", "text");
|
471 |
+
field_id_text.setAttribute("id", "field_id");
|
472 |
+
field_id_text.setAttribute("disabled", "disabled");
|
473 |
+
field_id_text.setAttribute("style", "width:350px");
|
474 |
+
field_id_text.setAttribute("value", '');
|
475 |
+
|
476 |
+
var field_name = document.createElement('label');
|
477 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
478 |
+
field_name.innerHTML = "Fields name ";
|
479 |
+
|
480 |
+
var field_name_text = document.createElement('input');
|
481 |
+
field_name_text.setAttribute("type", "text");
|
482 |
+
field_name_text.setAttribute("id", "field_name");
|
483 |
+
field_name_text.setAttribute("disabled", "disabled");
|
484 |
+
field_name_text.setAttribute("style", "width:350px");
|
485 |
+
field_name_text.setAttribute("value", '');
|
486 |
+
|
487 |
+
edit_main_td0.appendChild(field_id);
|
488 |
+
edit_main_td0.appendChild(field_id_text);
|
489 |
+
edit_main_td0.appendChild(br);
|
490 |
+
edit_main_td0.appendChild(field_name);
|
491 |
+
edit_main_td0.appendChild(field_name_text);
|
492 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
493 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
494 |
+
refresh_id_name(i, type);
|
495 |
+
break;
|
496 |
+
}
|
497 |
+
|
498 |
+
case 'type_time':
|
499 |
+
{
|
500 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
501 |
+
|
502 |
+
var edit_main_tr0 = document.createElement('tr');
|
503 |
+
edit_main_tr0.setAttribute("valing", "top");
|
504 |
+
|
505 |
+
var edit_main_td0 = document.createElement('td');
|
506 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
507 |
+
var edit_main_td0_1 = document.createElement('td');
|
508 |
+
edit_main_td0_1.style.cssText = "padding-top:10px";
|
509 |
+
|
510 |
+
var br = document.createElement('br');
|
511 |
+
var br1 = document.createElement('br');
|
512 |
+
|
513 |
+
var field_id = document.createElement('label');
|
514 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
515 |
+
field_id.innerHTML = "Fields id ";
|
516 |
+
|
517 |
+
|
518 |
+
var field_id_text = document.createElement('input');
|
519 |
+
field_id_text.setAttribute("size", "50");
|
520 |
+
field_id_text.setAttribute("type", "text");
|
521 |
+
field_id_text.setAttribute("id", "field_id");
|
522 |
+
field_id_text.setAttribute("disabled", "disabled");
|
523 |
+
field_id_text.setAttribute("value", i+"_hhform_id_temp, "+i+"_mmform_id_temp, "+i+"_ssform_id_temp");
|
524 |
+
|
525 |
+
var field_name = document.createElement('label');
|
526 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
527 |
+
field_name.innerHTML = "Fields name ";
|
528 |
+
|
529 |
+
var field_name_text = document.createElement('input');
|
530 |
+
field_name_text.setAttribute("size", "50");
|
531 |
+
field_name_text.setAttribute("type", "text");
|
532 |
+
field_name_text.setAttribute("id", "field_name");
|
533 |
+
field_name_text.setAttribute("disabled", "disabled");
|
534 |
+
field_name_text.setAttribute("value", i+"_hhform_id_temp, "+i+"_mmform_id_temp, "+i+"_ssform_id_temp");
|
535 |
+
|
536 |
+
edit_main_td0.appendChild(field_id);
|
537 |
+
edit_main_td0.appendChild(br1);
|
538 |
+
edit_main_td0.appendChild(field_name);
|
539 |
+
edit_main_td0_1.appendChild(field_id_text);
|
540 |
+
edit_main_td0_1.appendChild(br);
|
541 |
+
edit_main_td0_1.appendChild(field_name_text);
|
542 |
+
|
543 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
544 |
+
edit_main_tr0.appendChild(edit_main_td0_1);
|
545 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
546 |
+
break;
|
547 |
+
}
|
548 |
+
|
549 |
+
case 'type_date_fields':
|
550 |
+
{
|
551 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
552 |
+
|
553 |
+
var edit_main_tr0 = document.createElement('tr');
|
554 |
+
edit_main_tr0.setAttribute("valing", "top");
|
555 |
+
|
556 |
+
var edit_main_td0 = document.createElement('td');
|
557 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
558 |
+
edit_main_td0.setAttribute("colspan", "2");
|
559 |
+
|
560 |
+
var br = document.createElement('br');
|
561 |
+
|
562 |
+
var field_id = document.createElement('label');
|
563 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
564 |
+
field_id.innerHTML = "Fields id ";
|
565 |
+
|
566 |
+
|
567 |
+
var field_id_text = document.createElement('input');
|
568 |
+
field_id_text.setAttribute("size", "50");
|
569 |
+
field_id_text.setAttribute("type", "text");
|
570 |
+
field_id_text.setAttribute("id", "field_id");
|
571 |
+
field_id_text.setAttribute("disabled", "disabled");
|
572 |
+
field_id_text.setAttribute("value", i+"_dayform_id_temp, "+i+"_monthform_id_temp, "+i+"_yearform_id_temp");
|
573 |
+
|
574 |
+
var field_name = document.createElement('label');
|
575 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
576 |
+
field_name.innerHTML = "Fields name ";
|
577 |
+
|
578 |
+
var field_name_text = document.createElement('input');
|
579 |
+
field_name_text.setAttribute("size", "50");
|
580 |
+
field_name_text.setAttribute("type", "text");
|
581 |
+
field_name_text.setAttribute("id", "field_name");
|
582 |
+
field_name_text.setAttribute("disabled", "disabled");
|
583 |
+
field_name_text.setAttribute("value", i+"_dayform_id_temp, "+i+"_monthform_id_temp, "+i+"_yearform_id_temp");
|
584 |
+
|
585 |
+
edit_main_td0.appendChild(field_id);
|
586 |
+
edit_main_td0.appendChild(field_id_text);
|
587 |
+
edit_main_td0.appendChild(br);
|
588 |
+
edit_main_td0.appendChild(field_name);
|
589 |
+
edit_main_td0.appendChild(field_name_text);
|
590 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
591 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
592 |
+
break;
|
593 |
+
}
|
594 |
+
|
595 |
+
case 'type_captcha':
|
596 |
+
{
|
597 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
598 |
+
|
599 |
+
var edit_main_tr0 = document.createElement('tr');
|
600 |
+
edit_main_tr0.setAttribute("valing", "top");
|
601 |
+
|
602 |
+
var edit_main_td0 = document.createElement('td');
|
603 |
+
edit_main_td0.style.cssText = "padding-top:10px";
|
604 |
+
|
605 |
+
var edit_main_td0_1 = document.createElement('td');
|
606 |
+
edit_main_td0_1.style.cssText = "padding-top:10px";
|
607 |
+
|
608 |
+
var br = document.createElement('br');
|
609 |
+
var br1 = document.createElement('br');
|
610 |
+
|
611 |
+
var field_id = document.createElement('label');
|
612 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
613 |
+
field_id.innerHTML = "Fields id ";
|
614 |
+
|
615 |
+
|
616 |
+
var field_id_text = document.createElement('input');
|
617 |
+
field_id_text.setAttribute("size", "50");
|
618 |
+
field_id_text.setAttribute("type", "text");
|
619 |
+
field_id_text.setAttribute("id", "field_id");
|
620 |
+
field_id_text.setAttribute("disabled", "disabled");
|
621 |
+
field_id_text.setAttribute("value", "wd_captcha_inputform_id_temp");
|
622 |
+
|
623 |
+
var field_name = document.createElement('label');
|
624 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
625 |
+
field_name.innerHTML = "Fields name ";
|
626 |
+
|
627 |
+
var field_name_text = document.createElement('input');
|
628 |
+
field_name_text.setAttribute("size", "50");
|
629 |
+
field_name_text.setAttribute("type", "text");
|
630 |
+
field_name_text.setAttribute("id", "field_name");
|
631 |
+
field_name_text.setAttribute("disabled", "disabled");
|
632 |
+
field_name_text.setAttribute("value", "captcha_inputform_id_temp");
|
633 |
+
|
634 |
+
edit_main_td0.appendChild(field_id);
|
635 |
+
edit_main_td0.appendChild(br1);
|
636 |
+
edit_main_td0.appendChild(field_name);
|
637 |
+
edit_main_td0_1.appendChild(field_id_text);
|
638 |
+
edit_main_td0_1.appendChild(br);
|
639 |
+
edit_main_td0_1.appendChild(field_name_text);
|
640 |
+
edit_main_tr0.appendChild(edit_main_td0);
|
641 |
+
edit_main_tr0.appendChild(edit_main_td0_1);
|
642 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
643 |
+
break;
|
644 |
+
}
|
645 |
+
case 'type_spinner': {
|
646 |
+
var edit_main_table = document.getElementById("edit_main_table");
|
647 |
+
var edit_main_tr0 = document.createElement('tr');
|
648 |
edit_main_tr0.setAttribute("valing", "top");
|
|
|
649 |
var edit_main_td0 = document.createElement('td');
|
650 |
edit_main_td0.style.cssText = "padding-top:10px";
|
|
|
651 |
var edit_main_td0_1 = document.createElement('td');
|
652 |
edit_main_td0_1.style.cssText = "padding-top:10px";
|
|
|
653 |
var br = document.createElement('br');
|
654 |
var br1 = document.createElement('br');
|
|
|
655 |
var field_id = document.createElement('label');
|
656 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
657 |
field_id.innerHTML = "Field id ";
|
|
|
|
|
658 |
var field_id_text = document.createElement('input');
|
659 |
field_id_text.setAttribute("size", "50");
|
660 |
field_id_text.setAttribute("type", "text");
|
661 |
field_id_text.setAttribute("disabled", "disabled");
|
662 |
+
field_id_text.setAttribute("value", i+"_elementform_id_temp");
|
|
|
663 |
var field_name = document.createElement('label');
|
664 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
665 |
field_name.innerHTML = "Field name ";
|
|
|
666 |
var field_name_text = document.createElement('input');
|
667 |
field_name_text.setAttribute("size", "50");
|
668 |
field_name_text.setAttribute("type", "text");
|
669 |
field_name_text.setAttribute("disabled", "disabled");
|
670 |
+
field_name_text.setAttribute("value", i+"_elementform_id_temp");
|
|
|
671 |
edit_main_td0.appendChild(field_id);
|
672 |
edit_main_td0.appendChild(br);
|
673 |
edit_main_td0.appendChild(field_name);
|
|
|
674 |
edit_main_td0_1.appendChild(field_id_text);
|
675 |
edit_main_td0_1.appendChild(br1);
|
676 |
edit_main_td0_1.appendChild(field_name_text);
|
677 |
edit_main_tr0.appendChild(edit_main_td0);
|
678 |
edit_main_tr0.appendChild(edit_main_td0_1);
|
679 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
680 |
break;
|
|
|
|
|
|
|
|
|
|
|
681 |
|
682 |
+
}
|
683 |
+
case 'type_slider': {
|
684 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
685 |
+
var edit_main_tr0 = document.createElement('tr');
|
686 |
edit_main_tr0.setAttribute("valing", "top");
|
|
|
687 |
var edit_main_td0 = document.createElement('td');
|
688 |
edit_main_td0.style.cssText = "padding-top:10px";
|
689 |
+
var edit_main_td0_1 = document.createElement('td');
|
690 |
+
edit_main_td0_1.style.cssText = "padding-top:10px";
|
691 |
var br = document.createElement('br');
|
692 |
+
var br1 = document.createElement('br');
|
693 |
var field_id = document.createElement('label');
|
694 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
695 |
+
field_id.innerHTML = "Field id ";
|
|
|
|
|
696 |
var field_id_text = document.createElement('input');
|
697 |
+
field_id_text.setAttribute("size", "50");
|
698 |
field_id_text.setAttribute("type", "text");
|
|
|
699 |
field_id_text.setAttribute("disabled", "disabled");
|
700 |
+
field_id_text.setAttribute("value", i+"_elementform_id_temp");
|
|
|
|
|
701 |
var field_name = document.createElement('label');
|
702 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
703 |
+
field_name.innerHTML = "Field name ";
|
|
|
704 |
var field_name_text = document.createElement('input');
|
705 |
+
field_name_text.setAttribute("size", "50");
|
706 |
field_name_text.setAttribute("type", "text");
|
|
|
707 |
field_name_text.setAttribute("disabled", "disabled");
|
708 |
+
field_name_text.setAttribute("value", i+"_elementform_id_temp");
|
|
|
|
|
709 |
edit_main_td0.appendChild(field_id);
|
|
|
710 |
edit_main_td0.appendChild(br);
|
711 |
edit_main_td0.appendChild(field_name);
|
712 |
+
edit_main_td0_1.appendChild(field_id_text);
|
713 |
+
edit_main_td0_1.appendChild(br1);
|
714 |
+
edit_main_td0_1.appendChild(field_name_text);
|
715 |
edit_main_tr0.appendChild(edit_main_td0);
|
716 |
+
edit_main_tr0.appendChild(edit_main_td0_1);
|
717 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
718 |
break;
|
|
|
|
|
|
|
|
|
|
|
719 |
|
720 |
+
}
|
721 |
+
case 'type_range': {
|
722 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
723 |
+
var edit_main_tr0 = document.createElement('tr');
|
724 |
edit_main_tr0.setAttribute("valing", "top");
|
|
|
725 |
var edit_main_td0 = document.createElement('td');
|
726 |
edit_main_td0.style.cssText = "padding-top:10px";
|
727 |
edit_main_td0.setAttribute("colspan", "2");
|
|
|
728 |
var br = document.createElement('br');
|
|
|
729 |
var field_id = document.createElement('label');
|
730 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
731 |
field_id.innerHTML = "Fields id ";
|
|
|
|
|
732 |
var field_id_text = document.createElement('input');
|
733 |
field_id_text.setAttribute("type", "text");
|
734 |
field_id_text.setAttribute("id", "field_id");
|
735 |
field_id_text.setAttribute("disabled", "disabled");
|
736 |
field_id_text.setAttribute("style", "width:350px");
|
737 |
+
field_id_text.setAttribute("value", '');
|
|
|
738 |
var field_name = document.createElement('label');
|
739 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
740 |
field_name.innerHTML = "Fields name ";
|
|
|
741 |
var field_name_text = document.createElement('input');
|
742 |
field_name_text.setAttribute("type", "text");
|
743 |
field_name_text.setAttribute("id", "field_name");
|
744 |
field_name_text.setAttribute("disabled", "disabled");
|
745 |
field_name_text.setAttribute("style", "width:350px");
|
746 |
+
field_name_text.setAttribute("value", '');
|
|
|
747 |
edit_main_td0.appendChild(field_id);
|
748 |
edit_main_td0.appendChild(field_id_text);
|
749 |
edit_main_td0.appendChild(br);
|
750 |
edit_main_td0.appendChild(field_name);
|
751 |
edit_main_td0.appendChild(field_name_text);
|
752 |
edit_main_tr0.appendChild(edit_main_td0);
|
753 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
754 |
+
refresh_id_name(i, type);
|
755 |
break;
|
|
|
|
|
|
|
|
|
|
|
756 |
|
757 |
+
}
|
758 |
+
case 'type_grading': {
|
759 |
+
var edit_main_table=document.getElementById("edit_main_table");
|
760 |
+
var edit_main_tr0 = document.createElement('tr');
|
761 |
edit_main_tr0.setAttribute("valing", "top");
|
|
|
762 |
var edit_main_td0 = document.createElement('td');
|
763 |
edit_main_td0.style.cssText = "padding-top:10px";
|
764 |
edit_main_td0.setAttribute("colspan", "2");
|
|
|
765 |
var br = document.createElement('br');
|
|
|
766 |
var field_id = document.createElement('label');
|
767 |
+
field_id.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:27px";
|
768 |
field_id.innerHTML = "Fields id ";
|
|
|
|
|
769 |
var field_id_text = document.createElement('input');
|
770 |
field_id_text.setAttribute("type", "text");
|
771 |
field_id_text.setAttribute("id", "field_id");
|
772 |
field_id_text.setAttribute("disabled", "disabled");
|
773 |
field_id_text.setAttribute("style", "width:350px");
|
774 |
+
field_id_text.setAttribute("value", '');
|
|
|
775 |
var field_name = document.createElement('label');
|
776 |
+
field_name.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px; margin-right:3px";
|
777 |
field_name.innerHTML = "Fields name ";
|
|
|
778 |
var field_name_text = document.createElement('input');
|
779 |
field_name_text.setAttribute("type", "text");
|
780 |
field_name_text.setAttribute("id", "field_name");
|
781 |
field_name_text.setAttribute("disabled", "disabled");
|
782 |
field_name_text.setAttribute("style", "width:350px");
|
783 |
field_name_text.setAttribute("value", '');
|
|
|
784 |
edit_main_td0.appendChild(field_id);
|
785 |
edit_main_td0.appendChild(field_id_text);
|
786 |
edit_main_td0.appendChild(br);
|
787 |
edit_main_td0.appendChild(field_name);
|
788 |
edit_main_td0.appendChild(field_name_text);
|
789 |
edit_main_tr0.appendChild(edit_main_td0);
|
790 |
+
edit_main_table.insertBefore(edit_main_tr0,edit_main_table.childNodes[0]);
|
791 |
refresh_id_name(i, type);
|
792 |
break;
|
793 |
+
}
|
794 |
+
}
|
795 |
+
}
|
|
|
|
|
796 |
|
|
|
|
|
797 |
|
798 |
+
function refresh_id_name(i, type) {
|
799 |
+
switch (type) {
|
800 |
+
case 'type_radio': {
|
801 |
+
document.getElementById('field_id').value = '';
|
802 |
+
for (k = 0; k < 50; k++) {
|
803 |
+
if (document.getElementById(i+'_elementform_id_temp' + k)) {
|
804 |
+
document.getElementById('field_id').value += i + '_elementform_id_temp' + k + ', ';
|
805 |
+
}
|
806 |
+
}
|
807 |
+
a = document.getElementById('field_id').value.slice(0, -2);
|
808 |
+
document.getElementById('field_id').value = a;
|
809 |
+
document.getElementById('field_name').value = i + '_element';
|
810 |
+
|
811 |
+
break;
|
812 |
+
}
|
813 |
+
case 'type_checkbox': {
|
814 |
+
document.getElementById('field_id').value = '';
|
815 |
+
for (k = 0; k < 50; k++) {
|
816 |
+
if (document.getElementById(i + '_elementform_id_temp' + k)) {
|
817 |
+
document.getElementById('field_id').value += i + '_elementform_id_temp' + k + ', ';
|
818 |
+
}
|
819 |
+
}
|
820 |
+
a = document.getElementById('field_id').value.slice(0, -2);
|
821 |
+
document.getElementById('field_id').value = a;
|
822 |
+
document.getElementById('field_name').value = a;
|
823 |
+
break;
|
824 |
+
|
825 |
+
}
|
826 |
+
case 'type_range': {
|
827 |
+
document.getElementById('field_id').value = '';
|
828 |
+
for (k = 0; k < 2; k++) {
|
829 |
+
document.getElementById('field_id').value += i + '_elementform_id_temp' + k + ', ';
|
830 |
+
}
|
831 |
+
a = document.getElementById('field_id').value.slice(0, -2);
|
832 |
+
document.getElementById('field_id').value = a;
|
833 |
+
document.getElementById('field_name').value = a;
|
834 |
+
break;
|
835 |
+
|
836 |
+
}
|
837 |
+
case 'type_grading': {
|
838 |
+
document.getElementById('field_id').value = '';
|
839 |
+
for (k = 0; k < 50; k++) {
|
840 |
+
if (document.getElementById(i + '_elementform_id_temp' + k)) {
|
841 |
+
document.getElementById('field_id').value += i + '_elementform_id_temp' + k + ', ';
|
842 |
+
}
|
843 |
+
}
|
844 |
+
a = document.getElementById('field_id').value.slice(0, -2);
|
845 |
+
document.getElementById('field_id').value = a;
|
846 |
+
document.getElementById('field_name').value = a;
|
847 |
+
break;
|
848 |
+
}
|
849 |
+
}
|
850 |
+
}
|
851 |
|
|
|
852 |
|
|
|
|
|
|
|
853 |
|
854 |
+
function add_attr(i, type)
|
855 |
+
{
|
856 |
+
|
857 |
+
var el_attr_table=document.getElementById('attributes');
|
858 |
+
j=parseInt(el_attr_table.lastChild.getAttribute('idi'))+1;
|
859 |
+
w_attr_name[j]="attribute";
|
860 |
+
w_attr_value[j]="value";
|
861 |
+
var el_attr_tr = document.createElement('tr');
|
862 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
863 |
+
el_attr_tr.setAttribute("idi", j);
|
864 |
+
var el_attr_td_name = document.createElement('td');
|
865 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
866 |
+
var el_attr_td_value = document.createElement('td');
|
867 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
868 |
+
|
869 |
+
var el_attr_td_X = document.createElement('td');
|
870 |
+
var el_attr_name = document.createElement('input');
|
871 |
+
el_attr_name.setAttribute("type", "text");
|
872 |
+
el_attr_name.style.cssText = "width:100px";
|
873 |
+
el_attr_name.setAttribute("value", w_attr_name[j]);
|
874 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
875 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name('"+i+"', this, '"+type+"')");
|
876 |
+
|
877 |
+
var el_attr_value = document.createElement('input');
|
878 |
+
el_attr_value.setAttribute("type", "text");
|
879 |
+
el_attr_value.style.cssText = "width:100px";
|
880 |
+
el_attr_value.setAttribute("value", w_attr_value[j]);
|
881 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
882 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value('"+i+"', "+j+", '"+type+"')");
|
883 |
+
|
884 |
+
var el_attr_remove = document.createElement('img');
|
885 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
886 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
887 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
888 |
+
el_attr_remove.setAttribute("align", 'top');
|
889 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", '"+type+"')");
|
890 |
+
el_attr_table.appendChild(el_attr_tr);
|
891 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
892 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
893 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
894 |
+
el_attr_td_name.appendChild(el_attr_name);
|
895 |
+
el_attr_td_value.appendChild(el_attr_value);
|
896 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
897 |
+
refresh_attr(i, type);
|
898 |
+
}
|
899 |
|
900 |
+
function change_attribute_value(id, x, type)
|
901 |
+
{
|
902 |
+
if(!document.getElementById("attr_name"+x).value)
|
903 |
+
{
|
904 |
+
alert('The name of the attribute is required.');
|
905 |
+
return
|
906 |
+
}
|
907 |
+
|
908 |
+
if(document.getElementById("attr_name"+x).value.toLowerCase()=="style")
|
909 |
+
{
|
910 |
+
alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.');
|
911 |
+
return
|
912 |
+
}
|
913 |
+
|
914 |
+
refresh_attr(id, type);
|
915 |
+
}
|
916 |
|
917 |
+
function change_attribute_name(id, x, type)
|
918 |
+
{
|
919 |
+
value=x.value;
|
920 |
+
if(!value)
|
921 |
+
{
|
922 |
+
alert('The name of the attribute is required.');
|
923 |
+
return;
|
924 |
+
}
|
925 |
+
|
926 |
+
if(value.toLowerCase()=="style")
|
927 |
+
{
|
928 |
+
alert('Sorry, you cannot add a style attribute here. Use "Class name" instead.');
|
929 |
+
return;
|
930 |
+
}
|
931 |
+
|
932 |
+
if(value==parseInt(value))
|
933 |
+
{
|
934 |
+
alert('The name of the attribute cannot be a number.');
|
935 |
+
return;
|
936 |
+
}
|
937 |
+
|
938 |
+
if(value.indexOf(" ")!=-1)
|
939 |
+
{
|
940 |
+
var regExp = /\s+/g;
|
941 |
+
value=value.replace(regExp,'');
|
942 |
+
x.value=value;
|
943 |
+
alert("The name of the attribute cannot contain a space.");
|
944 |
+
refresh_attr(id, type);
|
945 |
+
return;
|
946 |
+
}
|
947 |
+
|
948 |
+
refresh_attr(id, type);
|
949 |
+
|
950 |
+
}
|
951 |
|
952 |
+
function remove_attr(id, el_id,type)
|
953 |
+
{
|
954 |
+
tr=document.getElementById("attr_row_"+id);
|
955 |
+
tr.parentNode.removeChild(tr);
|
956 |
+
refresh_attr(el_id, type);
|
957 |
+
}
|
958 |
|
959 |
+
function change_attributes(id, attr)
|
960 |
+
{
|
961 |
+
|
962 |
+
var div = document.createElement('div');
|
963 |
+
var element=document.getElementById(id);
|
964 |
+
element.setAttribute(attr, '');
|
965 |
+
}
|
|
|
|
|
|
|
966 |
|
967 |
+
function add_button(i)
|
968 |
+
{
|
969 |
+
edit_main_td4=document.getElementById('buttons');
|
970 |
+
if(edit_main_td4.lastChild)
|
971 |
+
j=parseInt(edit_main_td4.lastChild.getAttribute("idi"))+1;
|
972 |
+
else
|
973 |
+
j=1;
|
974 |
+
var table_button = document.createElement('table');
|
975 |
+
|
976 |
+
table_button.setAttribute("width", "100%");
|
977 |
+
table_button.setAttribute("border", "0");
|
978 |
+
table_button.setAttribute("id", "button_opt"+j);
|
979 |
+
table_button.setAttribute("idi", j);
|
980 |
+
var tr_button = document.createElement('tr');
|
981 |
+
var tr_hr = document.createElement('tr');
|
982 |
+
|
983 |
+
var td_button = document.createElement('td');
|
984 |
+
var td_X = document.createElement('td');
|
985 |
+
var td_hr = document.createElement('td');
|
986 |
+
td_hr.setAttribute("colspan", "3");
|
987 |
+
|
988 |
+
tr_hr.appendChild(td_hr);
|
989 |
+
tr_button.appendChild(td_button);
|
990 |
+
tr_button.appendChild(td_X);
|
991 |
+
table_button.appendChild(tr_hr);
|
992 |
+
table_button.appendChild(tr_button);
|
993 |
+
|
994 |
+
var br1 = document.createElement('br');
|
995 |
+
|
996 |
+
var hr = document.createElement('hr');
|
997 |
+
|
998 |
+
hr.setAttribute("id", "br"+j);
|
999 |
+
|
1000 |
+
|
1001 |
+
|
1002 |
+
|
1003 |
+
var el_title_label = document.createElement('label');
|
1004 |
+
|
1005 |
+
el_title_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
1006 |
+
|
1007 |
+
el_title_label.innerHTML = "Button name";
|
1008 |
+
|
1009 |
+
var el_title = document.createElement('input');
|
1010 |
+
|
1011 |
+
el_title.setAttribute("id", "el_title"+j);
|
1012 |
+
|
1013 |
+
el_title.setAttribute("type", "text");
|
1014 |
+
|
1015 |
+
el_title.setAttribute("value", "Button");
|
1016 |
+
|
1017 |
+
el_title.style.cssText = "width:100px; margin-left:43px; padding:0; border-width: 1px";
|
1018 |
+
|
1019 |
+
el_title.setAttribute("onKeyUp", "change_label('"+i+"_elementform_id_temp"+j+"', this.value);");
|
1020 |
+
|
1021 |
+
|
1022 |
+
|
1023 |
+
var el_func_label = document.createElement('label');
|
1024 |
+
|
1025 |
+
el_func_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
1026 |
+
|
1027 |
+
el_func_label.innerHTML = "OnClick function";
|
1028 |
+
|
1029 |
+
var el_func = document.createElement('input');
|
1030 |
+
|
1031 |
+
el_func.setAttribute("id", "el_func"+j);
|
1032 |
+
|
1033 |
+
el_func.setAttribute("type", "text");
|
1034 |
+
|
1035 |
+
el_func.setAttribute("value", "");
|
1036 |
+
|
1037 |
+
el_func.style.cssText = "width:100px; margin-left:20px;; padding:0; border-width: 1px";
|
1038 |
+
|
1039 |
+
el_func.setAttribute("onKeyUp", "change_func('"+i+"_elementform_id_temp"+j+"', this.value);");
|
1040 |
+
|
1041 |
+
var el_choices_remove = document.createElement('img');
|
1042 |
+
|
1043 |
+
el_choices_remove.setAttribute("id", "el_button"+j+"_remove");
|
1044 |
+
|
1045 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
1046 |
+
|
1047 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
1048 |
+
|
1049 |
+
el_choices_remove.setAttribute("align", 'top');
|
1050 |
+
|
1051 |
+
el_choices_remove.setAttribute("onClick", "remove_button("+j+","+i+")");
|
1052 |
+
|
1053 |
+
|
1054 |
+
|
1055 |
+
td_hr.appendChild(hr);
|
1056 |
+
|
1057 |
+
td_button.appendChild(el_title_label);
|
1058 |
+
|
1059 |
+
td_button.appendChild(el_title);
|
1060 |
+
td_button.appendChild(br1);
|
1061 |
+
td_button.appendChild(el_func_label);
|
1062 |
+
|
1063 |
+
td_button.appendChild(el_func);
|
1064 |
+
td_X.appendChild(el_choices_remove);
|
1065 |
+
edit_main_td4.appendChild(table_button);
|
1066 |
+
|
1067 |
+
element='button'; type='button';
|
1068 |
+
|
1069 |
+
td2=document.getElementById(i+"_element_sectionform_id_temp");
|
1070 |
+
|
1071 |
+
var adding = document.createElement(element);
|
1072 |
+
adding.setAttribute("type", type);
|
1073 |
+
adding.setAttribute("id", i+"_elementform_id_temp"+j);
|
1074 |
+
adding.setAttribute("name", i+"_elementform_id_temp"+j);
|
1075 |
+
adding.setAttribute("value", "Button");
|
1076 |
+
adding.innerHTML = "Button";
|
1077 |
+
adding.setAttribute("onclick", "");
|
1078 |
+
|
1079 |
+
|
1080 |
+
td2.appendChild(adding);
|
1081 |
+
|
1082 |
+
refresh_attr(i,'type_checkbox');
|
1083 |
+
}
|
1084 |
|
1085 |
+
function remove_button(j,i)
|
1086 |
+
{
|
1087 |
+
table=document.getElementById('button_opt'+j);
|
1088 |
+
button=document.getElementById(i+'_elementform_id_temp'+j);
|
1089 |
+
table.parentNode.removeChild(table);
|
1090 |
+
button.parentNode.removeChild(button);
|
1091 |
+
}
|
1092 |
|
1093 |
+
function change_date_format(value, id)
|
1094 |
+
{
|
1095 |
+
input_p=document.getElementById(id+'_buttonform_id_temp');
|
1096 |
+
input_p.setAttribute("onclick", "return showCalendar('"+id+"_elementform_id_temp' , '"+value+"')");
|
1097 |
+
input_p.setAttribute("format", value);
|
1098 |
+
}
|
1099 |
|
1100 |
+
function set_send(id)
|
1101 |
+
{
|
1102 |
+
if(document.getElementById(id).value=="yes")
|
1103 |
+
document.getElementById(id).setAttribute("value", "no")
|
1104 |
+
else
|
1105 |
+
document.getElementById(id).setAttribute("value", "yes")
|
1106 |
+
}
|
1107 |
|
1108 |
+
function change_class(x, id) {
|
1109 |
+
if(document.getElementById(id+'_label_sectionform_id_temp'))
|
1110 |
+
document.getElementById(id+'_label_sectionform_id_temp').setAttribute("class",x);
|
1111 |
+
if(document.getElementById(id+'_element_sectionform_id_temp'))
|
1112 |
+
document.getElementById(id+'_element_sectionform_id_temp').setAttribute("class",x);
|
1113 |
+
}
|
1114 |
|
1115 |
+
function set_required(id)
|
1116 |
+
{
|
1117 |
+
if(document.getElementById(id+"form_id_temp").value=="yes")
|
1118 |
+
{
|
1119 |
+
document.getElementById(id+"form_id_temp").setAttribute("value", "no");
|
1120 |
+
document.getElementById(id+"_elementform_id_temp").innerHTML="";
|
1121 |
+
}
|
1122 |
+
else
|
1123 |
+
{
|
1124 |
+
document.getElementById(id+"form_id_temp").setAttribute("value", "yes")
|
1125 |
+
document.getElementById(id+"_elementform_id_temp").innerHTML=" *";
|
1126 |
+
}
|
1127 |
+
}
|
1128 |
|
1129 |
+
function disable_fields(id, field) {
|
1130 |
+
var div = document.getElementById(id + "_div_address");
|
1131 |
+
if (field) {
|
1132 |
+
if (document.getElementById("el_"+field).checked==true) {
|
1133 |
+
document.getElementById(id+"_disable_fieldsform_id_temp").setAttribute(field, "yes");
|
1134 |
+
}
|
1135 |
+
else {
|
1136 |
+
document.getElementById(id+"_disable_fieldsform_id_temp").setAttribute(field, "no");
|
1137 |
+
}
|
1138 |
+
}
|
1139 |
+
div.innerHTML = '';
|
1140 |
+
var hidden_labels = new Array();
|
1141 |
+
var address_fields = ['street1','street2','city','state','postal','country']
|
1142 |
+
var left_right = 0;
|
1143 |
+
for (l = 0; l < 6; l++) {
|
1144 |
+
if (document.getElementById(id+'_disable_fieldsform_id_temp').getAttribute(address_fields[l])=='no') {
|
1145 |
+
if (address_fields[l]=='street1' || address_fields[l]=='street2') {
|
1146 |
+
var street = document.createElement('input');
|
1147 |
+
street.setAttribute("type", 'text');
|
1148 |
+
street.style.cssText = "width:100%";
|
1149 |
+
street.setAttribute("id", id+"_"+address_fields[l]+"form_id_temp");
|
1150 |
+
street.setAttribute("name", (parseInt(id)+l)+"_"+address_fields[l]+"form_id_temp");
|
1151 |
+
street.setAttribute("onChange", "change_value('"+id+"_"+address_fields[l]+"form_id_temp')");
|
1152 |
+
var street_label = document.createElement('label');
|
1153 |
+
street_label.setAttribute("class", "mini_label");
|
1154 |
+
street_label.setAttribute("id", id+"_mini_label_"+address_fields[l]);
|
1155 |
+
street_label.style.cssText = "display:block;";
|
1156 |
+
street_label.innerHTML=document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1157 |
+
w_mini_labels[l] = document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1158 |
+
var span_addres = document.createElement('span');
|
1159 |
+
span_addres.style.cssText = "float:left; width:100%; padding-bottom: 8px; display:block";
|
1160 |
+
span_addres.appendChild(street);
|
1161 |
+
span_addres.appendChild(street_label);
|
1162 |
+
div.appendChild(span_addres);
|
1163 |
+
}
|
1164 |
+
else {
|
1165 |
+
left_right++;
|
1166 |
+
if (address_fields[l] != 'country') {
|
1167 |
+
var field = document.createElement('input');
|
1168 |
+
field.setAttribute("type", 'text');
|
1169 |
+
field.style.cssText = "width:100%";
|
1170 |
+
field.setAttribute("id", id+"_"+address_fields[l]+"form_id_temp");
|
1171 |
+
field.setAttribute("name", (parseInt(id)+l)+"_"+address_fields[l]+"form_id_temp");
|
1172 |
+
field.setAttribute("onChange", "change_value('"+id+"_"+address_fields[l]+"form_id_temp')");
|
1173 |
+
var field_label = document.createElement('label');
|
1174 |
+
field_label.setAttribute("class", "mini_label");
|
1175 |
+
field_label.setAttribute("id", id+"_mini_label_"+address_fields[l]);
|
1176 |
+
field_label.style.cssText = "display:block;";
|
1177 |
+
field_label.innerHTML=document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1178 |
+
w_mini_labels[l] = document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1179 |
+
}
|
1180 |
+
else {
|
1181 |
+
var field = document.createElement('select');
|
1182 |
+
field.setAttribute("type", 'text');
|
1183 |
+
field.style.cssText = "width:100%";
|
1184 |
+
field.setAttribute("id", id+"_countryform_id_temp");
|
1185 |
+
field.setAttribute("name", (parseInt(id)+l)+"_countryform_id_temp");
|
1186 |
+
field.setAttribute("onChange", "change_value('"+id+"_countryform_id_temp')");
|
1187 |
+
var field_label = document.createElement('label');
|
1188 |
+
field_label.setAttribute("class", "mini_label");
|
1189 |
+
field_label.setAttribute("id", id+"_mini_label_country");
|
1190 |
+
field_label.style.cssText = "display:block;";
|
1191 |
+
field_label.innerHTML=document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1192 |
+
w_mini_labels[l] = document.getElementById('el_'+address_fields[l]+"_label").innerHTML;
|
1193 |
+
var option_ = document.createElement('option');
|
1194 |
+
option_.setAttribute("value", "");
|
1195 |
+
option_.innerHTML = "";
|
1196 |
+
field.appendChild(option_);
|
1197 |
+
coutries=["Afghanistan","Albania", "Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombi","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepa","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"];
|
1198 |
+
for (r = 0; r < coutries.length; r++) {
|
1199 |
+
var option_ = document.createElement('option');
|
1200 |
+
option_.setAttribute("value", coutries[r]);
|
1201 |
+
option_.innerHTML=coutries[r];
|
1202 |
+
field.appendChild(option_);
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
if (left_right % 2 != 0) {
|
1206 |
+
var span_addres = document.createElement('span');
|
1207 |
+
span_addres.style.cssText = "float:left; width:48%; padding-bottom: 8px;";
|
1208 |
+
}
|
1209 |
+
else {
|
1210 |
+
var span_addres = document.createElement('span');
|
1211 |
+
span_addres.style.cssText = "float:right; width:48%; padding-bottom: 8px;";
|
1212 |
+
}
|
1213 |
+
span_addres.appendChild(field);
|
1214 |
+
span_addres.appendChild(field_label);
|
1215 |
+
div.appendChild(span_addres);
|
1216 |
+
}
|
1217 |
+
}
|
1218 |
+
else {
|
1219 |
+
var hidden_field = document.createElement('input');
|
1220 |
+
hidden_field.setAttribute("type", 'hidden');
|
1221 |
+
hidden_field.setAttribute("id", id+"_"+address_fields[l]+"form_id_temp");
|
1222 |
+
hidden_field.setAttribute("value", document.getElementById("el_"+address_fields[l]+"_label").innerHTML);
|
1223 |
+
hidden_field.setAttribute("id_for_label", parseInt(id)+l);
|
1224 |
+
hidden_labels.push(hidden_field);
|
1225 |
+
}
|
1226 |
+
for (k = 0; k < hidden_labels.length; k++) {
|
1227 |
+
div.appendChild(hidden_labels[k]);
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
jQuery(document).ready(function() {
|
1231 |
+
jQuery("label#"+id+"_mini_label_street1").click(function() {
|
1232 |
+
if (jQuery(this).children('input').length == 0) {
|
1233 |
+
var street1 = "<input type='text' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1234 |
+
jQuery(this).html(street1);
|
1235 |
+
jQuery("input.street1").focus();
|
1236 |
+
jQuery("input.street1").blur(function() {
|
1237 |
+
var value = jQuery(this).val();
|
1238 |
+
jQuery("#"+id+"_mini_label_street1").text(value);
|
1239 |
+
document.getElementById('el_street1_label').innerHTML= value;
|
1240 |
+
});
|
1241 |
+
}
|
1242 |
+
});
|
1243 |
+
jQuery("label#"+id+"_mini_label_street2").click(function() {
|
1244 |
+
if (jQuery(this).children('input').length == 0) {
|
1245 |
+
var street2 = "<input type='text' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1246 |
+
jQuery(this).html(street2);
|
1247 |
+
jQuery("input.street2").focus();
|
1248 |
+
jQuery("input.street2").blur(function() {
|
1249 |
+
var value = jQuery(this).val();
|
1250 |
+
jQuery("#"+id+"_mini_label_street2").text(value);
|
1251 |
+
document.getElementById('el_street2_label').innerHTML= value;
|
1252 |
+
});
|
1253 |
+
}
|
1254 |
+
});
|
1255 |
+
jQuery("label#"+id+"_mini_label_city").click(function() {
|
1256 |
+
if (jQuery(this).children('input').length == 0) {
|
1257 |
+
var city = "<input type='text' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1258 |
+
jQuery(this).html(city);
|
1259 |
+
jQuery("input.city").focus();
|
1260 |
+
jQuery("input.city").blur(function() {
|
1261 |
+
var value = jQuery(this).val();
|
1262 |
+
jQuery("#"+id+"_mini_label_city").text(value);
|
1263 |
+
document.getElementById('el_city_label').innerHTML= value;
|
1264 |
+
});
|
1265 |
+
}
|
1266 |
+
});
|
1267 |
+
jQuery("label#"+id+"_mini_label_state").click(function() {
|
1268 |
+
if (jQuery(this).children('input').length == 0) {
|
1269 |
+
var state = "<input type='text' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1270 |
+
jQuery(this).html(state);
|
1271 |
+
jQuery("input.state").focus();
|
1272 |
+
jQuery("input.state").blur(function() {
|
1273 |
+
var value = jQuery(this).val();
|
1274 |
+
jQuery("#"+id+"_mini_label_state").text(value);
|
1275 |
+
document.getElementById('el_state_label').innerHTML= value;
|
1276 |
+
});
|
1277 |
+
}
|
1278 |
+
});
|
1279 |
+
jQuery("label#"+id+"_mini_label_postal").click(function() {
|
1280 |
+
if (jQuery(this).children('input').length == 0) {
|
1281 |
+
var postal = "<input type='text' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1282 |
+
jQuery(this).html(postal);
|
1283 |
+
jQuery("input.postal").focus();
|
1284 |
+
jQuery("input.postal").blur(function() {
|
1285 |
+
var value = jQuery(this).val();
|
1286 |
+
jQuery("#"+id+"_mini_label_postal").text(value);
|
1287 |
+
document.getElementById('el_postal_label').innerHTML= value;
|
1288 |
+
});
|
1289 |
+
}
|
1290 |
+
});
|
1291 |
+
jQuery("label#"+id+"_mini_label_country").click(function() {
|
1292 |
+
if (jQuery(this).children('input').length == 0) {
|
1293 |
+
var country = "<input type='text' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1294 |
+
jQuery(this).html(country);
|
1295 |
+
jQuery("input.country").focus();
|
1296 |
+
jQuery("input.country").blur(function() {
|
1297 |
+
var value = jQuery(this).val();
|
1298 |
+
jQuery("#"+id+"_mini_label_country").text(value);
|
1299 |
+
document.getElementById('el_country_label').innerHTML = value;
|
1300 |
+
});
|
1301 |
+
}
|
1302 |
+
});
|
1303 |
+
});
|
1304 |
+
}
|
1305 |
|
1306 |
+
function set_unique(id)
|
1307 |
+
{
|
1308 |
+
if(document.getElementById(id).value=="yes")
|
1309 |
+
{
|
1310 |
+
document.getElementById(id).setAttribute("value", "no");
|
1311 |
+
}
|
1312 |
+
else
|
1313 |
+
{
|
1314 |
+
document.getElementById(id).setAttribute("value", "yes")
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
|
1318 |
+
function set_randomize(id)
|
1319 |
+
{
|
1320 |
+
if(document.getElementById(id).value=="yes")
|
1321 |
+
{
|
1322 |
+
document.getElementById(id).setAttribute("value", "no");
|
1323 |
+
}
|
1324 |
+
else
|
1325 |
+
{
|
1326 |
+
document.getElementById(id).setAttribute("value", "yes")
|
1327 |
+
}
|
1328 |
+
}
|
1329 |
+
function show_other_input(num)
|
1330 |
+
{
|
1331 |
+
for(k=0;k<50;k++)
|
1332 |
+
if( document.getElementById(num+"_elementform_id_temp"+k))
|
1333 |
+
if( document.getElementById(num+"_elementform_id_temp"+k).getAttribute('other'))
|
1334 |
+
if( document.getElementById(num+"_elementform_id_temp"+k).getAttribute('other')==1)
|
1335 |
+
{
|
1336 |
+
element_other=document.getElementById(num+"_elementform_id_temp"+k);
|
1337 |
+
break;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
|
1341 |
+
|
1342 |
+
parent=element_other.parentNode;
|
1343 |
+
|
1344 |
+
var br = document.createElement('br');
|
1345 |
+
br.setAttribute("id", num+"_other_brform_id_temp");
|
1346 |
+
|
1347 |
+
var el_other = document.createElement('input');
|
1348 |
+
el_other.setAttribute("id", num+"_other_inputform_id_temp");
|
1349 |
+
el_other.setAttribute("name", num+"_other_inputform_id_temp");
|
1350 |
+
el_other.setAttribute("type", "text");
|
1351 |
+
el_other.setAttribute("class", "other_input");
|
1352 |
+
parent.appendChild(br);
|
1353 |
+
parent.appendChild(el_other);
|
1354 |
|
1355 |
+
}
|
|
|
|
|
|
|
|
|
|
|
1356 |
|
1357 |
+
function set_allow_other(num, type) {
|
1358 |
+
if (document.getElementById(num+'_allow_otherform_id_temp').value == "yes") {
|
1359 |
+
document.getElementById(num+'_allow_otherform_id_temp').setAttribute("value", "no");
|
1360 |
+
for (k = 0; k < 50; k++) {
|
1361 |
+
if (document.getElementById("el_choices" + k)) {
|
1362 |
+
if (document.getElementById("el_choices" + k).getAttribute('other')) {
|
1363 |
+
if (document.getElementById("el_choices" + k).getAttribute('other') == 1) {
|
1364 |
+
remove_choise(k, num, type);
|
1365 |
+
break;
|
1366 |
+
}
|
1367 |
+
}
|
1368 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1369 |
}
|
1370 |
+
}
|
1371 |
+
else {
|
1372 |
+
document.getElementById(num+'_allow_otherform_id_temp').setAttribute("value", "yes");
|
1373 |
+
j++;
|
1374 |
+
var choices_td = document.getElementById('choices');
|
1375 |
+
var br = document.createElement('br');
|
1376 |
+
br.setAttribute("id", "br"+j);
|
1377 |
+
var el_choices = document.createElement('input');
|
1378 |
+
el_choices.setAttribute("id", "el_choices"+j);
|
1379 |
+
el_choices.setAttribute("type", "text");
|
1380 |
+
el_choices.setAttribute("value", "other");
|
1381 |
+
el_choices.setAttribute("other", "1");
|
1382 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
1383 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_label_element"+j+"', this.value); change_in_value('"+num+"_elementform_id_temp"+j+"', this.value)");
|
1384 |
+
var el_choices_remove = document.createElement('img');
|
1385 |
+
el_choices_remove.setAttribute("id", "el_choices"+j+"_remove");
|
1386 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
1387 |
+
el_choices_remove.style.cssText = 'cursor:pointer;vertical-align:middle; margin:3px; display:none';
|
1388 |
+
el_choices_remove.setAttribute("align", 'top');
|
1389 |
+
el_choices_remove.setAttribute("onClick", "remove_choise('"+j+"','"+num+"','"+type+"')");
|
1390 |
+
choices_td.appendChild(br);
|
1391 |
+
choices_td.appendChild(el_choices);
|
1392 |
+
choices_td.appendChild(el_choices_remove);
|
1393 |
+
if (type == 'checkbox') {
|
1394 |
+
refresh_attr(num, 'type_checkbox');
|
1395 |
+
}
|
1396 |
+
if (type == 'radio') {
|
1397 |
+
refresh_attr(num, 'type_radio');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1398 |
}
|
1399 |
+
refresh_rowcol(num, type);
|
1400 |
+
}
|
1401 |
+
}
|
1402 |
|
1403 |
+
function flow_hor(id)
|
1404 |
+
{
|
1405 |
+
tbody=document.getElementById(id+'_table_little');
|
1406 |
+
td_array= new Array();
|
1407 |
+
n=tbody.childNodes.length;
|
1408 |
+
for(k=0; k<n;k++)
|
1409 |
+
td_array[k]=tbody.childNodes[k].childNodes[0];
|
1410 |
+
|
1411 |
+
for(k=0; k<n;k++)
|
1412 |
+
tbody.removeChild(tbody.childNodes[0]);
|
1413 |
+
|
1414 |
+
var tr = document.createElement('tr');
|
1415 |
+
tr.setAttribute("id", id+"_hor");
|
1416 |
+
|
1417 |
+
tbody.appendChild(tr);
|
1418 |
+
for(k=0; k<n;k++)
|
1419 |
+
tr.appendChild(td_array[k]);
|
1420 |
}
|
1421 |
|
1422 |
+
function flow_ver(id)
|
1423 |
+
{
|
1424 |
+
tbody=document.getElementById(id+'_table_little');
|
1425 |
+
tr=document.getElementById(id+'_hor');
|
1426 |
+
td_array= new Array();
|
1427 |
+
n=tr.childNodes.length;
|
1428 |
+
|
1429 |
+
for(k=0; k<n;k++)
|
1430 |
+
td_array[k]=tr.childNodes[k];
|
1431 |
+
|
1432 |
+
tbody.removeChild(tr);
|
1433 |
+
|
1434 |
+
for(k=0; k<n;k++)
|
1435 |
+
{
|
1436 |
+
var tr_little = document.createElement('tr');
|
1437 |
+
tr_little.setAttribute("id", id+"_element_tr"+td_array[k].getAttribute("idi"));
|
1438 |
+
tr_little.appendChild(td_array[k]);
|
1439 |
+
tbody.appendChild(tr_little);
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
|
1443 |
+
function check_isnum_3_10(e)
|
1444 |
+
{
|
1445 |
+
|
1446 |
+
var chCode1 = e.which || e.keyCode;
|
1447 |
+
if (chCode1 > 31 && (chCode1 < 51 || chCode1 > 57))
|
1448 |
+
return false
|
1449 |
+
else if((document.getElementById('captcha_digit').value+(chCode1-48))>9)
|
1450 |
+
return false;
|
1451 |
+
return true;
|
1452 |
+
}
|
|
|
|
|
1453 |
|
1454 |
+
function set_sel_am_pm(select_)
|
1455 |
+
{
|
1456 |
+
if(select_.options[0].selected)
|
1457 |
+
{
|
1458 |
+
select_.options[0].setAttribute("selected", "selected");
|
1459 |
+
select_.options[1].removeAttribute("selected");
|
1460 |
+
}
|
1461 |
+
else
|
1462 |
+
{
|
1463 |
+
select_.options[1].setAttribute("selected", "selected");
|
1464 |
+
select_.options[0].removeAttribute("selected");
|
1465 |
+
}
|
|
|
1466 |
|
1467 |
+
}
|
|
|
|
|
1468 |
|
1469 |
+
function change_captcha_digit(digit)
|
1470 |
+
{
|
1471 |
+
captcha=document.getElementById('_wd_captchaform_id_temp');
|
1472 |
+
if(document.getElementById('captcha_digit').value)
|
1473 |
+
{
|
1474 |
+
captcha.setAttribute("digit", digit);
|
1475 |
+
|
1476 |
+
captcha.setAttribute("src", url_for_ajax+"?action=formmakerwdcaptcha"+"&digit="+digit+"&i=form_id_temp");
|
1477 |
+
document.getElementById('_wd_captcha_inputform_id_temp').style.width=(document.getElementById('captcha_digit').value*10+15)+"px";
|
1478 |
+
}
|
1479 |
+
else
|
1480 |
+
{
|
1481 |
+
captcha.setAttribute("digit", "6");
|
1482 |
+
captcha.setAttribute("src", url_for_ajax+"?action=formmakerwdcaptcha"+"&digit=6"+"&i=form_id_temp");
|
1483 |
+
document.getElementById('_wd_captcha_inputform_id_temp').style.width=(6*10+15)+"px";
|
1484 |
+
}
|
1485 |
}
|
1486 |
|
1487 |
+
function second_no(id)
|
1488 |
+
{
|
1489 |
+
time_box=document.getElementById(id+'_tr_time1');
|
1490 |
+
text_box=document.getElementById(id+'_tr_time2');
|
1491 |
+
second_box=document.getElementById(id+'_td_time_input3');
|
1492 |
+
second_text=document.getElementById(id+'_td_time_label3');
|
1493 |
+
document.getElementById(id+'_td_time_input2').parentNode.removeChild(document.getElementById(id+'_td_time_input2').nextSibling);
|
1494 |
+
time_box.removeChild(second_box);
|
1495 |
+
text_box.removeChild(second_text.previousSibling);
|
1496 |
+
text_box.removeChild(second_text);
|
1497 |
+
|
1498 |
+
}
|
1499 |
|
1500 |
+
function second_yes(id, w_ss)
|
1501 |
+
{
|
1502 |
+
time_box=document.getElementById(id+'_tr_time1');
|
1503 |
+
text_box=document.getElementById(id+'_tr_time2');
|
1504 |
+
|
1505 |
+
var td_time_input2_ket = document.createElement('td');
|
1506 |
+
td_time_input2_ket.setAttribute("align", "center");
|
1507 |
+
var td_time_input3 = document.createElement('td');
|
1508 |
+
td_time_input3.setAttribute("id", id+"_td_time_input3");
|
1509 |
+
|
1510 |
+
var td_time_label2_ket = document.createElement('td');
|
1511 |
+
|
1512 |
+
var td_time_label3 = document.createElement('td');
|
1513 |
+
td_time_label3.setAttribute("id", id+"_td_time_label3");
|
1514 |
+
|
1515 |
+
var mm_ = document.createElement('span');
|
1516 |
+
mm_.setAttribute("class", 'wdform_colon');
|
1517 |
+
mm_.style.cssText = "font-style:bold; vertical-align:middle";
|
1518 |
+
mm_.innerHTML=" : ";
|
1519 |
+
td_time_input2_ket.appendChild(mm_);
|
1520 |
+
|
1521 |
+
var ss = document.createElement('input');
|
1522 |
+
|
1523 |
+
ss.setAttribute("type", 'text');
|
1524 |
+
ss.setAttribute("value", w_ss);
|
1525 |
+
|
1526 |
+
ss.setAttribute("class", "time_box");
|
1527 |
+
ss.setAttribute("id", id+"_ssform_id_temp");
|
1528 |
+
ss.setAttribute("name", id+"_ssform_id_temp");
|
1529 |
+
ss.setAttribute("onKeyPress", "return check_second(event, '"+id+"_ssform_id_temp')");
|
1530 |
+
ss.setAttribute("onKeyUp", "change_second(event, '"+id+"_ssform_id_temp')");
|
1531 |
+
ss.setAttribute("onBlur", "add_0('"+id+"_ssform_id_temp')");
|
1532 |
+
var ss_label = document.createElement('label');
|
1533 |
+
ss_label.setAttribute("class", "mini_label");
|
1534 |
+
ss_label.innerHTML="SS";
|
1535 |
+
|
1536 |
+
td_time_input3.appendChild(ss);
|
1537 |
+
td_time_label3.appendChild(ss_label);
|
1538 |
+
|
1539 |
+
if(document.getElementById(id+'_am_pm_select'))
|
1540 |
+
{
|
1541 |
+
select_=document.getElementById(id+"_am_pm_select");
|
1542 |
+
select_text=document.getElementById(id+"_am_pm_label");
|
1543 |
+
|
1544 |
+
time_box.insertBefore(td_time_input3, select_);
|
1545 |
+
time_box.insertBefore(td_time_input2_ket, td_time_input3);
|
1546 |
+
|
1547 |
+
text_box.insertBefore(td_time_label3, select_text);
|
1548 |
+
text_box.insertBefore(td_time_label2_ket, td_time_label3);
|
1549 |
+
}
|
1550 |
+
else
|
1551 |
+
{
|
1552 |
+
time_box.appendChild(td_time_input2_ket);
|
1553 |
+
time_box.appendChild(td_time_input3);
|
1554 |
+
text_box.appendChild(td_time_label2_ket);
|
1555 |
+
text_box.appendChild(td_time_label3);
|
1556 |
+
}
|
1557 |
+
refresh_attr(id, 'type_time');
|
1558 |
+
jQuery(document).ready(function() {
|
1559 |
+
jQuery("label#"+id+"_mini_label_ss").click(function() {
|
1560 |
+
if (jQuery(this).children('input').length == 0) {
|
1561 |
+
var ss = "<input type='text' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
1562 |
+
jQuery(this).html(ss);
|
1563 |
+
jQuery("input.ss").focus();
|
1564 |
+
jQuery("input.ss").blur(function() {
|
1565 |
+
var value = jQuery(this).val();
|
1566 |
+
jQuery("#"+id+"_mini_label_ss").text(value);
|
1567 |
+
});
|
1568 |
+
}
|
1569 |
+
});
|
1570 |
+
});
|
1571 |
}
|
1572 |
|
1573 |
+
function check_isnum_interval(e, id, from, to) {
|
1574 |
+
var chCode1 = e.which || e.keyCode;
|
1575 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
1576 |
+
return false;
|
1577 |
}
|
1578 |
+
val = "" + document.getElementById(id).value+String.fromCharCode(chCode1);
|
1579 |
+
if (val.length > 2) {
|
1580 |
+
return false;
|
|
|
1581 |
}
|
1582 |
+
if (val == '00') {
|
1583 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1584 |
}
|
1585 |
+
if ((val<from) || (val>to)) {
|
1586 |
+
return false;
|
|
|
|
|
1587 |
}
|
1588 |
+
return true;
|
1589 |
+
}
|
1590 |
|
1591 |
+
function check_isnum_point(e) {
|
1592 |
+
var chCode1 = e.which || e.keyCode;
|
1593 |
+
if (chCode1 == 46) {
|
1594 |
+
return true;
|
1595 |
}
|
1596 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
1597 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
1598 |
}
|
1599 |
+
return true;
|
|
|
|
|
1600 |
}
|
1601 |
|
1602 |
+
function check_isnum(e) {
|
1603 |
+
var chCode1 = e.which || e.keyCode;
|
1604 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
1605 |
+
return false;
|
1606 |
+
}
|
1607 |
+
return true;
|
1608 |
}
|
1609 |
|
1610 |
+
function check_isnum_or_minus(e) {
|
1611 |
+
var chCode1 = e.which || e.keyCode;
|
1612 |
+
if (chCode1 != 45 ) {
|
1613 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) {
|
1614 |
+
return false;
|
1615 |
+
}
|
1616 |
+
}
|
1617 |
+
return true;
|
1618 |
}
|
1619 |
|
1620 |
+
function change_w_style(id, w)
|
1621 |
+
{
|
1622 |
+
if(document.getElementById(id))
|
1623 |
+
document.getElementById(id).style.width=w+"px";
|
1624 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1625 |
|
1626 |
+
function change_w_label(id, w)
|
1627 |
+
{
|
1628 |
+
if(document.getElementById(id))
|
1629 |
+
document.getElementById(id).innerHTML=w;
|
1630 |
+
}
|
1631 |
|
1632 |
+
function change_h_style(id, h)
|
1633 |
+
{
|
1634 |
+
document.getElementById(id).style.height=h+"px";
|
1635 |
+
}
|
1636 |
|
1637 |
+
function change_w(id, w)
|
1638 |
+
{
|
1639 |
+
document.getElementById(id).setAttribute("width", w)
|
1640 |
+
}
|
1641 |
|
1642 |
+
function change_h(id, h)
|
1643 |
+
{
|
1644 |
+
document.getElementById(id).setAttribute("height", h);
|
1645 |
+
}
|
1646 |
|
1647 |
+
function change_key(value, attribute)
|
1648 |
+
{
|
1649 |
+
document.getElementById('wd_recaptchaform_id_temp').setAttribute(attribute, value);
|
1650 |
+
}
|
1651 |
|
1652 |
+
function captcha_refresh(id)
|
1653 |
+
{
|
1654 |
+
srcArr=document.getElementById(id+"form_id_temp").src.split("&r=");
|
1655 |
+
document.getElementById(id+"form_id_temp").src=srcArr[0]+'&r='+Math.floor(Math.random()*100);
|
1656 |
+
document.getElementById(id+"_inputform_id_temp").value='';
|
1657 |
+
}
|
1658 |
|
1659 |
+
function up_row(id)
|
1660 |
+
{
|
1661 |
+
form=document.getElementById(id).parentNode;
|
1662 |
+
k=0;
|
1663 |
+
|
1664 |
+
while(form.childNodes[k])
|
1665 |
+
{
|
1666 |
+
if(form.childNodes[k].getAttribute("id"))
|
1667 |
+
if(id==form.childNodes[k].getAttribute("id"))
|
1668 |
+
break;
|
1669 |
+
k++;
|
1670 |
+
}
|
1671 |
+
|
1672 |
+
if(k!=0)
|
1673 |
+
{
|
1674 |
+
up=form.childNodes[k-1];
|
1675 |
+
down=form.childNodes[k];
|
1676 |
+
form.removeChild(down);
|
1677 |
+
form.insertBefore(down, up);
|
1678 |
+
return;
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
///////////en depqum yerb section breaka
|
1682 |
+
form_view_elemet =form.parentNode.parentNode.parentNode.parentNode;
|
1683 |
+
|
1684 |
+
current_tr =form.parentNode.parentNode.parentNode;
|
1685 |
+
|
1686 |
+
if(current_tr.previousSibling)
|
1687 |
+
if(current_tr.previousSibling.nodeType==3)
|
1688 |
+
{
|
1689 |
+
if(current_tr.previousSibling.previousSibling.getAttribute('type'))
|
1690 |
+
{
|
1691 |
+
current_tr.previousSibling.previousSibling.previousSibling.previousSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1692 |
+
return;
|
1693 |
+
}
|
1694 |
+
}
|
1695 |
+
else
|
1696 |
+
{
|
1697 |
+
if(current_tr.previousSibling.getAttribute('type'))
|
1698 |
+
{
|
1699 |
+
current_tr.previousSibling.previousSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1700 |
+
return;
|
1701 |
+
}
|
1702 |
+
}
|
1703 |
+
|
1704 |
+
|
1705 |
+
///////////pagei mej
|
1706 |
+
page_up(id);
|
1707 |
+
}
|
1708 |
|
1709 |
+
function down_row(id)
|
1710 |
+
{
|
1711 |
+
form=document.getElementById(id).parentNode;
|
1712 |
+
l=form.childNodes.length;
|
1713 |
+
k=0;
|
1714 |
+
while(form.childNodes[k])
|
1715 |
+
{
|
1716 |
+
if(id==form.childNodes[k].id)
|
1717 |
+
break;
|
1718 |
+
k++;
|
1719 |
+
}
|
1720 |
+
|
1721 |
+
if(k!=l-1)
|
1722 |
+
{
|
1723 |
+
///////////ira mej
|
1724 |
+
up=form.childNodes[k];
|
1725 |
+
down=form.childNodes[k+2];
|
1726 |
+
form.removeChild(up);
|
1727 |
+
|
1728 |
+
if(!down)
|
1729 |
+
down=null;
|
1730 |
+
|
1731 |
+
form.insertBefore(up, down);
|
1732 |
+
return;
|
1733 |
+
}
|
1734 |
+
///////////en depqum yerb section breaka
|
1735 |
+
form_view_elemet =form.parentNode.parentNode.parentNode.parentNode;
|
1736 |
+
|
1737 |
+
current_tr =form.parentNode.parentNode.parentNode;
|
1738 |
+
|
1739 |
+
if(current_tr.nextSibling.nodeType==3)
|
1740 |
+
{
|
1741 |
+
if(current_tr.nextSibling.nextSibling.getAttribute('type'))
|
1742 |
+
{
|
1743 |
+
current_tr.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1744 |
+
return;
|
1745 |
+
}
|
1746 |
+
}
|
1747 |
+
else
|
1748 |
+
{
|
1749 |
+
if(current_tr.nextSibling.getAttribute('type'))
|
1750 |
+
{
|
1751 |
+
current_tr.nextSibling.nextSibling.firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1752 |
+
return;
|
1753 |
+
}
|
1754 |
+
}
|
1755 |
+
|
1756 |
+
|
1757 |
+
///////////pagei mej
|
1758 |
+
page_down(id);
|
1759 |
|
1760 |
+
}
|
1761 |
|
1762 |
+
function right_row(id)
|
1763 |
+
{
|
1764 |
+
tr=document.getElementById(id);
|
1765 |
+
table_big=tr.parentNode.parentNode;
|
1766 |
+
td_big=tr.parentNode.parentNode.parentNode;
|
1767 |
+
if(table_big.nextSibling!=null)
|
1768 |
+
{
|
1769 |
+
td_next=table_big.nextSibling;
|
1770 |
+
td_next.firstChild.appendChild(tr);
|
1771 |
+
|
1772 |
+
}
|
1773 |
+
else
|
1774 |
+
{
|
1775 |
+
|
1776 |
+
var new_td = document.createElement('td');
|
1777 |
+
new_td.setAttribute("valign", "top");
|
1778 |
+
|
1779 |
+
var new_table = document.createElement('table');
|
1780 |
+
new_table.setAttribute("class", "wdform_table2");
|
1781 |
+
var new_tbody = document.createElement('tbody');
|
1782 |
+
|
1783 |
+
// tr_big.appendChild(new_td);
|
1784 |
+
|
1785 |
+
td_big.appendChild(new_table);
|
1786 |
+
|
1787 |
+
new_table.appendChild(new_tbody);
|
1788 |
+
|
1789 |
+
new_tbody.appendChild(tr);
|
1790 |
+
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
if(table_big.firstChild.firstChild==null)
|
1794 |
+
td_big.removeChild(table_big);
|
1795 |
+
|
1796 |
+
}
|
1797 |
|
1798 |
+
function left_row(id)
|
1799 |
+
{
|
1800 |
+
tr=document.getElementById(id);
|
1801 |
+
td_big=tr.parentNode.parentNode.parentNode;
|
1802 |
+
table_big=tr.parentNode.parentNode;
|
1803 |
+
if(table_big.previousSibling!=null)
|
1804 |
+
{
|
1805 |
+
|
1806 |
+
table_previous=table_big.previousSibling;
|
1807 |
+
table_previous.firstChild.appendChild(tr);
|
1808 |
+
|
1809 |
+
if(table_big.firstChild.firstChild==null)
|
1810 |
+
td_big.removeChild(table_big);
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
}
|
1814 |
|
1815 |
+
function page_up(id)
|
1816 |
+
{
|
1817 |
+
form=document.getElementById(id).parentNode;
|
1818 |
+
|
1819 |
+
form_view_elemet =form.parentNode.parentNode.parentNode.parentNode;
|
1820 |
+
form_view_elemet_copy =form.parentNode.parentNode.parentNode.parentNode;
|
1821 |
+
|
1822 |
+
table=form_view_elemet.parentNode;
|
1823 |
+
|
1824 |
+
//alert(table);
|
1825 |
+
|
1826 |
+
while(table)
|
1827 |
+
{
|
1828 |
+
table=table.previousSibling;
|
1829 |
+
while(table)
|
1830 |
+
{
|
1831 |
+
if(table.tagName=="TABLE")
|
1832 |
+
break;
|
1833 |
+
else
|
1834 |
+
table=table.previousSibling;
|
1835 |
+
}
|
1836 |
+
|
1837 |
+
if(!table)
|
1838 |
+
{
|
1839 |
+
alert('Unable to move');
|
1840 |
+
return;
|
1841 |
+
}
|
1842 |
+
form_maker_remove_spaces(table);
|
1843 |
+
if(jQuery(table.firstChild).is(":visible"))
|
1844 |
+
break;
|
1845 |
+
|
1846 |
+
}
|
1847 |
+
|
1848 |
+
|
1849 |
+
n=table.firstChild.childNodes.length;
|
1850 |
+
|
1851 |
+
table.firstChild.childNodes[n-2].firstChild.firstChild.firstChild.appendChild(document.getElementById(id));
|
1852 |
+
|
1853 |
+
/* glob_n=form_view_elemet_copy.firstChild.firstChild.childNodes.length;
|
1854 |
+
for(i=0; i<glob_n; i++)
|
1855 |
+
{
|
1856 |
+
if(table.firstChild.firstChild.childNodes[i])
|
1857 |
+
{
|
1858 |
+
to_add=table.firstChild.firstChild.childNodes[i];
|
1859 |
+
to_add.firstChild.firstChild.appendChild(document.getElementById(id));
|
1860 |
+
}
|
1861 |
+
else
|
1862 |
+
{
|
1863 |
+
to_add=table.firstChild.firstChild.firstChild;
|
1864 |
+
to_add.firstChild.firstChild.appendChild(document.getElementById(id));
|
1865 |
+
}
|
1866 |
+
}*/
|
1867 |
+
|
1868 |
+
|
1869 |
+
refresh_pages(id);
|
1870 |
+
|
1871 |
+
|
1872 |
+
|
1873 |
+
|
1874 |
|
1875 |
+
}
|
1876 |
|
1877 |
+
function page_down(id)
|
1878 |
+
{
|
1879 |
+
form=document.getElementById(id).parentNode;
|
1880 |
+
|
1881 |
+
form_view_elemet =form.parentNode.parentNode.parentNode.parentNode;
|
1882 |
+
form_view_elemet_copy =form.parentNode.parentNode.parentNode.parentNode;
|
1883 |
+
|
1884 |
+
table=form_view_elemet.parentNode;
|
1885 |
+
|
1886 |
+
while(table)
|
1887 |
+
{
|
1888 |
+
table=table.nextSibling;
|
1889 |
+
|
1890 |
+
while(table)
|
1891 |
+
{
|
1892 |
+
if(table.tagName=="TABLE")
|
1893 |
+
break;
|
1894 |
+
else
|
1895 |
+
table=table.nextSibling;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
if(!table)
|
1899 |
+
{
|
1900 |
+
alert('Unable to move');
|
1901 |
+
return;
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
if(jQuery(table.firstChild).is(":visible"))
|
1905 |
+
break;
|
1906 |
+
}
|
1907 |
+
|
1908 |
+
n=table.firstChild.childNodes.length;
|
1909 |
+
|
1910 |
+
table.firstChild.firstChild.firstChild.firstChild.firstChild.insertBefore(document.getElementById(id), table.firstChild.firstChild.firstChild.firstChild.firstChild.firstChild);
|
1911 |
+
refresh_pages(id);
|
1912 |
|
1913 |
+
}
|
1914 |
|
|
|
1915 |
|
1916 |
|
1917 |
+
function Disable() {
|
1918 |
+
select_ = document.getElementById('sel_el_pos');
|
1919 |
+
select_.setAttribute("disabled", "disabled");
|
1920 |
+
select_.innerHTML = "";
|
1921 |
+
}
|
1922 |
|
1923 |
+
/**
|
1924 |
+
* Remove witespaces from childNodes.
|
1925 |
+
*/
|
1926 |
+
function form_maker_remove_spaces(parent) {
|
1927 |
+
if (!parent) {
|
1928 |
+
parent = document;
|
1929 |
+
}
|
1930 |
+
var children = parent.childNodes;
|
1931 |
+
for (var i = children.length - 1; i >= 0; i--) {
|
1932 |
+
var child = children[i];
|
1933 |
+
if (child.nodeType == 3) {
|
1934 |
+
if (child.data.match(/^\s+$/)) {
|
1935 |
+
parent.removeChild(child);
|
1936 |
+
}
|
1937 |
+
}
|
1938 |
+
else {
|
1939 |
+
form_maker_remove_spaces(child);
|
1940 |
+
}
|
1941 |
+
}
|
1942 |
+
}
|
1943 |
|
1944 |
+
function Enable() {
|
1945 |
+
var pos = document.getElementsByName("el_pos");
|
1946 |
+
pos[0].setAttribute("checked", "checked");
|
1947 |
+
select_ = document.getElementById('sel_el_pos');
|
1948 |
+
select_.innerHTML = "";
|
1949 |
+
for (k = 1; k <= form_view_max; k++) {
|
1950 |
+
if (document.getElementById('form_id_tempform_view'+k)) {
|
1951 |
+
form_view_element = document.getElementById('form_id_tempform_view' + k);
|
1952 |
+
form_maker_remove_spaces(form_view_element);
|
1953 |
+
n=form_view_element.childNodes.length-2;
|
1954 |
+
for (z = 0; z <= n; z++) {
|
1955 |
+
if (!form_view_element.childNodes[z].id) {
|
1956 |
+
GLOBAL_tr = form_view_element.childNodes[z];
|
1957 |
+
for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
|
1958 |
+
table = GLOBAL_tr.firstChild.childNodes[x];
|
1959 |
+
tbody = table.firstChild;
|
1960 |
+
for (y = 0; y < tbody.childNodes.length; y++) {
|
1961 |
+
tr = tbody.childNodes[y];
|
1962 |
+
var option = document.createElement('option');
|
1963 |
+
option.setAttribute("id", tr.id + "_sel_el_pos");
|
1964 |
+
option.setAttribute("value", tr.id);
|
1965 |
+
option.innerHTML = document.getElementById( tr.id + '_element_labelform_id_temp').innerHTML;
|
1966 |
+
select_.appendChild(option);
|
1967 |
+
}
|
1968 |
+
}
|
1969 |
+
}
|
1970 |
+
}
|
1971 |
+
}
|
1972 |
+
}
|
1973 |
+
select_.removeAttribute("disabled");
|
1974 |
+
}
|
1975 |
|
1976 |
+
function all_labels() {
|
1977 |
+
labels=new Array();
|
1978 |
+
for(k=1;k<=form_view_max;k++)
|
1979 |
+
if(document.getElementById('form_id_tempform_view'+k))
|
1980 |
+
{
|
1981 |
+
form_view_element=document.getElementById('form_id_tempform_view'+k);
|
1982 |
+
form_maker_remove_spaces(form_view_element);
|
1983 |
+
n=form_view_element.childNodes.length-2;
|
1984 |
+
for(z=0;z<=n;z++)
|
1985 |
+
{
|
1986 |
+
if(!form_view_element.childNodes[z].id)
|
1987 |
+
{
|
1988 |
+
GLOBAL_tr=form_view_element.childNodes[z];
|
1989 |
+
|
1990 |
+
for (x=0; x < GLOBAL_tr.firstChild.childNodes.length; x++)
|
1991 |
+
{
|
1992 |
+
table=GLOBAL_tr.firstChild.childNodes[x];
|
1993 |
+
tbody=table.firstChild;
|
1994 |
+
for (y=0; y < tbody.childNodes.length; y++)
|
1995 |
+
{
|
1996 |
+
tr=tbody.childNodes[y];
|
1997 |
+
labels.push( document.getElementById(tr.id+'_element_labelform_id_temp').innerHTML);
|
1998 |
+
}
|
1999 |
+
}
|
2000 |
+
}
|
2001 |
+
}
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
return labels;
|
2005 |
+
}
|
2006 |
|
2007 |
+
function set_checked(id,j)
|
2008 |
+
{
|
2009 |
+
checking=document.getElementById(id+"_elementform_id_temp"+j);
|
2010 |
+
if(checking.checked)
|
2011 |
+
checking.setAttribute("checked", "checked");
|
2012 |
+
if(!checking.checked)
|
2013 |
+
{
|
2014 |
+
checking.removeAttribute("checked");
|
2015 |
+
if(checking.getAttribute('other'))
|
2016 |
+
if(checking.getAttribute('other')==1)
|
2017 |
+
{
|
2018 |
+
if(document.getElementById(id+"_other_inputform_id_temp"))
|
2019 |
+
{
|
2020 |
+
document.getElementById(id+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(id+"_other_brform_id_temp"));
|
2021 |
+
document.getElementById(id+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(id+"_other_inputform_id_temp"));
|
2022 |
+
}
|
2023 |
+
return false;
|
2024 |
+
}
|
2025 |
+
}
|
2026 |
+
return true;
|
2027 |
+
}
|
2028 |
|
2029 |
+
function set_default(id, j)
|
2030 |
+
{
|
2031 |
+
for(k=0; k<100; k++)
|
2032 |
+
if(document.getElementById(id+"_elementform_id_temp"+k))
|
2033 |
+
if(!document.getElementById(id+"_elementform_id_temp"+k).checked)
|
2034 |
+
document.getElementById(id+"_elementform_id_temp"+k).removeAttribute("checked");
|
2035 |
+
else
|
2036 |
+
document.getElementById(id+"_elementform_id_temp"+j).setAttribute("checked", "checked");
|
2037 |
+
|
2038 |
+
if(document.getElementById(id+"_other_inputform_id_temp"))
|
2039 |
+
{
|
2040 |
+
document.getElementById(id+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(id+"_other_brform_id_temp"));
|
2041 |
+
document.getElementById(id+"_other_inputform_id_temp").parentNode.removeChild(document.getElementById(id+"_other_inputform_id_temp"));
|
2042 |
+
}
|
2043 |
+
}
|
2044 |
|
2045 |
+
function set_select(select_)
|
2046 |
+
{
|
2047 |
+
for (p = select_.length - 1; p>=0; p--)
|
2048 |
+
if (select_.options[p].selected)
|
2049 |
+
select_.options[p].setAttribute("selected", "selected");
|
2050 |
+
else
|
2051 |
+
select_.options[p].removeAttribute("selected");
|
2052 |
+
}
|
2053 |
|
2054 |
+
function add_0(id)
|
2055 |
+
{
|
2056 |
+
input=document.getElementById(id);
|
2057 |
+
if(input.value.length==1)
|
2058 |
+
{
|
2059 |
+
input.value='0'+input.value;
|
2060 |
+
input.setAttribute("value", input.value);
|
2061 |
+
}
|
2062 |
+
}
|
2063 |
|
2064 |
+
function change_hour(ev, id, hour_interval)
|
2065 |
+
{
|
2066 |
+
if(check_hour(ev, id, hour_interval))
|
2067 |
+
{
|
2068 |
+
input=document.getElementById(id);
|
2069 |
+
input.setAttribute("value", input.value);
|
2070 |
+
}
|
2071 |
+
}
|
2072 |
|
2073 |
+
function change_minute(ev, id)
|
2074 |
+
{
|
2075 |
+
if(check_minute(ev, id))
|
2076 |
+
{
|
2077 |
+
input=document.getElementById(id);
|
2078 |
+
input.setAttribute("value", input.value);
|
2079 |
+
}
|
2080 |
}
|
2081 |
|
2082 |
+
function change_second(ev, id)
|
2083 |
+
{
|
2084 |
+
if(check_second(ev, id))
|
2085 |
+
{
|
2086 |
+
input=document.getElementById(id);
|
2087 |
+
input.setAttribute("value", input.value);
|
2088 |
+
}
|
2089 |
}
|
2090 |
|
2091 |
+
function check_hour(e, id, hour_interval)
|
2092 |
+
{
|
2093 |
+
var chCode1 = e.which || e.keyCode;
|
2094 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2095 |
+
return false;
|
2096 |
+
hour=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2097 |
+
|
2098 |
+
hour=parseFloat(hour);
|
2099 |
+
if((hour<0) || (hour>hour_interval))
|
2100 |
+
return false;
|
2101 |
+
return true;
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
function check_minute(e, id)
|
2105 |
+
{
|
2106 |
+
|
2107 |
+
|
2108 |
+
var chCode1 = e.which || e.keyCode;
|
2109 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2110 |
+
return false;
|
2111 |
+
minute=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2112 |
+
|
2113 |
+
minute=parseFloat(minute);
|
2114 |
+
if((minute<0) || (minute>59))
|
2115 |
+
return false;
|
2116 |
+
return true;
|
2117 |
+
}
|
2118 |
+
|
2119 |
+
function check_second(e, id)
|
2120 |
+
{
|
2121 |
+
|
2122 |
+
|
2123 |
+
var chCode1 = e.which || e.keyCode;
|
2124 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2125 |
+
return false;
|
2126 |
+
second=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2127 |
+
|
2128 |
+
second=parseFloat(second);
|
2129 |
+
if((second<0) || (second>59))
|
2130 |
+
return false;
|
2131 |
+
return true;
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
function change_day(ev, id)
|
2135 |
+
{
|
2136 |
+
if(check_day(ev, id))
|
2137 |
+
{
|
2138 |
+
input=document.getElementById(id);
|
2139 |
+
input.setAttribute("value", input.value);
|
2140 |
+
}
|
2141 |
}
|
2142 |
|
2143 |
+
function change_month(ev, id)
|
2144 |
+
{
|
2145 |
+
if(check_month(ev, id))
|
2146 |
+
{
|
2147 |
+
input=document.getElementById(id);
|
2148 |
+
input.setAttribute("value", input.value);
|
2149 |
+
}
|
2150 |
}
|
2151 |
|
2152 |
+
function change_year(id)
|
2153 |
+
{
|
2154 |
+
year=document.getElementById(id).value;
|
2155 |
+
|
2156 |
+
from=parseFloat(document.getElementById(id).getAttribute('from'));
|
2157 |
+
to=parseFloat(document.getElementById(id).getAttribute('to'));
|
2158 |
+
|
2159 |
+
year=parseFloat(year);
|
2160 |
+
|
2161 |
+
if((year>=from) && (year<=to))
|
2162 |
+
document.getElementById(id).setAttribute("value", year);
|
2163 |
+
else
|
2164 |
+
document.getElementById(id).setAttribute("value", '');
|
2165 |
}
|
2166 |
|
2167 |
+
function check_day(e, id)
|
2168 |
+
{
|
2169 |
+
var chCode1 = e.which || e.keyCode;
|
2170 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2171 |
+
return false;
|
2172 |
+
day=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2173 |
+
|
2174 |
+
if(day.length>2)
|
2175 |
+
return false;
|
2176 |
+
|
2177 |
+
if(day=='00')
|
2178 |
+
return false;
|
2179 |
+
|
2180 |
+
day=parseFloat(day);
|
2181 |
+
if((day<0) || (day>31))
|
2182 |
+
return false;
|
2183 |
+
return true;
|
2184 |
+
}
|
2185 |
+
|
2186 |
+
function check_month(e, id)
|
2187 |
+
{
|
2188 |
+
|
2189 |
+
|
2190 |
+
var chCode1 = e.which || e.keyCode;
|
2191 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2192 |
+
return false;
|
2193 |
+
month=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2194 |
+
|
2195 |
+
if(month.length>2)
|
2196 |
+
return false;
|
2197 |
+
|
2198 |
+
if(month=='00')
|
2199 |
+
return false;
|
2200 |
+
|
2201 |
+
month=parseFloat(month);
|
2202 |
+
if((month<0) || (month>12))
|
2203 |
+
return false;
|
2204 |
+
return true;
|
2205 |
+
}
|
2206 |
+
|
2207 |
+
function check_year2(id)
|
2208 |
+
{
|
2209 |
+
year=document.getElementById(id).value;
|
2210 |
+
|
2211 |
+
from=parseFloat(document.getElementById(id).getAttribute('from'));
|
2212 |
+
|
2213 |
+
year=parseFloat(year);
|
2214 |
+
|
2215 |
+
if(year<from)
|
2216 |
+
{
|
2217 |
+
document.getElementById(id).value='';
|
2218 |
+
alert('The value of "year" is not valid.');
|
2219 |
+
}
|
2220 |
}
|
2221 |
|
2222 |
+
function check_year1(e, id)
|
2223 |
+
{
|
2224 |
+
var chCode1 = e.which || e.keyCode;
|
2225 |
+
if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57))
|
2226 |
+
return false;
|
2227 |
+
|
2228 |
+
year=""+document.getElementById(id).value+String.fromCharCode(chCode1);
|
2229 |
+
|
2230 |
+
to=parseFloat(document.getElementById(id).getAttribute('to'));
|
2231 |
+
|
2232 |
+
year=parseFloat(year);
|
2233 |
+
|
2234 |
+
if(year>to)
|
2235 |
+
return false;
|
2236 |
+
return true;
|
2237 |
+
}
|
2238 |
+
|
2239 |
+
function label_top(num)
|
2240 |
+
{
|
2241 |
+
table=document.getElementById(num+'_elemet_tableform_id_temp');
|
2242 |
+
td1=document.getElementById(num+'_label_sectionform_id_temp');
|
2243 |
+
td2=document.getElementById(num+'_element_sectionform_id_temp');
|
2244 |
+
var table_t = document.createElement('tbody');
|
2245 |
+
var new_td1 = document.createElement('td');
|
2246 |
+
new_td1 = td1;
|
2247 |
+
var new_td2 = document.createElement('td');
|
2248 |
+
new_td2 = td2;
|
2249 |
+
var tr1 = document.createElement('tr');
|
2250 |
+
var tr2 = document.createElement('tr');
|
2251 |
+
//table.innerHTML=" ";
|
2252 |
+
while (table.firstChild)
|
2253 |
+
table.removeChild(table.firstChild);
|
2254 |
+
tr1.appendChild(new_td1);
|
2255 |
+
tr2.appendChild(new_td2);
|
2256 |
+
table_t.appendChild(tr1);
|
2257 |
+
table_t.appendChild(tr2);
|
2258 |
+
table.appendChild(table_t);
|
2259 |
}
|
2260 |
|
2261 |
+
function label_left(num)
|
2262 |
+
{
|
2263 |
+
table=document.getElementById(num+'_elemet_tableform_id_temp');
|
2264 |
+
td1=document.getElementById(num+'_label_sectionform_id_temp');
|
2265 |
+
td2=document.getElementById(num+'_element_sectionform_id_temp');
|
2266 |
+
var table_t = document.createElement('tbody');
|
2267 |
+
var new_td1 = document.createElement('td');
|
2268 |
+
new_td1 = td1;
|
2269 |
+
var new_td2 = document.createElement('td');
|
2270 |
+
new_td2 = td2;
|
2271 |
+
var tr = document.createElement('tr');
|
2272 |
+
//table.innerHTML=" ";
|
2273 |
+
while (table.firstChild)
|
2274 |
+
table.removeChild(table.firstChild);
|
2275 |
+
tr.appendChild(new_td1);
|
2276 |
+
tr.appendChild(new_td2);
|
2277 |
+
table_t.appendChild(tr);
|
2278 |
+
table.appendChild(table_t);
|
2279 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2280 |
|
2281 |
+
function delete_value(id)
|
2282 |
+
{
|
2283 |
+
ofontStyle=document.getElementById(id).className;
|
2284 |
+
if(ofontStyle=="input_deactive")
|
2285 |
+
{
|
2286 |
+
document.getElementById(id).value="";
|
2287 |
+
destroyChildren(document.getElementById(id));
|
2288 |
+
document.getElementById(id).setAttribute("class", "input_active");
|
2289 |
+
document.getElementById(id).className='input_active';
|
2290 |
+
}
|
2291 |
+
}
|
2292 |
|
2293 |
+
function return_value(id)
|
2294 |
+
{
|
2295 |
+
input=document.getElementById(id);
|
2296 |
+
if(input.value=="")
|
2297 |
+
{
|
2298 |
+
input.value=input.title;
|
2299 |
+
input.className='input_deactive';
|
2300 |
+
input.setAttribute("class", 'input_deactive');
|
2301 |
+
}
|
2302 |
+
}
|
2303 |
|
2304 |
+
function change_value(id)
|
2305 |
+
{
|
2306 |
+
input=document.getElementById(id);
|
2307 |
+
|
2308 |
+
tag=input.tagName;
|
2309 |
+
if(tag=="TEXTAREA")
|
2310 |
+
{
|
2311 |
+
// destroyChildren(input)
|
2312 |
+
input.innerHTML=input.value;
|
2313 |
+
}
|
2314 |
+
else
|
2315 |
+
input.setAttribute("value", input.value);
|
2316 |
|
2317 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2318 |
|
2319 |
+
function change_input_value(first_value, id)
|
2320 |
+
{
|
2321 |
+
input=document.getElementById(id);
|
2322 |
+
input.title=first_value;
|
2323 |
+
|
2324 |
+
if( window.getComputedStyle )
|
2325 |
+
{
|
2326 |
+
ofontStyle = window.getComputedStyle(input,null).fontStyle;
|
2327 |
+
} else if( input.currentStyle ) {
|
2328 |
+
ofontStyle = input.currentStyle.fontStyle;
|
2329 |
+
}
|
2330 |
+
if(ofontStyle=="italic")
|
2331 |
+
{
|
2332 |
+
input.value=first_value;
|
2333 |
+
input.setAttribute("value", first_value);
|
2334 |
+
}
|
2335 |
}
|
2336 |
|
2337 |
+
function change_file_value(destination, id, prefix , postfix )
|
2338 |
+
{
|
2339 |
+
if(typeof(prefix)=='undefined') {prefix=''; postfix=''};
|
2340 |
+
input=document.getElementById(id);
|
2341 |
+
input.value=prefix+destination+postfix;
|
2342 |
+
input.setAttribute("value", prefix+destination+postfix);
|
2343 |
+
|
2344 |
+
}
|
|
|
|
|
2345 |
|
2346 |
+
function close_window() {
|
2347 |
+
if (need_enable) {
|
2348 |
+
enable();
|
2349 |
}
|
2350 |
+
need_enable = true;
|
2351 |
+
document.getElementById('edit_table').innerHTML = "";
|
2352 |
+
document.getElementById('show_table').innerHTML = "";
|
2353 |
+
document.getElementById('main_editor').style.display = "none";
|
2354 |
+
if (document.getElementsByTagName("iframe")[id_ifr_editor]) {
|
2355 |
+
ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
|
2356 |
+
ifr = getIFrameDocument(ifr_id);
|
2357 |
+
ifr.body.innerHTML = "";
|
2358 |
+
}
|
2359 |
+
document.getElementById('form_maker_editor').value = "";
|
2360 |
+
document.getElementById('editing_id').value = "";
|
2361 |
+
document.getElementById('element_type').value = "";
|
2362 |
+
alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'survey');
|
2363 |
+
for (x = 0; x < 13; x++) {
|
2364 |
+
if (alltypes[x] != 'file_upload' && alltypes[x] != 'map')
|
2365 |
+
document.getElementById('img_' + alltypes[x]).parentNode.style.backgroundColor = '';
|
2366 |
+
}
|
2367 |
+
}
|
2368 |
|
2369 |
+
function change_label(id, label) {
|
2370 |
+
document.getElementById(id).innerHTML = label;
|
2371 |
+
document.getElementById(id).value = label;
|
2372 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2373 |
|
2374 |
+
function change_label_1(id, label) {
|
2375 |
+
document.getElementById(id).value = label;
|
2376 |
+
}
|
2377 |
|
2378 |
+
function change_func(id, label) {
|
2379 |
+
document.getElementById(id).setAttribute("onclick", label);
|
2380 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2381 |
|
2382 |
+
function change_in_value(id, label)
|
2383 |
+
{
|
2384 |
+
document.getElementById(id).setAttribute("value", label);
|
2385 |
+
}
|
|
|
|
|
|
|
|
|
|
|
2386 |
|
2387 |
+
function change_size(size, num)
|
2388 |
+
{
|
2389 |
+
document.getElementById(num+'_elementform_id_temp').style.width=size+'px';
|
2390 |
+
if(document.getElementById(num+'_element_input'))
|
2391 |
+
document.getElementById(num+'_element_input').style.width=size+'px';
|
2392 |
+
switch(size)
|
2393 |
+
{
|
2394 |
+
case '111':
|
2395 |
+
{
|
2396 |
+
document.getElementById(num+'_elementform_id_temp').setAttribute("rows", "2"); break;
|
2397 |
+
}
|
2398 |
+
case '222':
|
2399 |
+
{
|
2400 |
+
document.getElementById(num+'_elementform_id_temp').setAttribute("rows", "4");break;
|
2401 |
+
}
|
2402 |
+
case '444':
|
2403 |
+
{
|
2404 |
+
document.getElementById(num+'_elementform_id_temp').setAttribute("rows", "8");break;
|
2405 |
+
}
|
2406 |
+
}
|
2407 |
+
}
|
2408 |
|
2409 |
+
function add_choise(type, num) {
|
2410 |
+
j++;
|
2411 |
+
if (type=='radio' || type=='checkbox') {
|
2412 |
+
var choices_td = document.getElementById('choices');
|
2413 |
+
var br = document.createElement('br');
|
2414 |
+
br.setAttribute("id", "br"+j);
|
2415 |
+
var el_choices = document.createElement('input');
|
2416 |
+
el_choices.setAttribute("id", "el_choices"+j);
|
2417 |
+
el_choices.setAttribute("type", "text");
|
2418 |
+
el_choices.setAttribute("value", "");
|
2419 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
2420 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_label_element"+j+"', this.value); change_in_value('"+num+"_elementform_id_temp"+j+"', this.value)");
|
2421 |
+
var el_choices_remove = document.createElement('img');
|
2422 |
+
el_choices_remove.setAttribute("id", "el_choices"+j+"_remove");
|
2423 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
2424 |
+
el_choices_remove.style.cssText = 'cursor:pointer;vertical-align:middle; margin:3px';
|
2425 |
+
el_choices_remove.setAttribute("align", 'top');
|
2426 |
+
el_choices_remove.setAttribute("onClick", "remove_choise('"+j+"','"+num+"','"+type+"')");
|
2427 |
choices_td.appendChild(br);
|
2428 |
choices_td.appendChild(el_choices);
|
2429 |
choices_td.appendChild(el_choices_remove);
|
2430 |
+
refresh_rowcol(num, type);
|
2431 |
+
if (type=='checkbox') {
|
2432 |
+
refresh_id_name(num, 'type_checkbox');
|
2433 |
+
refresh_attr(num, 'type_checkbox');
|
2434 |
+
}
|
2435 |
+
if (type == 'radio') {
|
2436 |
+
refresh_id_name(num, 'type_radio');
|
2437 |
+
refresh_attr(num, 'type_radio');
|
2438 |
+
}
|
2439 |
+
}
|
2440 |
+
if (type == 'select') {
|
2441 |
+
var select_ = document.getElementById(num+'_elementform_id_temp');
|
2442 |
+
var option = document.createElement('option');
|
2443 |
+
option.setAttribute("id", num+"_option"+j);
|
2444 |
+
select_.appendChild(option);
|
2445 |
+
var choices_td= document.getElementById('choices');
|
2446 |
+
var br = document.createElement('br');
|
2447 |
+
br.setAttribute("id", "br"+j);
|
2448 |
+
var el_choices = document.createElement('input');
|
2449 |
+
el_choices.setAttribute("id", "el_option"+j);
|
2450 |
+
el_choices.setAttribute("type", "text");
|
2451 |
+
el_choices.setAttribute("value", "");
|
2452 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
2453 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_option"+j+"', this.value)");
|
2454 |
+
var el_choices_remove = document.createElement('img');
|
2455 |
+
el_choices_remove.setAttribute("id", "el_option"+j+"_remove");
|
2456 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
2457 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
2458 |
+
el_choices_remove.setAttribute("align", 'top');
|
2459 |
+
el_choices_remove.setAttribute("onClick", "remove_option('"+j+"','"+num+"')");
|
2460 |
+
var el_choices_dis = document.createElement('input');
|
2461 |
+
el_choices_dis.setAttribute("type", 'checkbox');
|
2462 |
+
el_choices_dis.setAttribute("id", "el_option"+j+"_dis");
|
2463 |
+
el_choices_dis.setAttribute("onClick", "dis_option('"+num+"_option"+j+"', this.checked)");
|
2464 |
+
el_choices_dis.style.cssText = "vertical-align: middle; margin-left:24px; margin-right:24px;";
|
2465 |
+
choices_td.appendChild(br);
|
2466 |
+
choices_td.appendChild(el_choices);
|
2467 |
+
choices_td.appendChild(el_choices_dis);
|
2468 |
+
choices_td.appendChild(el_choices_remove);
|
2469 |
}
|
2470 |
}
|
2471 |
|
2472 |
+
function refresh_rowcol(num, type) {
|
2473 |
+
if (document.getElementById('edit_for_rowcol').value) {
|
2474 |
+
document.getElementById(num+'_rowcol_numform_id_temp').value = document.getElementById('edit_for_rowcol').value;
|
2475 |
+
var table = document.getElementById(num+'_table_little');
|
2476 |
+
table.removeAttribute("for_hor");
|
2477 |
+
table.innerHTML = "";
|
2478 |
+
var choeices = 0;
|
2479 |
+
if (document.getElementById('edit_for_flow_vertical').checked == true) {
|
2480 |
+
var columns = document.getElementById('edit_for_rowcol').value;
|
2481 |
+
for (i = 0; i <= 100; i++) {
|
2482 |
+
if (document.getElementById('el_choices' + i)) {
|
2483 |
+
choeices++;
|
2484 |
+
}
|
2485 |
+
}
|
2486 |
+
element = 'input';
|
2487 |
+
rows = parseInt((choeices + 1) / columns);
|
2488 |
+
var gago = 0;
|
2489 |
+
var vaxo = 1;
|
2490 |
+
var tr_row = document.createElement('tr');
|
2491 |
+
tr_row.setAttribute("id", num+"_element_tr0");
|
2492 |
+
for (i=0;i<=100;i++) {
|
2493 |
+
if (document.getElementById('el_choices'+i)) {
|
2494 |
+
if (gago >= columns) {
|
2495 |
+
gago=0;
|
2496 |
+
var tr_row = document.createElement('tr');
|
2497 |
+
tr_row.setAttribute("id", num+"_element_tr"+vaxo);
|
2498 |
+
vaxo++;
|
2499 |
+
}
|
2500 |
+
var td = document.createElement('td');
|
2501 |
+
td.setAttribute("valign", "top");
|
2502 |
+
td.setAttribute("id", num+"_td_little"+i);
|
2503 |
+
td.setAttribute("idi", i);
|
2504 |
+
var adding = document.createElement(element);
|
2505 |
+
adding.setAttribute("type", type);
|
2506 |
+
adding.setAttribute("value", document.getElementById("el_choices"+i).value);
|
2507 |
+
adding.setAttribute("id", num+"_elementform_id_temp"+i);
|
2508 |
+
if(type=='checkbox')
|
2509 |
+
{
|
2510 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2511 |
+
{
|
2512 |
+
adding.setAttribute("other", "1");
|
2513 |
+
adding.setAttribute("onclick", "if(set_checked('"+num+"','"+i+"','form_id_temp')) show_other_input('"+num+"','form_id_temp');");
|
2514 |
+
}
|
2515 |
+
else
|
2516 |
+
adding.setAttribute("onclick", "set_checked('"+num+"','"+i+"','form_id_temp')");
|
2517 |
+
|
2518 |
+
adding.setAttribute("name", num+"_elementform_id_temp"+i);
|
2519 |
+
}
|
2520 |
+
|
2521 |
+
if(type=='radio')
|
2522 |
+
{
|
2523 |
+
adding.setAttribute("name", num+"_elementform_id_temp");
|
2524 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2525 |
+
{
|
2526 |
+
adding.setAttribute("other", "1");
|
2527 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp'); show_other_input('"+num+"','form_id_temp');");
|
2528 |
+
|
2529 |
+
}
|
2530 |
+
else
|
2531 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp')");
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
|
2535 |
+
|
2536 |
+
var label_adding = document.createElement('label');
|
2537 |
+
label_adding.setAttribute("id", num+"_label_element"+i);
|
2538 |
+
label_adding.setAttribute("class", "ch_rad_label");
|
2539 |
+
label_adding.setAttribute("for",num+"_elementform_id_temp"+i);
|
2540 |
+
label_adding.innerHTML=document.getElementById("el_choices"+i).value;
|
2541 |
+
|
2542 |
+
td.appendChild(adding);
|
2543 |
+
td.appendChild(label_adding);
|
2544 |
+
|
2545 |
+
tr_row.appendChild(td);
|
2546 |
+
table.appendChild(tr_row);
|
2547 |
+
|
2548 |
+
|
2549 |
+
gago++;
|
2550 |
+
|
2551 |
+
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
|
2555 |
+
|
2556 |
+
}
|
2557 |
+
|
2558 |
+
|
2559 |
+
}
|
2560 |
+
|
2561 |
+
else{
|
2562 |
+
|
2563 |
+
var rows = document.getElementById('edit_for_rowcol').value;
|
2564 |
+
|
2565 |
+
for(i=0;i<=100;i++)
|
2566 |
+
{
|
2567 |
+
if(document.getElementById('el_choices'+i))
|
2568 |
+
choeices++;
|
2569 |
+
}
|
2570 |
+
|
2571 |
+
element='input';
|
2572 |
+
columns = parseInt((choeices+1)/rows);
|
2573 |
+
|
2574 |
+
|
2575 |
+
var gago=0;
|
2576 |
+
var vaxo=0;
|
2577 |
+
for(i=0;i<=100;i++)
|
2578 |
+
{
|
2579 |
+
if(document.getElementById('el_choices'+i))
|
2580 |
+
{
|
2581 |
+
|
2582 |
+
if(gago < rows)
|
2583 |
+
{
|
2584 |
+
var tr_row = document.createElement('tr');
|
2585 |
+
tr_row.setAttribute("id", num+"_element_tr"+i);
|
2586 |
+
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
var td = document.createElement('td');
|
2590 |
+
td.setAttribute("valign", "top");
|
2591 |
+
td.setAttribute("id", num+"_td_little"+i);
|
2592 |
+
td.setAttribute("idi", i);
|
2593 |
+
|
2594 |
+
|
2595 |
+
var adding = document.createElement(element);
|
2596 |
+
adding.setAttribute("type", type);
|
2597 |
+
adding.setAttribute("value", document.getElementById("el_choices"+i).value);
|
2598 |
+
adding.setAttribute("id", num+"_elementform_id_temp"+i);
|
2599 |
+
if(type=='checkbox')
|
2600 |
+
{
|
2601 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2602 |
+
{
|
2603 |
+
adding.setAttribute("other", "1");
|
2604 |
+
adding.setAttribute("onclick", "if(set_checked('"+num+"','"+i+"','form_id_temp')) show_other_input('"+num+"','form_id_temp');");
|
2605 |
+
}
|
2606 |
+
else
|
2607 |
+
adding.setAttribute("onclick", "set_checked('"+num+"','"+i+"','form_id_temp')");
|
2608 |
+
|
2609 |
+
adding.setAttribute("name", num+"_elementform_id_temp"+i);
|
2610 |
+
}
|
2611 |
+
|
2612 |
+
if(type=='radio')
|
2613 |
+
{
|
2614 |
+
adding.setAttribute("name", num+"_elementform_id_temp");
|
2615 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2616 |
+
{
|
2617 |
+
adding.setAttribute("other", "1");
|
2618 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp'); show_other_input('"+num+"','form_id_temp')");
|
2619 |
+
|
2620 |
+
}
|
2621 |
+
else
|
2622 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp')");
|
2623 |
+
}
|
2624 |
+
|
2625 |
+
var label_adding = document.createElement('label');
|
2626 |
+
label_adding.setAttribute("id", num+"_label_element"+i);
|
2627 |
+
label_adding.setAttribute("class", "ch_rad_label");
|
2628 |
+
label_adding.setAttribute("for",num+"_elementform_id_temp"+i);
|
2629 |
+
label_adding.innerHTML=document.getElementById("el_choices"+i).value;
|
2630 |
+
td.appendChild(adding);
|
2631 |
+
td.appendChild(label_adding);
|
2632 |
+
|
2633 |
+
|
2634 |
+
if(gago < rows)
|
2635 |
+
{
|
2636 |
+
tr_row.appendChild(td);
|
2637 |
+
table.appendChild(tr_row);
|
2638 |
+
}
|
2639 |
+
else
|
2640 |
+
{
|
2641 |
+
if(vaxo==rows)
|
2642 |
+
vaxo=0;
|
2643 |
+
tr_row = document.getElementById(num+'_table_little').childNodes[vaxo];
|
2644 |
+
tr_row.appendChild(td);
|
2645 |
+
vaxo++;
|
2646 |
+
}
|
2647 |
+
|
2648 |
+
|
2649 |
+
gago++;
|
2650 |
+
|
2651 |
+
|
2652 |
+
|
2653 |
+
|
2654 |
+
|
2655 |
+
}
|
2656 |
+
|
2657 |
+
|
2658 |
+
|
2659 |
+
}
|
2660 |
+
table.setAttribute("for_hor", num+"_hor");
|
2661 |
+
}
|
2662 |
+
}
|
2663 |
+
else
|
2664 |
+
{
|
2665 |
+
document.getElementById(num+'_rowcol_numform_id_temp').value = '';
|
2666 |
+
|
2667 |
+
var table = document.getElementById(num+'_table_little');
|
2668 |
+
table.innerHTML="";
|
2669 |
+
|
2670 |
+
var tr0 = document.createElement('tr');
|
2671 |
+
tr0.setAttribute("id", num+"_hor");
|
2672 |
+
|
2673 |
+
|
2674 |
+
for(i=0;i<=100;i++)
|
2675 |
+
{
|
2676 |
+
if(document.getElementById('el_choices'+i))
|
2677 |
+
{
|
2678 |
+
|
2679 |
+
element='input';
|
2680 |
+
|
2681 |
+
if(document.getElementById('edit_for_flow_vertical').checked==true)
|
2682 |
+
{
|
2683 |
+
var tr = document.createElement('tr');
|
2684 |
+
tr.setAttribute("id", num+"_element_tr"+i);
|
2685 |
+
var td = document.createElement('td');
|
2686 |
+
td.setAttribute("valign", "top");
|
2687 |
+
td.setAttribute("id", num+"_td_little"+i);
|
2688 |
+
td.setAttribute("idi", i);
|
2689 |
+
|
2690 |
+
var adding = document.createElement(element);
|
2691 |
+
adding.setAttribute("type", type);
|
2692 |
+
adding.setAttribute("value", document.getElementById("el_choices"+i).value);
|
2693 |
+
adding.setAttribute("id", num+"_elementform_id_temp"+i);
|
2694 |
+
if(type=='checkbox')
|
2695 |
+
{
|
2696 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2697 |
+
{
|
2698 |
+
adding.setAttribute("other", "1");
|
2699 |
+
adding.setAttribute("onclick", "if(set_checked('"+num+"','"+i+"','form_id_temp')) show_other_input('"+num+"','form_id_temp');");
|
2700 |
+
}
|
2701 |
+
else
|
2702 |
+
adding.setAttribute("onclick", "set_checked('"+num+"','"+i+"','form_id_temp')");
|
2703 |
+
|
2704 |
+
adding.setAttribute("name", num+"_elementform_id_temp"+i);
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
if(type=='radio')
|
2708 |
+
{
|
2709 |
+
adding.setAttribute("name", num+"_elementform_id_temp");
|
2710 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2711 |
+
{
|
2712 |
+
adding.setAttribute("other", "1");
|
2713 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp'); show_other_input('"+num+"','form_id_temp')");
|
2714 |
+
|
2715 |
+
}
|
2716 |
+
else
|
2717 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp')");
|
2718 |
+
}
|
2719 |
+
|
2720 |
+
|
2721 |
+
var label_adding = document.createElement('label');
|
2722 |
+
label_adding.setAttribute("id", num+"_label_element"+i);
|
2723 |
+
label_adding.setAttribute("class", "ch_rad_label");
|
2724 |
+
label_adding.setAttribute("for",num+"_elementform_id_temp"+i);
|
2725 |
+
label_adding.innerHTML=document.getElementById("el_choices"+i).value;
|
2726 |
+
td.appendChild(adding);
|
2727 |
+
td.appendChild(label_adding);
|
2728 |
+
tr.appendChild(td);
|
2729 |
+
table.appendChild(tr);
|
2730 |
+
}
|
2731 |
+
|
2732 |
+
else
|
2733 |
+
{
|
2734 |
+
var td = document.createElement('td');
|
2735 |
+
td.setAttribute("valign", "top");
|
2736 |
+
td.setAttribute("id", num+"_td_little"+i);
|
2737 |
+
td.setAttribute("idi", i);
|
2738 |
+
|
2739 |
+
var adding = document.createElement(element);
|
2740 |
+
adding.setAttribute("type", type);
|
2741 |
+
adding.setAttribute("value", document.getElementById("el_choices"+i).value);
|
2742 |
+
adding.setAttribute("id", num+"_elementform_id_temp"+i);
|
2743 |
+
|
2744 |
+
if(type=='checkbox')
|
2745 |
+
{
|
2746 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2747 |
+
{
|
2748 |
+
adding.setAttribute("other", "1");
|
2749 |
+
adding.setAttribute("onclick", "if(set_checked('"+num+"','"+i+"','form_id_temp')) show_other_input('"+num+"','form_id_temp');");
|
2750 |
+
}
|
2751 |
+
else
|
2752 |
+
adding.setAttribute("onclick", "set_checked('"+num+"','"+i+"','form_id_temp')");
|
2753 |
+
|
2754 |
+
adding.setAttribute("name", num+"_elementform_id_temp"+i);
|
2755 |
+
}
|
2756 |
+
|
2757 |
+
if(type=='radio')
|
2758 |
+
{
|
2759 |
+
adding.setAttribute("name", num+"_elementform_id_temp");
|
2760 |
+
if(document.getElementById(num+"_allow_otherform_id_temp").value=="yes" && document.getElementById("el_choices"+i).getAttribute('other')=='1')
|
2761 |
+
{
|
2762 |
+
adding.setAttribute("other", "1");
|
2763 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp'); show_other_input('"+num+"','form_id_temp')");
|
2764 |
+
}
|
2765 |
+
else
|
2766 |
+
adding.setAttribute("onClick", "set_default('"+num+"','"+i+"','form_id_temp')");
|
2767 |
+
}
|
2768 |
+
|
2769 |
+
|
2770 |
+
var label_adding = document.createElement('label');
|
2771 |
+
label_adding.setAttribute("id", num+"_label_element"+i);
|
2772 |
+
label_adding.setAttribute("class", "ch_rad_label");
|
2773 |
+
label_adding.setAttribute("for",num+"_elementform_id_temp"+i);
|
2774 |
+
label_adding.innerHTML=document.getElementById("el_choices"+i).value;
|
2775 |
+
|
2776 |
+
td.appendChild(adding);
|
2777 |
+
td.appendChild(label_adding);
|
2778 |
+
tr0.appendChild(td);
|
2779 |
+
table.appendChild(tr0);
|
2780 |
+
}
|
2781 |
+
}
|
2782 |
+
}
|
2783 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2784 |
}
|
2785 |
|
2786 |
+
function remove_choise(id, num, type) {
|
2787 |
+
var choices_td= document.getElementById('choices');
|
2788 |
+
var el_choices = document.getElementById('el_choices'+id);
|
2789 |
+
var el_choices_remove = document.getElementById('el_choices'+id+'_remove');
|
2790 |
+
var br = document.getElementById('br'+id);
|
2791 |
+
choices_td.removeChild(el_choices);
|
2792 |
+
choices_td.removeChild(el_choices_remove);
|
2793 |
+
choices_td.removeChild(br);
|
2794 |
+
refresh_rowcol(num, type);
|
2795 |
+
refresh_id_name(num, document.getElementById(num+'_typeform_id_temp').value );
|
2796 |
}
|
2797 |
|
2798 |
+
function add_grading_items(num){
|
2799 |
+
for(i=100;i>0;i--)
|
2800 |
+
{
|
2801 |
+
if(document.getElementById("el_items"+i))
|
2802 |
+
{
|
2803 |
+
break;
|
2804 |
+
}
|
2805 |
+
}
|
2806 |
+
|
2807 |
+
m=i+1;
|
2808 |
+
|
2809 |
+
var choices_td= document.getElementById("items");
|
2810 |
+
|
2811 |
+
var br = document.createElement('br');
|
2812 |
+
br.setAttribute("id", "britems"+m);
|
2813 |
+
var el_choices = document.createElement('input');
|
2814 |
+
el_choices.setAttribute("id", "el_items"+m);
|
2815 |
+
el_choices.setAttribute("type", "text");
|
2816 |
+
el_choices.setAttribute("value", "");
|
2817 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
2818 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_label_elementform_id_temp"+m+"', this.value); change_in_value('"+num+"_label_elementform_id_temp"+m+"', this.value)");
|
2819 |
+
|
2820 |
+
var el_choices_remove = document.createElement('img');
|
2821 |
+
el_choices_remove.setAttribute("id", "el_items"+m+"_remove");
|
2822 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
2823 |
+
el_choices_remove.style.cssText = 'cursor:pointer;vertical-align:middle; margin:3px';
|
2824 |
+
el_choices_remove.setAttribute("align", 'top');
|
2825 |
+
el_choices_remove.setAttribute("onClick", "remove_grading_items('"+m+"','"+num+"')");
|
2826 |
+
|
2827 |
+
choices_td.appendChild(br);
|
2828 |
+
choices_td.appendChild(el_choices);
|
2829 |
+
choices_td.appendChild(el_choices_remove);
|
2830 |
+
|
2831 |
+
|
2832 |
+
refresh_grading_items(num);
|
2833 |
+
refresh_id_name(num, 'type_grading');
|
2834 |
|
2835 |
}
|
2836 |
|
2837 |
+
function sum_grading_values(a,b){}
|
2838 |
+
|
2839 |
+
function refresh_grading_items(num){
|
2840 |
+
|
2841 |
+
for(i=100;i>0;i--)
|
2842 |
+
{
|
2843 |
+
if(document.getElementById("el_items"+i))
|
2844 |
+
{
|
2845 |
+
break;
|
2846 |
+
}
|
2847 |
+
}
|
2848 |
+
m=i;
|
2849 |
+
|
2850 |
+
|
2851 |
+
var div = document.getElementById(num+'_elementform_id_temp');
|
2852 |
+
div.innerHTML='';
|
2853 |
+
|
2854 |
+
|
2855 |
+
for(i=0;i<=m;i++)
|
2856 |
+
{
|
2857 |
+
|
2858 |
+
if(document.getElementById("el_items"+i))
|
2859 |
+
{
|
2860 |
+
|
2861 |
+
var div_grading = document.createElement('div');
|
2862 |
+
div_grading.setAttribute("id", num+"_element_div"+i);
|
2863 |
+
div_grading.setAttribute("class", "grading");
|
2864 |
+
|
2865 |
+
|
2866 |
+
var input_item = document.createElement('input');
|
2867 |
+
input_item.setAttribute("id", num+"_elementform_id_temp"+i);
|
2868 |
+
input_item.setAttribute("name", num+"_elementform_id_temp"+i);
|
2869 |
+
input_item.setAttribute("onKeyPress", "return check_isnum_or_minus(event)");
|
2870 |
+
input_item.setAttribute("value", "");
|
2871 |
+
input_item.setAttribute("size", "5");
|
2872 |
+
input_item.setAttribute("onKeyUp", "sum_grading_values("+num+",'form_id_temp')");
|
2873 |
+
input_item.setAttribute("onChange", "sum_grading_values("+num+",'form_id_temp')");
|
2874 |
+
|
2875 |
+
var label_item = document.createElement('label');
|
2876 |
+
label_item.setAttribute("id", num+"_label_elementform_id_temp"+i);
|
2877 |
+
label_item.setAttribute("class", "ch_rad_label");
|
2878 |
+
//label_item.setAttribute("for",num+"_elementform_id_temp"+i);
|
2879 |
+
label_item.innerHTML = document.getElementById("el_items"+i).value;
|
2880 |
+
|
2881 |
+
|
2882 |
+
div_grading.appendChild(input_item);
|
2883 |
+
div_grading.appendChild(label_item);
|
2884 |
+
div.appendChild(div_grading);
|
2885 |
+
|
2886 |
+
}
|
2887 |
+
|
2888 |
}
|
2889 |
+
var div_total = document.createElement('div');
|
2890 |
+
div_total.setAttribute("id", num+"_element_total_divform_id_temp");
|
2891 |
+
div_total.setAttribute("class", "grading_div");
|
2892 |
+
var Total = document.createTextNode("Total:");
|
2893 |
+
var Seperator = document.createTextNode("/");
|
2894 |
+
|
2895 |
+
var span_total = document.createElement('span');
|
2896 |
+
span_total.setAttribute("id", num+"_total_elementform_id_temp");
|
2897 |
+
span_total.setAttribute("name", num+"_total_elementform_id_temp");
|
2898 |
+
span_total.innerHTML = document.getElementById(num+'_grading_totalform_id_temp').value;
|
2899 |
+
|
2900 |
+
var span_gum = document.createElement('span');
|
2901 |
+
span_gum.setAttribute("id", num+"_sum_elementform_id_temp");
|
2902 |
+
span_gum.setAttribute("name", num+"_sum_elementform_id_temp");
|
2903 |
+
span_gum.innerHTML = 0;
|
2904 |
+
|
2905 |
+
var span_of_text = document.createElement('span');
|
2906 |
+
span_of_text.setAttribute("id", num+"_text_elementform_id_temp");
|
2907 |
+
span_of_text.setAttribute("name", num+"_text_elementform_id_temp");
|
2908 |
+
span_of_text.innerHTML = "";
|
2909 |
+
|
2910 |
+
div_total.appendChild(Total);
|
2911 |
+
div_total.appendChild(span_gum);
|
2912 |
+
div_total.appendChild(Seperator);
|
2913 |
+
div_total.appendChild(span_total);
|
2914 |
+
div_total.appendChild(span_of_text);
|
2915 |
+
div.appendChild(div_total);
|
2916 |
+
|
2917 |
}
|
2918 |
|
2919 |
+
function remove_grading_items(id, num){
|
2920 |
+
var choices_td= document.getElementById("items");
|
2921 |
+
|
2922 |
+
var el_choices = document.getElementById('el_items'+id);
|
2923 |
+
var el_choices_remove = document.getElementById('el_items'+id+'_remove');
|
2924 |
+
var br = document.getElementById('britems'+id);
|
2925 |
+
|
2926 |
+
choices_td.removeChild(el_choices);
|
2927 |
+
choices_td.removeChild(el_choices_remove);
|
2928 |
+
choices_td.removeChild(br);
|
2929 |
+
|
2930 |
+
refresh_grading_items(num);
|
2931 |
+
refresh_id_name(num, 'type_grading');
|
2932 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2933 |
|
|
|
|
|
2934 |
|
|
|
|
|
|
|
2935 |
|
|
|
|
|
2936 |
|
2937 |
+
function add_to_matrix(type, num){
|
2938 |
+
for(i=100;i>0;i--)
|
2939 |
+
{
|
2940 |
+
if(document.getElementById("el_rows"+i))
|
2941 |
+
{
|
2942 |
+
break;
|
2943 |
+
}
|
2944 |
+
}
|
2945 |
+
if(type=="rows")
|
2946 |
+
{
|
2947 |
+
m=i+1;
|
2948 |
+
}
|
2949 |
+
else
|
2950 |
+
m=i;
|
2951 |
+
|
2952 |
+
for(i=100;i>0;i--)
|
2953 |
+
{
|
2954 |
+
if(document.getElementById("el_columns"+i))
|
2955 |
+
{
|
2956 |
+
break;
|
2957 |
+
}
|
2958 |
+
}
|
2959 |
+
if(type=="columns")
|
2960 |
+
{
|
2961 |
+
n=i+1;
|
2962 |
+
}
|
2963 |
+
else
|
2964 |
+
n=i;
|
2965 |
+
|
2966 |
+
|
2967 |
+
|
2968 |
+
var choices_td= document.getElementById(type);
|
2969 |
+
if(type=="rows")
|
2970 |
+
{
|
2971 |
+
var br = document.createElement('br');
|
2972 |
+
br.setAttribute("id", "br"+type+m);
|
2973 |
+
var el_choices = document.createElement('input');
|
2974 |
+
el_choices.setAttribute("id", "el_"+type+m);
|
2975 |
+
el_choices.setAttribute("type", "text");
|
2976 |
+
el_choices.setAttribute("value", "");
|
2977 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
2978 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_label_elementform_id_temp"+m+"_0', this.value); change_in_value('"+num+"_label_elementform_id_temp"+m+"_0', this.value)");
|
2979 |
+
|
2980 |
+
var el_choices_remove = document.createElement('img');
|
2981 |
+
el_choices_remove.setAttribute("id", "el_"+type+m+"_remove");
|
2982 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
2983 |
+
el_choices_remove.style.cssText = 'cursor:pointer;vertical-align:middle; margin:3px';
|
2984 |
+
el_choices_remove.setAttribute("align", 'top');
|
2985 |
+
el_choices_remove.setAttribute("onClick", "remove_rowcols('"+m+"','"+num+"','"+type+"')");
|
2986 |
+
|
2987 |
+
choices_td.appendChild(br);
|
2988 |
+
choices_td.appendChild(el_choices);
|
2989 |
+
choices_td.appendChild(el_choices_remove);
|
2990 |
+
}
|
2991 |
+
else
|
2992 |
+
{
|
2993 |
+
var br = document.createElement('br');
|
2994 |
+
br.setAttribute("id", "br"+type+n);
|
2995 |
+
var el_choices = document.createElement('input');
|
2996 |
+
el_choices.setAttribute("id", "el_"+type+n);
|
2997 |
+
el_choices.setAttribute("type", "text");
|
2998 |
+
el_choices.setAttribute("value", "");
|
2999 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
3000 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+num+"_label_elementform_id_temp"+"0_"+n+"', this.value); change_in_value('"+num+"_label_elementform_id_temp"+"0_"+n+"', this.value)");
|
3001 |
+
|
3002 |
+
var el_choices_remove = document.createElement('img');
|
3003 |
+
el_choices_remove.setAttribute("id", "el_"+type+n+"_remove");
|
3004 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
3005 |
+
el_choices_remove.style.cssText = 'cursor:pointer;vertical-align:middle; margin:3px';
|
3006 |
+
el_choices_remove.setAttribute("align", 'top');
|
3007 |
+
el_choices_remove.setAttribute("onClick", "remove_rowcols('"+n+"','"+num+"','"+type+"')");
|
3008 |
+
|
3009 |
+
choices_td.appendChild(br);
|
3010 |
+
choices_td.appendChild(el_choices);
|
3011 |
+
choices_td.appendChild(el_choices_remove);
|
3012 |
+
|
3013 |
+
}
|
3014 |
+
refresh_matrix(num);
|
3015 |
|
|
|
3016 |
|
|
|
|
|
|
|
|
|
3017 |
}
|
3018 |
|
|
|
|
|
|
|
|
|
3019 |
|
3020 |
+
function refresh_matrix(num){
|
3021 |
+
|
3022 |
+
for(i=100;i>0;i--)
|
3023 |
+
{
|
3024 |
+
if(document.getElementById("el_rows"+i))
|
3025 |
+
{
|
3026 |
+
break;
|
3027 |
+
}
|
3028 |
+
}
|
3029 |
+
m=i;
|
3030 |
+
|
3031 |
+
for(i=100;i>0;i--)
|
3032 |
+
{
|
3033 |
+
if(document.getElementById("el_columns"+i))
|
3034 |
+
{
|
3035 |
+
break;
|
3036 |
+
}
|
3037 |
+
}
|
3038 |
+
n=i;
|
3039 |
+
|
3040 |
+
|
3041 |
+
|
3042 |
+
|
3043 |
+
|
3044 |
+
var table = document.getElementById(num+'_table_little');
|
3045 |
+
table.innerHTML='';
|
3046 |
+
|
3047 |
+
|
3048 |
+
var tr0 = document.createElement('tr');
|
3049 |
+
tr0.setAttribute("id", num+"_element_tr0");
|
3050 |
+
|
3051 |
+
table.appendChild(tr0);
|
3052 |
+
|
3053 |
+
var td0 = document.createElement('td');
|
3054 |
+
td0.setAttribute("id", num+"_element_td0_0");
|
3055 |
+
td0.innerHTML="";
|
3056 |
+
tr0.appendChild(td0);
|
3057 |
+
|
3058 |
+
|
3059 |
+
for(k=1;k<=n;k++)
|
3060 |
+
{
|
3061 |
+
if(document.getElementById("el_columns"+k))
|
3062 |
+
{
|
3063 |
+
|
3064 |
+
var td = document.createElement('td');
|
3065 |
+
td.setAttribute("id", num+"_element_td0_"+k);
|
3066 |
+
td.setAttribute("class", "matrix_");
|
3067 |
+
|
3068 |
+
|
3069 |
+
var label_column = document.createElement('label');
|
3070 |
+
label_column.setAttribute("id", num+"_label_elementform_id_temp"+"0_"+k);
|
3071 |
+
label_column.setAttribute("name", num+"_label_elementform_id_temp"+"0_"+k);
|
3072 |
+
label_column.setAttribute("class", "ch_rad_label");
|
3073 |
+
label_column.setAttribute("for",num+"_elementform_id_temp"+k);
|
3074 |
+
label_column.innerHTML=document.getElementById("el_columns"+k).value;
|
3075 |
+
|
3076 |
+
|
3077 |
+
|
3078 |
+
td.appendChild(label_column);
|
3079 |
+
|
3080 |
+
tr0.appendChild(td);
|
3081 |
+
|
3082 |
+
|
3083 |
+
}
|
3084 |
+
}
|
3085 |
+
|
3086 |
+
|
3087 |
+
|
3088 |
+
for(i=1;i<=m;i++)
|
3089 |
+
{
|
3090 |
+
|
3091 |
+
if(document.getElementById("el_rows"+i))
|
3092 |
+
{
|
3093 |
+
var tr = document.createElement('tr');
|
3094 |
+
tr.setAttribute("id", num+"_element_tr"+i);
|
3095 |
+
var td0 = document.createElement('td');
|
3096 |
+
td0.setAttribute("id", num+"_element_td"+i+"_0");
|
3097 |
+
td0.setAttribute("class", "matrix_");
|
3098 |
+
|
3099 |
+
var label_row = document.createElement('label');
|
3100 |
+
label_row.setAttribute("id", num+"_label_elementform_id_temp"+i+"_0");
|
3101 |
+
label_row.setAttribute("class", "ch_rad_label");
|
3102 |
+
label_row.setAttribute("for",num+"_elementform_id_temp"+i);
|
3103 |
+
label_row.innerHTML=document.getElementById("el_rows"+i).value;
|
3104 |
+
|
3105 |
+
|
3106 |
+
|
3107 |
+
|
3108 |
+
td0.appendChild(label_row);
|
3109 |
+
tr.appendChild(td0);
|
3110 |
+
|
3111 |
+
table.appendChild(tr);
|
3112 |
+
|
3113 |
+
for(k=1;k<=n;k++)
|
3114 |
+
{
|
3115 |
+
if(document.getElementById("el_columns"+k))
|
3116 |
+
{
|
3117 |
+
|
3118 |
+
var td = document.createElement('td');
|
3119 |
+
td.setAttribute("id", num+"_element_td"+i+"_"+k);
|
3120 |
+
td.style.cssText = "text-align:center";
|
3121 |
+
|
3122 |
+
|
3123 |
+
|
3124 |
+
|
3125 |
+
|
3126 |
+
if(document.getElementById("edit_for_select_input_type").value=="select"){
|
3127 |
+
var select_yes_no = document.createElement('select');
|
3128 |
+
select_yes_no.setAttribute("id", num+"_select_yes_noform_id_temp"+i+"_"+k);
|
3129 |
+
select_yes_no.setAttribute("name", num+"_select_yes_noform_id_temp"+i+"_"+k);
|
3130 |
+
var option_yes_no1 = document.createElement('option');
|
3131 |
+
option_yes_no1.setAttribute("value", "");
|
3132 |
+
Nothing = document.createTextNode(" ");
|
3133 |
+
|
3134 |
+
var option_yes_no2 = document.createElement('option');
|
3135 |
+
option_yes_no2.setAttribute("value", "yes");
|
3136 |
+
Yes = document.createTextNode("Yes");
|
3137 |
+
|
3138 |
+
var option_yes_no3 = document.createElement('option');
|
3139 |
+
option_yes_no3.setAttribute("value", "no");
|
3140 |
+
No = document.createTextNode("No");
|
3141 |
+
|
3142 |
+
option_yes_no1.appendChild(Nothing);
|
3143 |
+
option_yes_no2.appendChild(Yes);
|
3144 |
+
option_yes_no3.appendChild(No);
|
3145 |
+
select_yes_no.appendChild(option_yes_no1);
|
3146 |
+
select_yes_no.appendChild(option_yes_no2);
|
3147 |
+
select_yes_no.appendChild(option_yes_no3);
|
3148 |
+
td.appendChild(select_yes_no);
|
3149 |
+
}
|
3150 |
+
else{
|
3151 |
+
var input_of_matrix = document.createElement('input');
|
3152 |
+
input_of_matrix.setAttribute("id", num+"_input_elementform_id_temp"+i+"_"+k);
|
3153 |
+
input_of_matrix.setAttribute("align", "center");
|
3154 |
+
input_of_matrix.setAttribute("size", "14");
|
3155 |
+
|
3156 |
+
input_of_matrix.setAttribute("type", document.getElementById("edit_for_select_input_type").value);
|
3157 |
+
|
3158 |
+
|
3159 |
+
if(document.getElementById("edit_for_select_input_type").value=="radio"){
|
3160 |
+
input_of_matrix.setAttribute("name", num+"_input_elementform_id_temp"+i);
|
3161 |
+
input_of_matrix.setAttribute("value", i+"_"+k);
|
3162 |
+
}
|
3163 |
+
else {
|
3164 |
+
if(document.getElementById("edit_for_select_input_type").value=="checkbox"){
|
3165 |
+
input_of_matrix.setAttribute("name", num+"_input_elementform_id_temp"+i+"_"+k);
|
3166 |
+
input_of_matrix.setAttribute("value", 1);
|
3167 |
+
}
|
3168 |
+
else{
|
3169 |
+
input_of_matrix.setAttribute("name", num+"_input_elementform_id_temp"+i+"_"+k);
|
3170 |
+
input_of_matrix.setAttribute("value", '');
|
3171 |
+
}
|
3172 |
+
}
|
3173 |
+
td.appendChild(input_of_matrix);
|
3174 |
+
|
3175 |
+
}
|
3176 |
+
|
3177 |
+
|
3178 |
+
tr.appendChild(td);
|
3179 |
+
}
|
3180 |
+
}
|
3181 |
+
}
|
3182 |
}
|
3183 |
+
|
|
|
|
|
3184 |
}
|
3185 |
|
3186 |
+
function remove_rowcols(id, num, type)
|
3187 |
+
{
|
3188 |
+
var choices_td= document.getElementById(type);
|
3189 |
+
|
3190 |
+
var el_choices = document.getElementById('el_'+type+id);
|
3191 |
+
var el_choices_remove = document.getElementById('el_'+type+id+'_remove');
|
3192 |
+
var br = document.getElementById('br'+type+id);
|
3193 |
+
|
3194 |
+
choices_td.removeChild(el_choices);
|
3195 |
+
choices_td.removeChild(el_choices_remove);
|
3196 |
+
choices_td.removeChild(br);
|
3197 |
+
|
3198 |
+
refresh_matrix(num);
|
3199 |
}
|
3200 |
|
3201 |
+
function remove_option(id, num) {
|
3202 |
+
var select_ = document.getElementById(num+'_elementform_id_temp');
|
3203 |
+
var option = document.getElementById(num+'_option'+id);
|
3204 |
+
select_.removeChild(option);
|
3205 |
+
var choices_td= document.getElementById('choices');
|
3206 |
+
var el_choices = document.getElementById('el_option'+id);
|
3207 |
+
var el_choices_dis = document.getElementById('el_option'+id+'_dis');
|
3208 |
+
var el_choices_remove = document.getElementById('el_option'+id+'_remove');
|
3209 |
+
var br = document.getElementById('br'+id);
|
3210 |
+
choices_td.removeChild(el_choices);
|
3211 |
+
choices_td.removeChild(el_choices_dis);
|
3212 |
+
choices_td.removeChild(el_choices_remove);
|
3213 |
+
choices_td.removeChild(br);
|
3214 |
}
|
3215 |
|
3216 |
+
function getIFrameDocument(aID) {
|
3217 |
+
var rv = null;
|
3218 |
+
// If contentDocument exists, W3C compliant (Mozilla).
|
3219 |
+
if (document.getElementById(aID).contentDocument) {
|
3220 |
+
rv = document.getElementById(aID).contentDocument;
|
3221 |
+
}
|
3222 |
+
else {
|
3223 |
+
// IE.
|
3224 |
+
rv = document.frames[aID].document;
|
3225 |
+
}
|
3226 |
+
return rv;
|
3227 |
}
|
3228 |
|
3229 |
+
function delete_last_child() {
|
3230 |
+
if (document.getElementsByTagName("iframe")[id_ifr_editor]) {
|
3231 |
+
ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
|
3232 |
+
ifr = getIFrameDocument(ifr_id);
|
3233 |
+
ifr.body.innerHTML = "";
|
3234 |
+
}
|
3235 |
+
document.getElementById('main_editor').style.display = "none";
|
3236 |
+
document.getElementById('form_maker_editor').value = "";
|
3237 |
+
if (document.getElementById('show_table').lastChild) {
|
3238 |
+
var del1 = document.getElementById('show_table').lastChild;
|
3239 |
+
var del2 = document.getElementById('edit_table').lastChild;
|
3240 |
+
var main1 = document.getElementById('show_table');
|
3241 |
+
var main2 = document.getElementById('edit_table');
|
3242 |
+
main1.removeChild(del1);
|
3243 |
+
main2.removeChild(del2);
|
3244 |
+
}
|
3245 |
}
|
3246 |
|
3247 |
+
function format_12(num, am_or_pm, w_hh, w_mm, w_ss) {
|
3248 |
+
tr_time1 = document.getElementById(num+'_tr_time1')
|
3249 |
+
tr_time2 = document.getElementById(num+'_tr_time2')
|
3250 |
+
var td1 = document.createElement('td');
|
3251 |
+
td1.setAttribute("id", num+"_am_pm_select");
|
3252 |
+
td1.setAttribute("class", "td_am_pm_select");
|
3253 |
+
var td2 = document.createElement('td');
|
3254 |
+
td2.setAttribute("id", num+"_am_pm_label");
|
3255 |
+
td2.setAttribute("class", "td_am_pm_select");
|
3256 |
+
var am_pm_select = document.createElement('select');
|
3257 |
+
am_pm_select.setAttribute("class", "am_pm_select");
|
3258 |
+
am_pm_select.setAttribute("name", num+"_am_pmform_id_temp");
|
3259 |
+
am_pm_select.setAttribute("id", num+"_am_pmform_id_temp");
|
3260 |
+
am_pm_select.setAttribute("onchange", "set_sel_am_pm(this)");
|
3261 |
+
var am_option = document.createElement('option');
|
3262 |
+
am_option.setAttribute("value", "am");
|
3263 |
+
am_option.innerHTML = "AM";
|
3264 |
+
var pm_option = document.createElement('option');
|
3265 |
+
pm_option.setAttribute("value", "pm");
|
3266 |
+
pm_option.innerHTML = "PM";
|
3267 |
+
if (am_or_pm == "pm") {
|
3268 |
+
pm_option.setAttribute("selected", "selected");
|
3269 |
}
|
3270 |
+
else {
|
3271 |
+
am_option.setAttribute("selected", "selected");
|
|
|
|
|
|
|
|
|
|
|
3272 |
}
|
3273 |
+
var am_pm_label = document.createElement('label');
|
3274 |
+
am_pm_label.setAttribute("class", "mini_label");
|
3275 |
+
am_pm_label.setAttribute("id", num+"_mini_label_am_pm");
|
3276 |
+
am_pm_label.innerHTML=w_mini_labels[3];
|
3277 |
+
am_pm_select.appendChild(am_option);
|
3278 |
+
am_pm_select.appendChild(pm_option);
|
3279 |
+
td1.appendChild(am_pm_select);
|
3280 |
+
td2.appendChild(am_pm_label);
|
3281 |
+
tr_time1.appendChild(td1);
|
3282 |
+
tr_time2.appendChild(td2);
|
3283 |
+
document.getElementById(num+'_hhform_id_temp').setAttribute("onKeyPress", "return check_hour(event, '"+num+"_hhform_id_temp',"+"'12'"+")");
|
3284 |
+
document.getElementById(num+'_hhform_id_temp').value=w_hh;
|
3285 |
+
document.getElementById(num+'_mmform_id_temp').value=w_mm;
|
3286 |
+
if (document.getElementById(num + '_ssform_id_temp')) {
|
3287 |
+
document.getElementById(num+'_ssform_id_temp').value = w_ss;
|
3288 |
+
}
|
3289 |
+
refresh_attr(num, 'type_time');
|
3290 |
+
jQuery(document).ready(function() {
|
3291 |
+
jQuery("label#"+num+"_mini_label_am_pm").click(function() {
|
3292 |
+
if (jQuery(this).children('input').length == 0) {
|
3293 |
+
var am_pm = "<input type='text' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3294 |
+
jQuery(this).html(am_pm);
|
3295 |
+
jQuery("input.am_pm").focus();
|
3296 |
+
jQuery("input.am_pm").blur(function() {
|
3297 |
+
var value = jQuery(this).val();
|
3298 |
+
jQuery("#"+num+"_mini_label_am_pm").text(value);
|
3299 |
+
});
|
3300 |
+
}
|
3301 |
+
});
|
3302 |
+
});
|
3303 |
+
}
|
3304 |
|
3305 |
+
function format_24(num) {
|
3306 |
+
tr_time1 = document.getElementById(num+'_tr_time1')
|
3307 |
+
td1 = document.getElementById(num+'_am_pm_select')
|
3308 |
+
tr_time2 = document.getElementById(num+'_tr_time2')
|
3309 |
+
td2 = document.getElementById(num+'_am_pm_label')
|
3310 |
+
tr_time1.removeChild(td1);
|
3311 |
+
tr_time2.removeChild(td2);
|
3312 |
+
document.getElementById(num+'_hhform_id_temp').setAttribute("onKeyPress", "return check_hour(event, '"+num+"_hhform_id_temp', '23')");
|
3313 |
+
document.getElementById(num+'_hhform_id_temp').value="";
|
3314 |
+
document.getElementById(num+'_mmform_id_temp').value="";
|
3315 |
+
if (document.getElementById(num + '_ssform_id_temp')) {
|
3316 |
+
document.getElementById(num + '_ssform_id_temp').value = "";
|
3317 |
+
}
|
3318 |
+
}
|
3319 |
|
3320 |
+
function format_extended(num) {
|
3321 |
+
w_size=document.getElementById(num+'_element_firstform_id_temp').style.width;
|
3322 |
+
tr_name1 = document.getElementById(num+'_tr_name1');
|
3323 |
+
tr_name2 = document.getElementById(num+'_tr_name2');
|
3324 |
+
var td_name_input1 = document.createElement('td');
|
3325 |
+
td_name_input1.setAttribute("id", num+"_td_name_input_title");
|
3326 |
+
var td_name_input4 = document.createElement('td');
|
3327 |
+
td_name_input4.setAttribute("id", num+"_td_name_input_middle");
|
3328 |
+
var td_name_label1 = document.createElement('td');
|
3329 |
+
td_name_label1.setAttribute("id", num+"_td_name_label_title");
|
3330 |
+
td_name_label1.setAttribute("align", "left");
|
3331 |
+
var td_name_label4 = document.createElement('td');
|
3332 |
+
td_name_label4.setAttribute("id", num+"_td_name_label_middle");
|
3333 |
+
td_name_label4.setAttribute("align", "left");
|
3334 |
+
var title = document.createElement('input');
|
3335 |
+
title.setAttribute("type", 'text');
|
3336 |
+
title.setAttribute("class", "input_deactive");
|
3337 |
+
title.style.cssText = "margin: 0px 10px 0px 0px; padding: 0px; width:40px";
|
3338 |
+
title.setAttribute("id", num+"_element_titleform_id_temp");
|
3339 |
+
title.setAttribute("name", num+"_element_titleform_id_temp");
|
3340 |
+
title.setAttribute("value", '');
|
3341 |
+
title.setAttribute("title", '');
|
3342 |
+
title.setAttribute("onFocus", 'delete_value("'+num+'_element_titleform_id_temp")');
|
3343 |
+
title.setAttribute("onBlur", 'return_value("'+num+'_element_titleform_id_temp")');
|
3344 |
+
title.setAttribute("onChange", "change_value('"+num+"_element_titleform_id_temp')");
|
3345 |
+
var title_label = document.createElement('label');
|
3346 |
+
title_label.setAttribute("class", "mini_label");
|
3347 |
+
title_label.setAttribute("id", num+"_mini_label_title");
|
3348 |
+
title_label.innerHTML= w_mini_labels[0];
|
3349 |
+
var middle = document.createElement('input');
|
3350 |
+
middle.setAttribute("type", 'text');
|
3351 |
+
middle.setAttribute("class", "input_deactive");
|
3352 |
+
middle.style.cssText = "padding: 0px; width:"+w_size;
|
3353 |
+
middle.setAttribute("id", num+"_element_middleform_id_temp");
|
3354 |
+
middle.setAttribute("name", num+"_element_middleform_id_temp");
|
3355 |
+
middle.setAttribute("value", '');
|
3356 |
+
middle.setAttribute("title", '');
|
3357 |
+
middle.setAttribute("onFocus", 'delete_value("'+num+'_element_middleform_id_temp")');
|
3358 |
+
middle.setAttribute("onBlur", 'return_value("'+num+'_element_middleform_id_temp")');
|
3359 |
+
middle.setAttribute("onChange", "change_value('"+num+"_element_middleform_id_temp')");
|
3360 |
+
var middle_label = document.createElement('label');
|
3361 |
+
middle_label.setAttribute("class", "mini_label");
|
3362 |
+
middle_label.setAttribute("id", num+"_mini_label_middle");
|
3363 |
+
middle_label.innerHTML=w_mini_labels[3];
|
3364 |
+
first_input = document.getElementById(num+'_td_name_input_first');
|
3365 |
+
last_input = document.getElementById(num+'_td_name_input_last');
|
3366 |
+
first_label = document.getElementById(num+'_td_name_label_first');
|
3367 |
+
last_label = document.getElementById(num+'_td_name_label_last');
|
3368 |
+
td_name_input1.appendChild(title);
|
3369 |
+
td_name_input4.appendChild(middle);
|
3370 |
+
tr_name1.insertBefore(td_name_input1, first_input);
|
3371 |
+
tr_name1.insertBefore(td_name_input4, null);
|
3372 |
+
td_name_label1.appendChild(title_label);
|
3373 |
+
td_name_label4.appendChild(middle_label);
|
3374 |
+
tr_name2.insertBefore(td_name_label1, first_label);
|
3375 |
+
tr_name2.insertBefore(td_name_label4, null);
|
3376 |
+
var gic1 = document.createTextNode("-");
|
3377 |
+
var gic2 = document.createTextNode("-");
|
3378 |
+
var el_first_value_title = document.createElement('input');
|
3379 |
+
el_first_value_title.setAttribute("id", "el_first_value_title");
|
3380 |
+
el_first_value_title.setAttribute("type", "text");
|
3381 |
+
el_first_value_title.setAttribute("value", '');
|
3382 |
+
el_first_value_title.style.cssText = "width:50px; margin-left:4px; margin-right:4px";
|
3383 |
+
el_first_value_title.setAttribute("onKeyUp", "change_input_value(this.value,'"+num+"_element_titleform_id_temp')");
|
3384 |
+
var el_first_value_middle = document.createElement('input');
|
3385 |
+
el_first_value_middle.setAttribute("id", "el_first_value_middle");
|
3386 |
+
el_first_value_middle.setAttribute("type", "text");
|
3387 |
+
el_first_value_middle.setAttribute("value", '');
|
3388 |
+
el_first_value_middle.style.cssText = "width:100px; margin-left:4px";
|
3389 |
+
el_first_value_middle.setAttribute("onKeyUp", "change_input_value(this.value,'"+num+"_element_middleform_id_temp')");
|
3390 |
+
el_first_value_first = document.getElementById('el_first_value_first');
|
3391 |
+
parent=el_first_value_first.parentNode;
|
3392 |
+
parent.insertBefore(gic1, el_first_value_first);
|
3393 |
+
parent.insertBefore(el_first_value_title, gic1);
|
3394 |
+
parent.appendChild(gic2);
|
3395 |
+
parent.appendChild(el_first_value_middle);
|
3396 |
+
refresh_attr(num, 'type_name');
|
3397 |
+
jQuery(document).ready(function() {
|
3398 |
+
jQuery("label#"+num+"_mini_label_title").click(function() {
|
3399 |
+
if (jQuery(this).children('input').length == 0) {
|
3400 |
+
var title = "<input type='text' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3401 |
+
jQuery(this).html(title);
|
3402 |
+
jQuery("input.title").focus();
|
3403 |
+
jQuery("input.title").blur(function() {
|
3404 |
+
var value = jQuery(this).val();
|
3405 |
+
jQuery("#"+num+"_mini_label_title").text(value);
|
3406 |
+
});
|
3407 |
}
|
3408 |
+
});
|
3409 |
+
jQuery("label#"+num+"_mini_label_middle").click(function() {
|
3410 |
+
if (jQuery(this).children('input').length == 0) {
|
3411 |
+
var middle = "<input type='text' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
3412 |
+
jQuery(this).html(middle);
|
3413 |
+
jQuery("input.middle").focus();
|
3414 |
+
jQuery("input.middle").blur(function() {
|
3415 |
+
var value = jQuery(this).val();
|
3416 |
+
jQuery("#"+num+"_mini_label_middle").text(value);
|
3417 |
+
});
|
3418 |
}
|
3419 |
+
});
|
3420 |
+
});
|
|
|
|
|
|
|
3421 |
}
|
3422 |
|
3423 |
+
function format_normal(num) {
|
3424 |
+
tr_name1 = document.getElementById(num + '_tr_name1');
|
3425 |
+
tr_name2 = document.getElementById(num + '_tr_name2');
|
3426 |
+
td_name_input1 = document.getElementById(num + '_td_name_input_title');
|
3427 |
+
td_name_input4 = document.getElementById(num + '_td_name_input_middle');
|
3428 |
+
td_name_label1 = document.getElementById(num + '_td_name_label_title');
|
3429 |
+
td_name_label4 =document.getElementById(num + '_td_name_label_middle');
|
3430 |
+
tr_name1.removeChild(td_name_input1);
|
3431 |
+
tr_name1.removeChild(td_name_input4);
|
3432 |
+
tr_name2.removeChild(td_name_label1);
|
3433 |
+
tr_name2.removeChild(td_name_label4);
|
3434 |
+
el_first_value_first = document.getElementById('el_first_value_first');
|
3435 |
+
parent = el_first_value_first.parentNode;
|
3436 |
+
parent.removeChild( document.getElementById('el_first_value_title').nextSibling);
|
3437 |
+
parent.removeChild( document.getElementById('el_first_value_title'));
|
3438 |
+
parent.removeChild( document.getElementById('el_first_value_middle').previousSibling);
|
3439 |
+
parent.removeChild( document.getElementById('el_first_value_middle'));
|
3440 |
+
}
|
3441 |
|
3442 |
+
function type_section_break(i, w_editor) {
|
3443 |
+
var pos=document.getElementsByName("el_pos");
|
3444 |
+
pos[0].setAttribute("disabled", "disabled");
|
3445 |
+
pos[1].setAttribute("disabled", "disabled");
|
3446 |
+
pos[2].setAttribute("disabled", "disabled");
|
3447 |
+
var sel_el_pos=document.getElementById("sel_el_pos");
|
3448 |
+
sel_el_pos.setAttribute("disabled", "disabled");
|
3449 |
+
document.getElementById("element_type").value="type_section_break";
|
3450 |
+
delete_last_child();
|
3451 |
+
// Edit table.
|
3452 |
+
oElement = document.getElementById('table_editor');
|
3453 |
+
var iReturnTop = 0;
|
3454 |
+
var iReturnLeft = 0;
|
3455 |
+
while (oElement != null) {
|
3456 |
+
iReturnTop += oElement.offsetTop;
|
3457 |
+
iReturnLeft += oElement.offsetLeft;
|
3458 |
+
oElement = oElement.offsetParent;
|
3459 |
}
|
3460 |
+
document.getElementById('main_editor').style.display="block";
|
3461 |
+
document.getElementById('main_editor').style.left=iReturnLeft + 195 + "px";
|
3462 |
+
document.getElementById('main_editor').style.top=iReturnTop + 70 + "px";
|
3463 |
+
if (document.getElementById('form_maker_editor').style.display == "none") {
|
3464 |
+
ifr_id = document.getElementsByTagName("iframe")[id_ifr_editor].id;
|
3465 |
+
ifr = getIFrameDocument(ifr_id);
|
3466 |
+
ifr.body.innerHTML = w_editor;
|
|
|
|
|
|
|
3467 |
}
|
3468 |
else {
|
3469 |
+
document.getElementById('form_maker_editor').value = w_editor;
|
|
|
|
|
|
|
3470 |
}
|
3471 |
+
element = 'div';
|
3472 |
+
var div = document.createElement('div');
|
3473 |
+
div.setAttribute("id", "main_div");
|
3474 |
+
var main_td = document.getElementById('show_table');
|
3475 |
+
main_td.appendChild(div);
|
3476 |
+
var div = document.createElement('div');
|
3477 |
+
div.style.width = "600px";
|
3478 |
+
document.getElementById('edit_table').appendChild(div);
|
3479 |
+
}
|
3480 |
|
3481 |
+
function type_editor(i, w_editor){
|
3482 |
|
3483 |
+
document.getElementById("element_type").value="type_editor";
|
3484 |
+
delete_last_child();
|
3485 |
+
// edit table
|
3486 |
+
oElement=document.getElementById('table_editor');
|
3487 |
+
var iReturnTop = 0;
|
3488 |
+
var iReturnLeft = 0;
|
3489 |
+
while( oElement != null )
|
3490 |
+
{
|
3491 |
+
iReturnTop += oElement.offsetTop;
|
3492 |
+
iReturnLeft += oElement.offsetLeft;
|
3493 |
+
oElement = oElement.offsetParent;
|
3494 |
+
}
|
3495 |
+
|
3496 |
+
document.getElementById('main_editor').style.display="block";
|
3497 |
+
document.getElementById('main_editor').style.left=iReturnLeft+195+"px";
|
3498 |
+
document.getElementById('main_editor').style.top=iReturnTop+70+"px";
|
3499 |
+
|
3500 |
+
|
3501 |
+
|
3502 |
+
if(document.getElementById('form_maker_editor').style.display=="none")
|
3503 |
+
{
|
3504 |
+
ifr_id=document.getElementsByTagName("iframe")[id_ifr_editor].id;
|
3505 |
+
ifr=getIFrameDocument(ifr_id);
|
3506 |
+
ifr.body.innerHTML=w_editor;
|
3507 |
+
}
|
3508 |
+
else
|
3509 |
+
{
|
3510 |
+
document.getElementById('form_maker_editor').value=w_editor;
|
3511 |
+
}
|
3512 |
+
|
3513 |
+
element='div';
|
3514 |
+
|
3515 |
+
|
3516 |
+
var div = document.createElement('div');
|
3517 |
+
div.setAttribute("id", "main_div");
|
3518 |
+
var main_td = document.getElementById('show_table');
|
3519 |
+
main_td.appendChild(div);
|
3520 |
+
|
3521 |
+
var div = document.createElement('div');
|
3522 |
+
div.style.width="600px";
|
3523 |
+
document.getElementById('edit_table').appendChild(div);
|
3524 |
+
|
3525 |
+
|
3526 |
}
|
3527 |
|
3528 |
+
function type_submit_reset(i, w_submit_title , w_reset_title , w_class, w_act, w_attr_name, w_attr_value){
|
|
|
|
|
|
|
|
|
|
|
|
|
3529 |
|
3530 |
+
document.getElementById("element_type").value="type_submit_reset";
|
3531 |
+
|
3532 |
+
delete_last_child();
|
3533 |
+
// edit table
|
3534 |
+
var edit_div = document.createElement('div');
|
3535 |
+
edit_div.setAttribute("id", "edit_div");
|
3536 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
3537 |
+
|
3538 |
+
var edit_main_table = document.createElement('table');
|
3539 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
3540 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
3541 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
3542 |
+
|
3543 |
+
var edit_main_tr1 = document.createElement('tr');
|
3544 |
+
edit_main_tr1.setAttribute("valing", "top");
|
3545 |
+
|
3546 |
+
var edit_main_tr2 = document.createElement('tr');
|
3547 |
+
edit_main_tr2.setAttribute("valing", "top");
|
3548 |
+
|
3549 |
+
var edit_main_tr3 = document.createElement('tr');
|
3550 |
+
edit_main_tr3.setAttribute("valing", "top");
|
3551 |
+
|
3552 |
+
var edit_main_tr4 = document.createElement('tr');
|
3553 |
+
edit_main_tr4.setAttribute("valing", "top");
|
3554 |
+
|
3555 |
+
var edit_main_tr5 = document.createElement('tr');
|
3556 |
+
edit_main_tr5.setAttribute("valing", "top");
|
3557 |
+
|
3558 |
+
var edit_main_tr6 = document.createElement('tr');
|
3559 |
+
edit_main_tr6.setAttribute("valing", "top");
|
3560 |
+
|
3561 |
+
var edit_main_tr7 = document.createElement('tr');
|
3562 |
+
edit_main_tr7.setAttribute("valing", "top");
|
3563 |
+
|
3564 |
+
var edit_main_td1 = document.createElement('td');
|
3565 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
3566 |
+
var edit_main_td1_1 = document.createElement('td');
|
3567 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
3568 |
+
var edit_main_td2 = document.createElement('td');
|
3569 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
3570 |
+
var edit_main_td2_1 = document.createElement('td');
|
3571 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
3572 |
+
|
3573 |
+
var edit_main_td3 = document.createElement('td');
|
3574 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
3575 |
+
var edit_main_td3_1 = document.createElement('td');
|
3576 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
3577 |
+
var edit_main_td4 = document.createElement('td');
|
3578 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
3579 |
+
var edit_main_td4_1 = document.createElement('td');
|
3580 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
3581 |
+
|
3582 |
+
var edit_main_td5 = document.createElement('td');
|
3583 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
3584 |
+
var edit_main_td5_1 = document.createElement('td');
|
3585 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
3586 |
+
|
3587 |
+
var edit_main_td6 = document.createElement('td');
|
3588 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
3589 |
+
var edit_main_td6_1 = document.createElement('td');
|
3590 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
3591 |
+
|
3592 |
+
var edit_main_td7 = document.createElement('td');
|
3593 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
3594 |
+
var edit_main_td7_1 = document.createElement('td');
|
3595 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
3596 |
+
|
3597 |
+
var el_submit_title_label = document.createElement('label');
|
3598 |
+
el_submit_title_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3599 |
+
el_submit_title_label.innerHTML = "Submit button label";
|
3600 |
+
|
3601 |
+
var el_submit_title_textarea = document.createElement('input');
|
3602 |
+
el_submit_title_textarea.setAttribute("id", "edit_for_title");
|
3603 |
+
el_submit_title_textarea.setAttribute("type", "text");
|
3604 |
+
el_submit_title_textarea.style.cssText = "width:160px";
|
3605 |
+
el_submit_title_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_submitform_id_temp', this.value)");
|
3606 |
+
el_submit_title_textarea.value = w_submit_title;
|
3607 |
+
var el_submit_func_label = document.createElement('label');
|
3608 |
+
el_submit_func_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3609 |
+
el_submit_func_label.innerHTML = "Submit function";
|
3610 |
+
var el_submit_func_textarea = document.createElement('input');
|
3611 |
+
el_submit_func_textarea.setAttribute("type", "text");
|
3612 |
+
el_submit_func_textarea.setAttribute("disabled", "disabled");
|
3613 |
+
el_submit_func_textarea.style.cssText = "width:160px";
|
3614 |
+
el_submit_func_textarea.value = "check_required('submit', 'form_id_temp')";
|
3615 |
+
|
3616 |
+
var el_reset_title_label = document.createElement('label');
|
3617 |
+
el_reset_title_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3618 |
+
el_reset_title_label.innerHTML = "Reset button label";
|
3619 |
+
|
3620 |
+
var el_reset_title_textarea = document.createElement('input');
|
3621 |
+
el_reset_title_textarea.setAttribute("id", "edit_for_title");
|
3622 |
+
el_reset_title_textarea.setAttribute("type", "text");
|
3623 |
+
el_reset_title_textarea.style.cssText = "width:160px";
|
3624 |
+
el_reset_title_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_resetform_id_temp', this.value)");
|
3625 |
+
el_reset_title_textarea.value = w_reset_title;
|
3626 |
+
|
3627 |
+
|
3628 |
+
var el_reset_active = document.createElement('input');
|
3629 |
+
el_reset_active.setAttribute("type", "checkbox");
|
3630 |
+
el_reset_active.style.cssText = "";
|
3631 |
+
el_reset_active.setAttribute("onClick", "active_reset(this.checked, "+i+")");
|
3632 |
+
if(w_act)
|
3633 |
+
el_reset_active.setAttribute("checked", "checked");
|
3634 |
+
|
3635 |
+
|
3636 |
+
var el_reset_active_label = document.createElement('label');
|
3637 |
+
el_reset_active_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3638 |
+
el_reset_active_label.innerHTML = "Display Reset button";
|
3639 |
+
|
3640 |
+
|
3641 |
+
|
3642 |
+
|
3643 |
+
var el_reset_func_label = document.createElement('label');
|
3644 |
+
el_reset_func_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3645 |
+
el_reset_func_label.innerHTML = "Reset function";
|
3646 |
+
var el_reset_func_textarea = document.createElement('input');
|
3647 |
+
el_reset_func_textarea.setAttribute("type", "text");
|
3648 |
+
el_reset_func_textarea.setAttribute("disabled", "disabled");
|
3649 |
+
el_reset_func_textarea.style.cssText = "width:160px";
|
3650 |
+
el_reset_func_textarea.value = "check_required('reset')";
|
3651 |
+
|
3652 |
+
var el_style_label = document.createElement('label');
|
3653 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3654 |
+
el_style_label.innerHTML = "Class name";
|
3655 |
+
|
3656 |
+
var el_style_textarea = document.createElement('input');
|
3657 |
+
el_style_textarea.setAttribute("id", "element_style");
|
3658 |
+
el_style_textarea.setAttribute("type", "text");
|
3659 |
+
el_style_textarea.setAttribute("value", w_class);
|
3660 |
+
el_style_textarea.style.cssText = "width:200px;";
|
3661 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
3662 |
+
var el_attr_label = document.createElement('label');
|
3663 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3664 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
3665 |
+
var el_attr_add = document.createElement('img');
|
3666 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
3667 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
3668 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
3669 |
+
el_attr_add.setAttribute("title", 'add');
|
3670 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_submit_reset')");
|
3671 |
+
var el_attr_table = document.createElement('table');
|
3672 |
+
el_attr_table.setAttribute("id", 'attributes');
|
3673 |
+
el_attr_table.setAttribute("border", '0');
|
3674 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
3675 |
+
var el_attr_tr_label = document.createElement('tr');
|
3676 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
3677 |
+
var el_attr_td_name_label = document.createElement('th');
|
3678 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
3679 |
+
var el_attr_td_value_label = document.createElement('th');
|
3680 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
3681 |
+
var el_attr_td_X_label = document.createElement('th');
|
3682 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
3683 |
+
var el_attr_name_label = document.createElement('label');
|
3684 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
3685 |
+
el_attr_name_label.innerHTML = "Name";
|
3686 |
+
|
3687 |
+
var el_attr_value_label = document.createElement('label');
|
3688 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
3689 |
+
el_attr_value_label.innerHTML = "Value";
|
3690 |
+
|
3691 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
3692 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
3693 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
3694 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
3695 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
3696 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
3697 |
+
|
3698 |
+
n=w_attr_name.length;
|
3699 |
+
for(j=1; j<=n; j++)
|
3700 |
+
{
|
3701 |
+
var el_attr_tr = document.createElement('tr');
|
3702 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
3703 |
+
el_attr_tr.setAttribute("idi", j);
|
3704 |
+
var el_attr_td_name = document.createElement('td');
|
3705 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
3706 |
+
var el_attr_td_value = document.createElement('td');
|
3707 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
3708 |
+
|
3709 |
+
var el_attr_td_X = document.createElement('td');
|
3710 |
+
var el_attr_name = document.createElement('input');
|
3711 |
+
|
3712 |
+
el_attr_name.setAttribute("type", "text");
|
3713 |
+
|
3714 |
+
el_attr_name.style.cssText = "width:100px";
|
3715 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
3716 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
3717 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_submit_reset')");
|
3718 |
+
|
3719 |
+
var el_attr_value = document.createElement('input');
|
3720 |
+
|
3721 |
+
el_attr_value.setAttribute("type", "text");
|
3722 |
+
|
3723 |
+
el_attr_value.style.cssText = "width:100px";
|
3724 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
3725 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
3726 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_submit_reset')");
|
3727 |
+
|
3728 |
+
var el_attr_remove = document.createElement('img');
|
3729 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
3730 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
3731 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
3732 |
+
el_attr_remove.setAttribute("align", 'top');
|
3733 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_submit_reset')");
|
3734 |
+
el_attr_table.appendChild(el_attr_tr);
|
3735 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
3736 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
3737 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
3738 |
+
el_attr_td_name.appendChild(el_attr_name);
|
3739 |
+
el_attr_td_value.appendChild(el_attr_value);
|
3740 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
3741 |
+
|
3742 |
+
}
|
3743 |
+
|
3744 |
+
var t = document.getElementById('edit_table');
|
3745 |
+
|
3746 |
+
var hr = document.createElement('hr');
|
3747 |
+
var br = document.createElement('br');
|
3748 |
+
var br1 = document.createElement('br');
|
3749 |
+
var br2 = document.createElement('br');
|
3750 |
+
var br3 = document.createElement('br');
|
3751 |
+
var br4 = document.createElement('br');
|
3752 |
+
var br5 = document.createElement('br');
|
3753 |
+
var br6 = document.createElement('br');
|
3754 |
+
var br7 = document.createElement('br');
|
3755 |
+
var br8 = document.createElement('br');
|
3756 |
+
var br9 = document.createElement('br');
|
3757 |
+
edit_main_td1.appendChild(el_submit_title_label);
|
3758 |
+
edit_main_td1.appendChild(br7);
|
3759 |
+
edit_main_td1.appendChild(el_submit_func_label);
|
3760 |
+
edit_main_td1_1.appendChild(el_submit_title_textarea);
|
3761 |
+
edit_main_td1_1.appendChild(br1);
|
3762 |
+
edit_main_td1_1.appendChild(el_submit_func_textarea);
|
3763 |
+
|
3764 |
+
|
3765 |
+
edit_main_td2.appendChild(el_reset_active_label);
|
3766 |
+
edit_main_td2.appendChild(br5);
|
3767 |
+
edit_main_td2.appendChild(el_reset_title_label);
|
3768 |
+
edit_main_td2.appendChild(br8);
|
3769 |
+
edit_main_td2.appendChild(el_reset_func_label);
|
3770 |
+
edit_main_td2_1.appendChild(el_reset_active);
|
3771 |
+
edit_main_td2_1.appendChild(br9);
|
3772 |
+
edit_main_td2_1.appendChild(el_reset_title_textarea);
|
3773 |
+
edit_main_td2_1.appendChild(br2);
|
3774 |
+
edit_main_td2_1.appendChild(el_reset_func_textarea);
|
3775 |
+
|
3776 |
+
edit_main_td3.appendChild(el_style_label);
|
3777 |
+
edit_main_td3_1.appendChild(el_style_textarea);
|
3778 |
+
|
3779 |
+
edit_main_td4.appendChild(el_attr_label);
|
3780 |
+
edit_main_td4.appendChild(el_attr_add);
|
3781 |
+
edit_main_td4.appendChild(br3);
|
3782 |
+
edit_main_td4.appendChild(el_attr_table);
|
3783 |
+
edit_main_td4.setAttribute("colspan", "2");
|
3784 |
+
|
3785 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
3786 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
3787 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
3788 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
3789 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
3790 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
3791 |
+
|
3792 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
3793 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
3794 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
3795 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
3796 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
3797 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
3798 |
+
|
3799 |
+
edit_main_table.appendChild(edit_main_tr1);
|
3800 |
+
edit_main_table.appendChild(edit_main_tr2);
|
3801 |
+
edit_main_table.appendChild(edit_main_tr3);
|
3802 |
+
edit_main_table.appendChild(edit_main_tr4);
|
3803 |
+
// edit_main_table.appendChild(edit_main_tr5);
|
3804 |
+
// edit_main_table.appendChild(edit_main_tr6);
|
3805 |
+
edit_div.appendChild(edit_main_table);
|
3806 |
+
|
3807 |
+
t.appendChild(edit_div);
|
3808 |
+
|
3809 |
+
//show table
|
3810 |
|
3811 |
+
element='button'; type1='button'; type2='button';
|
3812 |
+
var adding_type = document.createElement("input");
|
3813 |
+
adding_type.setAttribute("type", "hidden");
|
3814 |
+
adding_type.setAttribute("value", "type_submit_reset");
|
3815 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
3816 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
3817 |
+
|
3818 |
+
var adding_submit = document.createElement(element);
|
3819 |
+
adding_submit.setAttribute("type", type1);
|
3820 |
+
|
3821 |
+
adding_submit.setAttribute("class", "button_submit");
|
3822 |
+
|
3823 |
+
adding_submit.setAttribute("id", i+"_element_submitform_id_temp");
|
3824 |
+
adding_submit.setAttribute("value", w_submit_title);
|
3825 |
+
adding_submit.innerHTML=w_submit_title;
|
3826 |
+
adding_submit.setAttribute("onClick", "check_required('submit', 'form_id_temp');");
|
3827 |
+
|
3828 |
+
var adding_reset = document.createElement(element);
|
3829 |
+
adding_reset.setAttribute("type", type2);
|
3830 |
+
|
3831 |
+
adding_reset.setAttribute("class", "button_reset");
|
3832 |
+
if(!w_act)
|
3833 |
+
adding_reset.style.display="none";
|
3834 |
+
|
3835 |
+
adding_reset.setAttribute("id", i+"_element_resetform_id_temp");
|
3836 |
+
adding_reset.setAttribute("value", w_reset_title );
|
3837 |
+
adding_reset.setAttribute("onClick", "check_required('reset');");
|
3838 |
+
adding_reset.innerHTML=w_reset_title;
|
3839 |
+
|
3840 |
+
var div = document.createElement('div');
|
3841 |
+
div.setAttribute("id", "main_div");
|
3842 |
+
|
3843 |
+
var table = document.createElement('table');
|
3844 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
3845 |
+
|
3846 |
+
var tr = document.createElement('tr');
|
3847 |
+
|
3848 |
+
var td1 = document.createElement('td');
|
3849 |
+
td1.setAttribute("valign", 'middle');
|
3850 |
+
td1.setAttribute("align", 'left');
|
3851 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
3852 |
+
td1.style.cssText = 'display:none';
|
3853 |
+
|
3854 |
+
var td2 = document.createElement('td');
|
3855 |
+
td2.setAttribute("valign", 'middle');
|
3856 |
+
td2.setAttribute("align", 'left');
|
3857 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
3858 |
+
|
3859 |
+
var br1 = document.createElement('br');
|
3860 |
+
var br2 = document.createElement('br');
|
3861 |
+
var br3 = document.createElement('br');
|
3862 |
+
var br4 = document.createElement('br');
|
3863 |
+
|
3864 |
|
3865 |
+
|
3866 |
+
var label = document.createElement('span');
|
3867 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
3868 |
+
label.style.cssText = 'display:none';
|
3869 |
+
label.innerHTML = "type_submit_reset_"+i;
|
3870 |
+
var main_td = document.getElementById('show_table');
|
3871 |
+
|
3872 |
+
td1.appendChild(label);
|
3873 |
+
td2.appendChild(adding_type);
|
3874 |
+
td2.appendChild(adding_submit);
|
3875 |
+
td2.appendChild(adding_reset);
|
3876 |
+
|
3877 |
+
tr.appendChild(td1);
|
3878 |
+
tr.appendChild(td2);
|
3879 |
+
table.appendChild(tr);
|
3880 |
+
|
3881 |
+
div.appendChild(table);
|
3882 |
+
div.appendChild(br3);
|
3883 |
+
main_td.appendChild(div);
|
3884 |
+
change_class(w_class, i);
|
3885 |
+
refresh_attr(i, 'type_submit_reset');
|
3886 |
+
}
|
3887 |
|
3888 |
+
function type_hidden(i, w_name, w_value, w_attr_name, w_attr_value){
|
3889 |
|
3890 |
+
document.getElementById("element_type").value="type_hidden";
|
3891 |
+
|
3892 |
+
delete_last_child();
|
3893 |
+
// edit table
|
3894 |
+
var edit_div = document.createElement('div');
|
3895 |
+
edit_div.setAttribute("id", "edit_div");
|
3896 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
3897 |
+
|
3898 |
+
var edit_main_table = document.createElement('table');
|
3899 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
3900 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
3901 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
3902 |
+
|
3903 |
+
var edit_main_tr1 = document.createElement('tr');
|
3904 |
+
edit_main_tr1.setAttribute("valing", "top");
|
3905 |
+
|
3906 |
+
var edit_main_tr2 = document.createElement('tr');
|
3907 |
+
edit_main_tr2.setAttribute("valing", "top");
|
3908 |
+
|
3909 |
+
var edit_main_tr3 = document.createElement('tr');
|
3910 |
+
edit_main_tr3.setAttribute("valing", "top");
|
3911 |
+
|
3912 |
+
var edit_main_tr4 = document.createElement('tr');
|
3913 |
+
edit_main_tr4.setAttribute("valing", "top");
|
3914 |
+
|
3915 |
+
var edit_main_tr5 = document.createElement('tr');
|
3916 |
+
edit_main_tr5.setAttribute("valing", "top");
|
3917 |
+
|
3918 |
+
var edit_main_tr6 = document.createElement('tr');
|
3919 |
+
edit_main_tr6.setAttribute("valing", "top");
|
3920 |
+
|
3921 |
+
var edit_main_tr7 = document.createElement('tr');
|
3922 |
+
edit_main_tr7.setAttribute("valing", "top");
|
3923 |
+
|
3924 |
+
var edit_main_td1 = document.createElement('td');
|
3925 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
3926 |
+
var edit_main_td1_1 = document.createElement('td');
|
3927 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
3928 |
+
var edit_main_td2 = document.createElement('td');
|
3929 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
3930 |
+
var edit_main_td2_1 = document.createElement('td');
|
3931 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
3932 |
+
|
3933 |
+
var edit_main_td3 = document.createElement('td');
|
3934 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
3935 |
+
var edit_main_td3_1 = document.createElement('td');
|
3936 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
3937 |
+
var edit_main_td4 = document.createElement('td');
|
3938 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
3939 |
+
var edit_main_td4_1 = document.createElement('td');
|
3940 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
3941 |
+
|
3942 |
+
var edit_main_td5 = document.createElement('td');
|
3943 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
3944 |
+
var edit_main_td5_1 = document.createElement('td');
|
3945 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
3946 |
+
|
3947 |
+
var edit_main_td6 = document.createElement('td');
|
3948 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
3949 |
+
var edit_main_td6_1 = document.createElement('td');
|
3950 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
3951 |
+
|
3952 |
+
var edit_main_td7 = document.createElement('td');
|
3953 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
3954 |
+
var edit_main_td7_1 = document.createElement('td');
|
3955 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
3956 |
+
var el_field_id_label = document.createElement('label');
|
3957 |
+
el_field_id_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3958 |
+
el_field_id_label.innerHTML = "Field Id";
|
3959 |
+
|
3960 |
+
var el_field_id_input= document.createElement('input');
|
3961 |
+
el_field_id_input.setAttribute("type", "text");
|
3962 |
+
el_field_id_input.setAttribute("disabled", "disabled");
|
3963 |
+
el_field_id_input.setAttribute("value", i+"_elementform_id_temp");
|
3964 |
+
el_field_id_input.style.cssText = "margin-left: 41px; width:160px";
|
3965 |
+
|
3966 |
+
var el_field_name_label = document.createElement('label');
|
3967 |
+
el_field_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3968 |
+
el_field_name_label.innerHTML = "Field Name";
|
3969 |
+
|
3970 |
+
var el_field_name_input= document.createElement('input');
|
3971 |
+
el_field_name_input.setAttribute("type", "text");
|
3972 |
+
|
3973 |
+
el_field_name_input.setAttribute("value", w_name);
|
3974 |
+
el_field_name_input.style.cssText = "margin-left: 16px; width:160px";
|
3975 |
+
el_field_name_input.setAttribute("onChange", "change_field_name('"+i+"', this)");
|
3976 |
+
|
3977 |
+
var el_field_value_label = document.createElement('label');
|
3978 |
+
el_field_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3979 |
+
el_field_value_label.innerHTML = "Field Value";
|
3980 |
+
|
3981 |
+
var el_field_value_input= document.createElement('input');
|
3982 |
+
el_field_value_input.setAttribute("type", "text");
|
3983 |
+
el_field_value_input.setAttribute("value", w_value);
|
3984 |
+
el_field_value_input.style.cssText = "margin-left: 16px; width:160px";
|
3985 |
+
el_field_value_input.setAttribute("onKeyUp", "change_field_value('"+i+"', this.value)");
|
3986 |
+
|
3987 |
+
var el_attr_label = document.createElement('label');
|
3988 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
3989 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
3990 |
+
var el_attr_add = document.createElement('img');
|
3991 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
3992 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
3993 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
3994 |
+
el_attr_add.setAttribute("title", 'add');
|
3995 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
3996 |
+
var el_attr_table = document.createElement('table');
|
3997 |
+
el_attr_table.setAttribute("id", 'attributes');
|
3998 |
+
el_attr_table.setAttribute("border", '0');
|
3999 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
4000 |
+
var el_attr_tr_label = document.createElement('tr');
|
4001 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
4002 |
+
var el_attr_td_name_label = document.createElement('th');
|
4003 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
4004 |
+
var el_attr_td_value_label = document.createElement('th');
|
4005 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
4006 |
+
var el_attr_td_X_label = document.createElement('th');
|
4007 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
4008 |
+
var el_attr_name_label = document.createElement('label');
|
4009 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4010 |
+
el_attr_name_label.innerHTML = "Name";
|
4011 |
+
|
4012 |
+
var el_attr_value_label = document.createElement('label');
|
4013 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4014 |
+
el_attr_value_label.innerHTML = "Value";
|
4015 |
+
|
4016 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
4017 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
4018 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
4019 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
4020 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
4021 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
4022 |
+
|
4023 |
+
n=w_attr_name.length;
|
4024 |
+
for(j=1; j<=n; j++)
|
4025 |
+
{
|
4026 |
+
var el_attr_tr = document.createElement('tr');
|
4027 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
4028 |
+
el_attr_tr.setAttribute("idi", j);
|
4029 |
+
var el_attr_td_name = document.createElement('td');
|
4030 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
4031 |
+
var el_attr_td_value = document.createElement('td');
|
4032 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
4033 |
+
|
4034 |
+
var el_attr_td_X = document.createElement('td');
|
4035 |
+
var el_attr_name = document.createElement('input');
|
4036 |
+
|
4037 |
+
el_attr_name.setAttribute("type", "text");
|
4038 |
+
|
4039 |
+
el_attr_name.style.cssText = "width:100px";
|
4040 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
4041 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
4042 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
4043 |
+
|
4044 |
+
var el_attr_value = document.createElement('input');
|
4045 |
+
|
4046 |
+
el_attr_value.setAttribute("type", "text");
|
4047 |
+
|
4048 |
+
el_attr_value.style.cssText = "width:100px";
|
4049 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
4050 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
4051 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
4052 |
+
|
4053 |
+
var el_attr_remove = document.createElement('img');
|
4054 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
4055 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
4056 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
4057 |
+
el_attr_remove.setAttribute("align", 'top');
|
4058 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
4059 |
+
el_attr_table.appendChild(el_attr_tr);
|
4060 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
4061 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
4062 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
4063 |
+
el_attr_td_name.appendChild(el_attr_name);
|
4064 |
+
el_attr_td_value.appendChild(el_attr_value);
|
4065 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
4066 |
+
|
4067 |
+
}
|
4068 |
+
|
4069 |
+
var t = document.getElementById('edit_table');
|
4070 |
+
|
4071 |
+
var hr = document.createElement('hr');
|
4072 |
+
var br = document.createElement('br');
|
4073 |
+
var br1 = document.createElement('br');
|
4074 |
+
var br2 = document.createElement('br');
|
4075 |
+
var br3 = document.createElement('br');
|
4076 |
+
var br4 = document.createElement('br');
|
4077 |
+
var br5 = document.createElement('br');
|
4078 |
+
var br6 = document.createElement('br');
|
4079 |
+
edit_main_td1.appendChild(el_field_id_label);
|
4080 |
+
edit_main_td1.appendChild(el_field_id_input);
|
4081 |
+
edit_main_td2.appendChild(el_field_name_label);
|
4082 |
+
edit_main_td2.appendChild(el_field_name_input);
|
4083 |
+
edit_main_td3.appendChild(el_field_value_label);
|
4084 |
+
edit_main_td3.appendChild(el_field_value_input);
|
4085 |
+
edit_main_td4.appendChild(el_attr_label);
|
4086 |
+
edit_main_td4.appendChild(el_attr_add);
|
4087 |
+
edit_main_td4.appendChild(br3);
|
4088 |
+
edit_main_td4.appendChild(el_attr_table);
|
4089 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
4090 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
4091 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
4092 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
4093 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
4094 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
4095 |
+
|
4096 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
4097 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
4098 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
4099 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
4100 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
4101 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
4102 |
+
|
4103 |
+
edit_main_table.appendChild(edit_main_tr1);
|
4104 |
+
edit_main_table.appendChild(edit_main_tr2);
|
4105 |
+
edit_main_table.appendChild(edit_main_tr3);
|
4106 |
+
edit_main_table.appendChild(edit_main_tr4);
|
4107 |
+
// edit_main_table.appendChild(edit_main_tr5);
|
4108 |
+
// edit_main_table.appendChild(edit_main_tr6);
|
4109 |
+
edit_div.appendChild(edit_main_table);
|
4110 |
+
|
4111 |
+
t.appendChild(edit_div);
|
4112 |
+
|
4113 |
+
//show table
|
4114 |
|
4115 |
+
element='input'; type='hidden';
|
4116 |
+
|
4117 |
+
var adding_type = document.createElement("input");
|
4118 |
+
adding_type.setAttribute("type", "hidden");
|
4119 |
+
adding_type.setAttribute("value", "type_hidden");
|
4120 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
4121 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
4122 |
+
|
4123 |
+
var adding = document.createElement(element);
|
4124 |
+
adding.setAttribute("type", type);
|
4125 |
+
adding.setAttribute("value", w_value);
|
4126 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
4127 |
+
adding.setAttribute("name", w_name);
|
4128 |
+
|
4129 |
+
var div = document.createElement('div');
|
4130 |
+
div.setAttribute("id", "main_div");
|
4131 |
+
|
4132 |
+
var table = document.createElement('table');
|
4133 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
4134 |
+
table.setAttribute("cellpadding", '0');
|
4135 |
+
table.setAttribute("cellspacing", '0');
|
4136 |
+
|
4137 |
+
var tr = document.createElement('tr');
|
4138 |
+
|
4139 |
+
var td1 = document.createElement('td');
|
4140 |
+
td1.setAttribute("valign", 'middle');
|
4141 |
+
td1.setAttribute("align", 'left');
|
4142 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
4143 |
+
td1.style.cssText = 'display:none';
|
4144 |
+
|
4145 |
+
var td2 = document.createElement('td');
|
4146 |
+
td2.setAttribute("valign", 'middle');
|
4147 |
+
td2.setAttribute("align", 'left');
|
4148 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
4149 |
+
|
4150 |
+
var br1 = document.createElement('br');
|
4151 |
+
var br2 = document.createElement('br');
|
4152 |
+
var br3 = document.createElement('br');
|
4153 |
+
var br4 = document.createElement('br');
|
4154 |
+
|
4155 |
|
4156 |
+
|
4157 |
+
var label = document.createElement('span');
|
4158 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
4159 |
+
label.style.cssText = 'display:none';
|
4160 |
+
label.innerHTML = w_name;
|
4161 |
+
var main_td = document.getElementById('show_table');
|
4162 |
+
|
4163 |
+
td1.appendChild(label);
|
4164 |
+
td2.appendChild(adding);
|
4165 |
+
td2.appendChild(adding_type);
|
4166 |
+
tr.appendChild(td1);
|
4167 |
+
tr.appendChild(td2);
|
4168 |
+
table.appendChild(tr);
|
4169 |
+
|
4170 |
+
div.appendChild(table);
|
4171 |
+
div.appendChild(br3);
|
4172 |
+
main_td.appendChild(div);
|
4173 |
+
refresh_attr(i, 'type_text');
|
4174 |
}
|
4175 |
|
4176 |
+
function type_button(i, w_title , w_func , w_class, w_attr_name, w_attr_value){
|
4177 |
+
document.getElementById("element_type").value="type_button";
|
4178 |
+
delete_last_child();
|
4179 |
+
// edit table
|
4180 |
+
var edit_div = document.createElement('div');
|
4181 |
+
edit_div.setAttribute("id", "edit_div");
|
4182 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
4183 |
+
|
4184 |
+
var edit_main_table = document.createElement('table');
|
4185 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
4186 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
4187 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
4188 |
+
|
4189 |
+
var edit_main_tr1 = document.createElement('tr');
|
4190 |
+
edit_main_tr1.setAttribute("valing", "top");
|
4191 |
+
|
4192 |
+
var edit_main_tr2 = document.createElement('tr');
|
4193 |
+
edit_main_tr2.setAttribute("valing", "top");
|
4194 |
+
|
4195 |
+
var edit_main_tr3 = document.createElement('tr');
|
4196 |
+
edit_main_tr3.setAttribute("valing", "top");
|
4197 |
+
|
4198 |
+
var edit_main_tr4 = document.createElement('tr');
|
4199 |
+
edit_main_tr4.setAttribute("valing", "top");
|
4200 |
+
|
4201 |
+
var edit_main_tr5 = document.createElement('tr');
|
4202 |
+
edit_main_tr5.setAttribute("valing", "top");
|
4203 |
+
|
4204 |
+
var edit_main_tr6 = document.createElement('tr');
|
4205 |
+
edit_main_tr6.setAttribute("valing", "top");
|
4206 |
+
|
4207 |
+
var edit_main_td1 = document.createElement('td');
|
4208 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
4209 |
+
var edit_main_td1_1 = document.createElement('td');
|
4210 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
4211 |
+
var edit_main_td2 = document.createElement('td');
|
4212 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
4213 |
+
var edit_main_td2_1 = document.createElement('td');
|
4214 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
4215 |
+
|
4216 |
+
var edit_main_td3 = document.createElement('td');
|
4217 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
4218 |
+
var edit_main_td3_1 = document.createElement('td');
|
4219 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
4220 |
+
var edit_main_td4 = document.createElement('td');
|
4221 |
+
edit_main_td4.setAttribute("id", "buttons");
|
4222 |
+
edit_main_td4.setAttribute("colspan", "2");
|
4223 |
+
|
4224 |
+
var edit_main_td5 = document.createElement('td');
|
4225 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
4226 |
+
var edit_main_td5_1 = document.createElement('td');
|
4227 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
4228 |
+
|
4229 |
+
var edit_main_td6 = document.createElement('td');
|
4230 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
4231 |
+
var edit_main_td6_1 = document.createElement('td');
|
4232 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
4233 |
+
|
4234 |
+
|
4235 |
+
var el_style_label = document.createElement('label');
|
4236 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4237 |
+
el_style_label.innerHTML = "Class name";
|
4238 |
+
|
4239 |
+
var el_style_textarea = document.createElement('input');
|
4240 |
+
el_style_textarea.setAttribute("id", "element_style");
|
4241 |
+
el_style_textarea.setAttribute("type", "text");
|
4242 |
+
el_style_textarea.setAttribute("value", w_class);
|
4243 |
+
el_style_textarea.style.cssText = "width:200px;";
|
4244 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
4245 |
+
|
4246 |
+
var el_choices_add_label = document.createElement('label');
|
4247 |
+
el_choices_add_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4248 |
+
el_choices_add_label.innerHTML = "Add a new button ";
|
4249 |
+
var el_choices_add = document.createElement('img');
|
4250 |
+
el_choices_add.setAttribute("id", "el_choices_add");
|
4251 |
+
el_choices_add.setAttribute("src", plugin_url+'/images/add.png');
|
4252 |
+
el_choices_add.style.cssText = 'cursor:pointer;';
|
4253 |
+
el_choices_add.setAttribute("title", 'add');
|
4254 |
+
el_choices_add.setAttribute("onClick", "add_button("+i+")");
|
4255 |
+
|
4256 |
+
|
4257 |
+
var el_attr_label = document.createElement('label');
|
4258 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4259 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
4260 |
+
var el_attr_add = document.createElement('img');
|
4261 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
4262 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
4263 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
4264 |
+
el_attr_add.setAttribute("title", 'add');
|
4265 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_checkbox')");
|
4266 |
+
var el_attr_table = document.createElement('table');
|
4267 |
+
el_attr_table.setAttribute("id", 'attributes');
|
4268 |
+
el_attr_table.setAttribute("border", '0');
|
4269 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
4270 |
+
var el_attr_tr_label = document.createElement('tr');
|
4271 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
4272 |
+
var el_attr_td_name_label = document.createElement('th');
|
4273 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
4274 |
+
var el_attr_td_value_label = document.createElement('th');
|
4275 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
4276 |
+
var el_attr_td_X_label = document.createElement('th');
|
4277 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
4278 |
+
var el_attr_name_label = document.createElement('label');
|
4279 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4280 |
+
el_attr_name_label.innerHTML = "Name";
|
4281 |
+
|
4282 |
+
var el_attr_value_label = document.createElement('label');
|
4283 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4284 |
+
el_attr_value_label.innerHTML = "Value";
|
4285 |
+
|
4286 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
4287 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
4288 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
4289 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
4290 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
4291 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
4292 |
+
|
4293 |
+
n=w_attr_name.length;
|
4294 |
+
for(j=1; j<=n; j++)
|
4295 |
+
{
|
4296 |
+
var el_attr_tr = document.createElement('tr');
|
4297 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
4298 |
+
el_attr_tr.setAttribute("idi", j);
|
4299 |
+
var el_attr_td_name = document.createElement('td');
|
4300 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
4301 |
+
var el_attr_td_value = document.createElement('td');
|
4302 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
4303 |
+
|
4304 |
+
var el_attr_td_X = document.createElement('td');
|
4305 |
+
var el_attr_name = document.createElement('input');
|
4306 |
+
|
4307 |
+
el_attr_name.setAttribute("type", "text");
|
4308 |
+
|
4309 |
+
el_attr_name.style.cssText = "width:100px";
|
4310 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
4311 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
4312 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_checkbox')");
|
4313 |
+
|
4314 |
+
var el_attr_value = document.createElement('input');
|
4315 |
+
|
4316 |
+
el_attr_value.setAttribute("type", "text");
|
4317 |
+
|
4318 |
+
el_attr_value.style.cssText = "width:100px";
|
4319 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
4320 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
4321 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_checkbox')");
|
4322 |
+
|
4323 |
+
var el_attr_remove = document.createElement('img');
|
4324 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
4325 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
4326 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
4327 |
+
el_attr_remove.setAttribute("align", 'top');
|
4328 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_checkbox')");
|
4329 |
+
el_attr_table.appendChild(el_attr_tr);
|
4330 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
4331 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
4332 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
4333 |
+
el_attr_td_name.appendChild(el_attr_name);
|
4334 |
+
el_attr_td_value.appendChild(el_attr_value);
|
4335 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
4336 |
+
|
4337 |
+
}
|
4338 |
+
|
4339 |
+
var t = document.getElementById('edit_table');
|
4340 |
+
|
4341 |
+
var br = document.createElement('br');
|
4342 |
+
var br1 = document.createElement('br');
|
4343 |
+
var br2 = document.createElement('br');
|
4344 |
+
var br3 = document.createElement('br');
|
4345 |
+
var br4 = document.createElement('br');
|
4346 |
+
var br5 = document.createElement('br');
|
4347 |
+
var br6 = document.createElement('br');
|
4348 |
+
|
4349 |
+
|
4350 |
+
edit_main_td1.appendChild(el_style_label);
|
4351 |
+
edit_main_td1_1.appendChild(el_style_textarea);
|
4352 |
+
edit_main_td2.appendChild(el_attr_label);
|
4353 |
+
edit_main_td2.appendChild(el_attr_add);
|
4354 |
+
edit_main_td2.appendChild(br3);
|
4355 |
+
edit_main_td2.appendChild(el_attr_table);
|
4356 |
+
edit_main_td2.setAttribute("colspan", "2");
|
4357 |
+
|
4358 |
+
edit_main_td3.appendChild(el_choices_add_label);
|
4359 |
+
edit_main_td3_1.appendChild(el_choices_add);
|
4360 |
+
|
4361 |
+
n=w_title.length;
|
4362 |
+
for(j=0; j<n; j++)
|
4363 |
+
{
|
4364 |
+
var table_button = document.createElement('table');
|
4365 |
+
table_button.setAttribute("width", "100%");
|
4366 |
+
table_button.setAttribute("border", "0");
|
4367 |
+
table_button.setAttribute("id", "button_opt"+j);
|
4368 |
+
table_button.setAttribute("idi", j+1);
|
4369 |
+
var tr_button = document.createElement('tr');
|
4370 |
+
var tr_hr = document.createElement('tr');
|
4371 |
+
|
4372 |
+
var td_button = document.createElement('td');
|
4373 |
+
var td_X = document.createElement('td');
|
4374 |
+
var td_hr = document.createElement('td');
|
4375 |
+
td_hr.setAttribute("colspan", "3");
|
4376 |
+
tr_hr.appendChild(td_hr);
|
4377 |
+
tr_button.appendChild(td_button);
|
4378 |
+
tr_button.appendChild(td_X);
|
4379 |
+
table_button.appendChild(tr_hr);
|
4380 |
+
table_button.appendChild(tr_button);
|
4381 |
+
|
4382 |
+
var br1 = document.createElement('br');
|
4383 |
+
|
4384 |
+
var hr = document.createElement('hr');
|
4385 |
+
hr.setAttribute("id", "br"+j);
|
4386 |
+
|
4387 |
+
|
4388 |
+
var el_title_label = document.createElement('label');
|
4389 |
+
|
4390 |
+
el_title_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4391 |
+
|
4392 |
+
el_title_label.innerHTML = "Button name";
|
4393 |
+
|
4394 |
+
var el_title = document.createElement('input');
|
4395 |
+
el_title.setAttribute("id", "el_title"+j);
|
4396 |
+
el_title.setAttribute("type", "text");
|
4397 |
+
el_title.setAttribute("value", w_title[j]);
|
4398 |
+
el_title.style.cssText = "width:100px; margin-left:43px; padding:0; border-width: 1px";
|
4399 |
+
el_title.setAttribute("onKeyUp", "change_label('"+i+"_elementform_id_temp"+j+"', this.value);");
|
4400 |
+
|
4401 |
+
var el_func_label = document.createElement('label');
|
4402 |
+
|
4403 |
+
el_func_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4404 |
+
|
4405 |
+
el_func_label.innerHTML = "OnClick function";
|
4406 |
+
|
4407 |
+
var el_func = document.createElement('input');
|
4408 |
+
el_func.setAttribute("id", "el_func"+j);
|
4409 |
+
el_func.setAttribute("type", "text");
|
4410 |
+
el_func.setAttribute("value", w_func[j]);
|
4411 |
+
el_func.style.cssText = "width:100px; margin-left:20px; padding:0; border-width: 1px";
|
4412 |
+
el_func.setAttribute("onKeyUp", "change_func('"+i+"_elementform_id_temp"+j+"', this.value);");
|
4413 |
+
var el_choices_remove = document.createElement('img');
|
4414 |
+
el_choices_remove.setAttribute("id", "el_button"+j+"_remove");
|
4415 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
4416 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
4417 |
+
el_choices_remove.setAttribute("align", 'top');
|
4418 |
+
el_choices_remove.setAttribute("onClick", "remove_button("+j+","+i+")");
|
4419 |
+
|
4420 |
+
td_hr.appendChild(hr);
|
4421 |
+
td_button.appendChild(el_title_label);
|
4422 |
+
td_button.appendChild(el_title);
|
4423 |
+
td_button.appendChild(br1);
|
4424 |
+
td_button.appendChild(el_func_label);
|
4425 |
+
td_button.appendChild(el_func);
|
4426 |
+
td_X.appendChild(el_choices_remove);
|
4427 |
+
edit_main_td4.appendChild(table_button);
|
4428 |
+
|
4429 |
+
}
|
4430 |
+
|
4431 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
4432 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
4433 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
4434 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
4435 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
4436 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
4437 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
4438 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
4439 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
4440 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
4441 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
4442 |
+
|
4443 |
+
edit_main_table.appendChild(edit_main_tr1);
|
4444 |
+
|
4445 |
+
edit_main_table.appendChild(edit_main_tr3);
|
4446 |
+
edit_main_table.appendChild(edit_main_tr4);
|
4447 |
+
edit_main_table.appendChild(edit_main_tr2);
|
4448 |
+
// edit_main_table.appendChild(edit_main_tr5);
|
4449 |
+
// edit_main_table.appendChild(edit_main_tr6);
|
4450 |
|
4451 |
+
edit_div.appendChild(edit_main_table);
|
4452 |
+
|
4453 |
+
t.appendChild(edit_div);
|
4454 |
+
|
4455 |
+
//show table
|
4456 |
|
4457 |
+
element='button'; type='button';
|
4458 |
+
var adding_type = document.createElement("input");
|
4459 |
+
adding_type.setAttribute("type", "hidden");
|
4460 |
+
adding_type.setAttribute("value", "type_button");
|
4461 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
4462 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
4463 |
+
var div = document.createElement('div');
|
4464 |
+
div.setAttribute("id", "main_div");
|
4465 |
+
//tbody sarqac
|
4466 |
+
|
4467 |
+
|
4468 |
+
var table = document.createElement('table');
|
4469 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
4470 |
+
|
4471 |
+
var tr = document.createElement('tr');
|
4472 |
+
var td1 = document.createElement('td');
|
4473 |
+
td1.setAttribute("valign", 'middle');
|
4474 |
+
td1.setAttribute("align", 'left');
|
4475 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
4476 |
+
td1.style.cssText = 'display:none';
|
4477 |
+
var td2 = document.createElement('td');
|
4478 |
+
td2.setAttribute("valign", 'top');
|
4479 |
+
td2.setAttribute("align", 'left');
|
4480 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
4481 |
+
|
4482 |
+
var br1 = document.createElement('br');
|
4483 |
+
var br2 = document.createElement('br');
|
4484 |
+
var br3 = document.createElement('br');
|
4485 |
+
var br4 = document.createElement('br');
|
4486 |
+
// table_little -@ sarqaca tbody table_little darela table_little_t
|
4487 |
+
var label = document.createElement('span');
|
4488 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
4489 |
+
label.innerHTML = "button_"+i;
|
4490 |
+
label.style.cssText = 'display:none';
|
4491 |
+
|
4492 |
+
n=w_title.length;
|
4493 |
+
for(j=0; j<n; j++)
|
4494 |
+
{
|
4495 |
+
|
4496 |
+
var adding = document.createElement(element);
|
4497 |
+
adding.setAttribute("type", type);
|
4498 |
+
adding.setAttribute("id", i+"_elementform_id_temp"+j);
|
4499 |
+
adding.setAttribute("name", i+"_elementform_id_temp"+j);
|
4500 |
+
adding.setAttribute("value", w_title[j]);
|
4501 |
+
adding.innerHTML = w_title[j];
|
4502 |
+
adding.setAttribute("onclick", w_func[j]);
|
4503 |
+
|
4504 |
+
|
4505 |
+
td2.appendChild(adding);
|
4506 |
+
}
|
4507 |
+
var main_td = document.getElementById('show_table');
|
4508 |
+
|
4509 |
+
td1.appendChild(label);
|
4510 |
+
|
4511 |
+
td2.appendChild(adding_type);
|
4512 |
+
tr.appendChild(td1);
|
4513 |
+
tr.appendChild(td2);
|
4514 |
+
table.appendChild(tr);
|
4515 |
+
|
4516 |
|
4517 |
+
div.appendChild(table);
|
4518 |
+
div.appendChild(br1);
|
4519 |
+
main_td.appendChild(div);
|
4520 |
+
change_class(w_class, i);
|
4521 |
+
refresh_attr(i, 'type_checkbox');
|
4522 |
}
|
4523 |
|
4524 |
+
function type_text(i, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
|
|
4525 |
|
4526 |
+
element_ids=[ 'option1', 'option2'];
|
4527 |
+
document.getElementById("element_type").value="type_text";
|
4528 |
+
|
4529 |
+
delete_last_child();
|
4530 |
+
// edit table
|
4531 |
+
var edit_div = document.createElement('div');
|
4532 |
+
edit_div.setAttribute("id", "edit_div");
|
4533 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
4534 |
+
|
4535 |
+
var edit_main_table = document.createElement('table');
|
4536 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
4537 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
4538 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
4539 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
4540 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
4541 |
+
|
4542 |
+
var edit_main_tr1 = document.createElement('tr');
|
4543 |
+
edit_main_tr1.setAttribute("valing", "top");
|
4544 |
+
|
4545 |
+
var edit_main_tr2 = document.createElement('tr');
|
4546 |
+
edit_main_tr2.setAttribute("valing", "top");
|
4547 |
+
|
4548 |
+
var edit_main_tr3 = document.createElement('tr');
|
4549 |
+
edit_main_tr3.setAttribute("valing", "top");
|
4550 |
+
|
4551 |
+
var edit_main_tr4 = document.createElement('tr');
|
4552 |
+
edit_main_tr4.setAttribute("valing", "top");
|
4553 |
+
|
4554 |
+
var edit_main_tr5 = document.createElement('tr');
|
4555 |
+
edit_main_tr5.setAttribute("valing", "top");
|
4556 |
+
|
4557 |
+
var edit_main_tr6 = document.createElement('tr');
|
4558 |
+
edit_main_tr6.setAttribute("valing", "top");
|
4559 |
+
|
4560 |
+
var edit_main_tr7 = document.createElement('tr');
|
4561 |
+
edit_main_tr7.setAttribute("valing", "top");
|
4562 |
+
|
4563 |
+
var edit_main_tr8 = document.createElement('tr');
|
4564 |
+
edit_main_tr8.setAttribute("valing", "top");
|
4565 |
+
|
4566 |
+
var edit_main_tr9 = document.createElement('tr');
|
4567 |
+
edit_main_tr9.setAttribute("valing", "top");
|
4568 |
+
|
4569 |
+
var edit_main_td1 = document.createElement('td');
|
4570 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
4571 |
+
var edit_main_td1_1 = document.createElement('td');
|
4572 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
4573 |
+
var edit_main_td2 = document.createElement('td');
|
4574 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
4575 |
+
var edit_main_td2_1 = document.createElement('td');
|
4576 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
4577 |
+
|
4578 |
+
var edit_main_td3 = document.createElement('td');
|
4579 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
4580 |
+
var edit_main_td3_1 = document.createElement('td');
|
4581 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
4582 |
+
|
4583 |
+
var edit_main_td4 = document.createElement('td');
|
4584 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
4585 |
+
var edit_main_td4_1 = document.createElement('td');
|
4586 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
4587 |
+
|
4588 |
+
var edit_main_td5 = document.createElement('td');
|
4589 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
4590 |
+
var edit_main_td5_1 = document.createElement('td');
|
4591 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
4592 |
+
|
4593 |
+
var edit_main_td6 = document.createElement('td');
|
4594 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
4595 |
+
var edit_main_td6_1 = document.createElement('td');
|
4596 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
4597 |
+
|
4598 |
+
var edit_main_td7 = document.createElement('td');
|
4599 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
4600 |
+
var edit_main_td7_1 = document.createElement('td');
|
4601 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
4602 |
+
|
4603 |
+
var edit_main_td8 = document.createElement('td');
|
4604 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
4605 |
+
var edit_main_td8_1 = document.createElement('td');
|
4606 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
4607 |
+
|
4608 |
+
var edit_main_td9 = document.createElement('td');
|
4609 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
4610 |
+
var edit_main_td9_1 = document.createElement('td');
|
4611 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
4612 |
+
|
4613 |
+
var el_label_label = document.createElement('label');
|
4614 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4615 |
+
el_label_label.innerHTML = "Field label";
|
4616 |
+
|
4617 |
+
var el_label_textarea = document.createElement('textarea');
|
4618 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
4619 |
+
el_label_textarea.setAttribute("rows", "4");
|
4620 |
+
el_label_textarea.style.cssText = "width:200px";
|
4621 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
4622 |
+
el_label_textarea.innerHTML = w_field_label;
|
4623 |
+
|
4624 |
+
var el_label_position_label = document.createElement('label');
|
4625 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4626 |
+
el_label_position_label.innerHTML = "Field label position";
|
4627 |
+
|
4628 |
+
var el_label_position1 = document.createElement('input');
|
4629 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
4630 |
+
el_label_position1.setAttribute("type", "radio");
|
4631 |
+
el_label_position1.setAttribute("value", "left");
|
4632 |
+
|
4633 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
4634 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
4635 |
+
Left = document.createTextNode("Left");
|
4636 |
+
|
4637 |
+
var el_label_position2 = document.createElement('input');
|
4638 |
+
|
4639 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
4640 |
+
el_label_position2.setAttribute("type", "radio");
|
4641 |
+
el_label_position2.setAttribute("value", "top");
|
4642 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
4643 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
4644 |
+
Top = document.createTextNode("Top");
|
4645 |
+
|
4646 |
+
if(w_field_label_pos=="top")
|
4647 |
+
el_label_position2.setAttribute("checked", "checked");
|
4648 |
+
else
|
4649 |
+
el_label_position1.setAttribute("checked", "checked");
|
4650 |
+
|
4651 |
+
var el_size_label = document.createElement('label');
|
4652 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4653 |
+
el_size_label.innerHTML = "Field size(px) ";
|
4654 |
+
var el_size = document.createElement('input');
|
4655 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
4656 |
+
el_size.setAttribute("type", "text");
|
4657 |
+
el_size.setAttribute("value", w_size);
|
4658 |
+
|
4659 |
+
el_size.setAttribute("name", "edit_for_size");
|
4660 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
4661 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_elementform_id_temp', this.value)");
|
4662 |
+
|
4663 |
+
var el_first_value_label = document.createElement('label');
|
4664 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4665 |
+
el_first_value_label.innerHTML = "Value if empty ";
|
4666 |
+
|
4667 |
+
var el_first_value_input = document.createElement('input');
|
4668 |
+
el_first_value_input.setAttribute("id", "el_first_value_input");
|
4669 |
+
el_first_value_input.setAttribute("type", "text");
|
4670 |
+
el_first_value_input.setAttribute("value", w_title);
|
4671 |
+
el_first_value_input.style.cssText = "width:200px;";
|
4672 |
+
el_first_value_input.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_elementform_id_temp')");
|
4673 |
+
|
4674 |
+
var el_required_label = document.createElement('label');
|
4675 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4676 |
+
el_required_label.innerHTML = "Required";
|
4677 |
+
|
4678 |
+
var el_required = document.createElement('input');
|
4679 |
+
el_required.setAttribute("id", "el_send");
|
4680 |
+
el_required.setAttribute("type", "checkbox");
|
4681 |
+
el_required.setAttribute("value", "yes");
|
4682 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
4683 |
+
if(w_required=="yes")
|
4684 |
+
el_required.setAttribute("checked", "checked");
|
4685 |
+
|
4686 |
+
|
4687 |
+
var el_unique_label = document.createElement('label');
|
4688 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4689 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
4690 |
+
|
4691 |
+
var el_unique = document.createElement('input');
|
4692 |
+
el_unique.setAttribute("id", "el_send");
|
4693 |
+
el_unique.setAttribute("type", "checkbox");
|
4694 |
+
el_unique.setAttribute("value", "yes");
|
4695 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
4696 |
+
if(w_unique=="yes")
|
4697 |
+
el_unique.setAttribute("checked", "checked");
|
4698 |
+
|
4699 |
+
|
4700 |
+
|
4701 |
+
var el_style_label = document.createElement('label');
|
4702 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4703 |
+
el_style_label.innerHTML = "Deactive Class name";
|
4704 |
+
|
4705 |
+
var el_style_textarea = document.createElement('input');
|
4706 |
+
el_style_textarea.setAttribute("id", "element_style");
|
4707 |
+
el_style_textarea.setAttribute("type", "text");
|
4708 |
+
el_style_textarea.setAttribute("value", "input_deactive");
|
4709 |
+
el_style_textarea.setAttribute("disabled", "disabled");
|
4710 |
+
el_style_textarea.style.cssText = "width:200px;";
|
4711 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
4712 |
+
|
4713 |
+
var el_style_label2 = document.createElement('label');
|
4714 |
+
el_style_label2.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4715 |
+
el_style_label2.innerHTML = "Active Class name";
|
4716 |
+
|
4717 |
+
var el_style_textarea2 = document.createElement('input');
|
4718 |
+
el_style_textarea2.setAttribute("id", "element_style");
|
4719 |
+
el_style_textarea2.setAttribute("type", "text");
|
4720 |
+
el_style_textarea2.setAttribute("value", "input_active");
|
4721 |
+
el_style_textarea2.setAttribute("disabled", "disabled");
|
4722 |
+
el_style_textarea2.style.cssText = "width:200px;";
|
4723 |
+
el_style_textarea2.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
4724 |
+
|
4725 |
+
var el_attr_label = document.createElement('label');
|
4726 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
4727 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
4728 |
+
|
4729 |
+
var el_attr_add = document.createElement('img');
|
4730 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
4731 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
4732 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
4733 |
+
el_attr_add.setAttribute("title", 'add');
|
4734 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
4735 |
+
var el_attr_table = document.createElement('table');
|
4736 |
+
el_attr_table.setAttribute("id", 'attributes');
|
4737 |
+
el_attr_table.setAttribute("border", '0');
|
4738 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
4739 |
+
var el_attr_tr_label = document.createElement('tr');
|
4740 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
4741 |
+
var el_attr_td_name_label = document.createElement('th');
|
4742 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
4743 |
+
var el_attr_td_value_label = document.createElement('th');
|
4744 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
4745 |
+
var el_attr_td_X_label = document.createElement('th');
|
4746 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
4747 |
+
var el_attr_name_label = document.createElement('label');
|
4748 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4749 |
+
el_attr_name_label.innerHTML = "Name";
|
4750 |
+
|
4751 |
+
var el_attr_value_label = document.createElement('label');
|
4752 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
4753 |
+
el_attr_value_label.innerHTML = "Value";
|
4754 |
+
|
4755 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
4756 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
4757 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
4758 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
4759 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
4760 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
4761 |
+
|
4762 |
+
n=w_attr_name.length;
|
4763 |
+
for(j=1; j<=n; j++)
|
4764 |
+
{
|
4765 |
+
var el_attr_tr = document.createElement('tr');
|
4766 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
4767 |
+
el_attr_tr.setAttribute("idi", j);
|
4768 |
+
var el_attr_td_name = document.createElement('td');
|
4769 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
4770 |
+
var el_attr_td_value = document.createElement('td');
|
4771 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
4772 |
+
|
4773 |
+
var el_attr_td_X = document.createElement('td');
|
4774 |
+
var el_attr_name = document.createElement('input');
|
4775 |
+
|
4776 |
+
el_attr_name.setAttribute("type", "text");
|
4777 |
+
|
4778 |
+
el_attr_name.style.cssText = "width:100px";
|
4779 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
4780 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
4781 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
4782 |
+
|
4783 |
+
var el_attr_value = document.createElement('input');
|
4784 |
+
|
4785 |
+
el_attr_value.setAttribute("type", "text");
|
4786 |
+
|
4787 |
+
el_attr_value.style.cssText = "width:100px";
|
4788 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
4789 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
4790 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
4791 |
+
|
4792 |
+
var el_attr_remove = document.createElement('img');
|
4793 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
4794 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
4795 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
4796 |
+
el_attr_remove.setAttribute("align", 'top');
|
4797 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
4798 |
+
el_attr_table.appendChild(el_attr_tr);
|
4799 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
4800 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
4801 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
4802 |
+
el_attr_td_name.appendChild(el_attr_name);
|
4803 |
+
el_attr_td_value.appendChild(el_attr_value);
|
4804 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
4805 |
+
|
4806 |
+
}
|
4807 |
+
|
4808 |
+
|
4809 |
+
var t = document.getElementById('edit_table');
|
4810 |
+
|
4811 |
+
var br = document.createElement('br');
|
4812 |
+
var br1 = document.createElement('br');
|
4813 |
+
var br2 = document.createElement('br');
|
4814 |
+
var br3 = document.createElement('br');
|
4815 |
+
var br4 = document.createElement('br');
|
4816 |
+
var br5 = document.createElement('br');
|
4817 |
+
var br6 = document.createElement('br');
|
4818 |
+
edit_main_td1.appendChild(el_label_label);
|
4819 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
4820 |
+
|
4821 |
+
edit_main_td2.appendChild(el_label_position_label);
|
4822 |
+
edit_main_td2.appendChild(br1);
|
4823 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
4824 |
+
edit_main_td2_1.appendChild(Left);
|
4825 |
+
edit_main_td2_1.appendChild(br2);
|
4826 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
4827 |
+
edit_main_td2_1.appendChild(Top);
|
4828 |
+
|
4829 |
+
edit_main_td3.appendChild(el_size_label);
|
4830 |
+
edit_main_td3_1.appendChild(el_size);
|
4831 |
+
|
4832 |
+
edit_main_td4.appendChild(el_first_value_label);
|
4833 |
+
edit_main_td4_1.appendChild(el_first_value_input);
|
4834 |
+
|
4835 |
+
edit_main_td5.appendChild(el_style_label);
|
4836 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
4837 |
+
|
4838 |
+
edit_main_td9.appendChild(el_style_label2);
|
4839 |
+
edit_main_td9_1.appendChild(el_style_textarea2);
|
4840 |
+
|
4841 |
+
|
4842 |
+
|
4843 |
+
|
4844 |
+
edit_main_td6.appendChild(el_required_label);
|
4845 |
+
edit_main_td6_1.appendChild(el_required);
|
4846 |
+
edit_main_td8.appendChild(el_unique_label);
|
4847 |
+
edit_main_td8_1.appendChild(el_unique);
|
4848 |
+
|
4849 |
+
edit_main_td7.appendChild(el_attr_label);
|
4850 |
+
edit_main_td7.appendChild(el_attr_add);
|
4851 |
+
edit_main_td7.appendChild(br6);
|
4852 |
+
edit_main_td7.appendChild(el_attr_table);
|
4853 |
+
edit_main_td7.setAttribute("colspan", "2");
|
4854 |
+
|
4855 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
4856 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
4857 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
4858 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
4859 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
4860 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
4861 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
4862 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
4863 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
4864 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
4865 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
4866 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
4867 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
4868 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
4869 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
4870 |
+
edit_main_tr9.appendChild(edit_main_td9);
|
4871 |
+
edit_main_tr9.appendChild(edit_main_td9_1);
|
4872 |
+
edit_main_table.appendChild(edit_main_tr1);
|
4873 |
+
edit_main_table.appendChild(edit_main_tr2);
|
4874 |
+
edit_main_table.appendChild(edit_main_tr3);
|
4875 |
+
edit_main_table.appendChild(edit_main_tr4);
|
4876 |
+
edit_main_table.appendChild(edit_main_tr5);
|
4877 |
+
edit_main_table.appendChild(edit_main_tr9);
|
4878 |
+
edit_main_table.appendChild(edit_main_tr6);
|
4879 |
+
edit_main_table.appendChild(edit_main_tr8);
|
4880 |
+
edit_main_table.appendChild(edit_main_tr7);
|
4881 |
+
edit_div.appendChild(edit_main_table);
|
4882 |
+
|
4883 |
+
t.appendChild(edit_div);
|
4884 |
+
add_id_and_name(i, 'type_text');
|
4885 |
+
|
4886 |
+
//show table
|
4887 |
|
4888 |
+
element='input'; type='text';
|
4889 |
+
var adding_type = document.createElement("input");
|
4890 |
+
adding_type.setAttribute("type", "hidden");
|
4891 |
+
adding_type.setAttribute("value", "type_text");
|
4892 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
4893 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
4894 |
+
|
4895 |
+
var adding_required= document.createElement("input");
|
4896 |
+
adding_required.setAttribute("type", "hidden");
|
4897 |
+
adding_required.setAttribute("value", w_required);
|
4898 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
4899 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
4900 |
+
|
4901 |
+
var adding_unique= document.createElement("input");
|
4902 |
+
adding_unique.setAttribute("type", "hidden");
|
4903 |
+
adding_unique.setAttribute("value", w_unique);
|
4904 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
4905 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
4906 |
+
|
4907 |
+
var adding = document.createElement(element);
|
4908 |
+
adding.setAttribute("type", type);
|
4909 |
+
|
4910 |
+
if(w_title==w_first_val)
|
4911 |
+
{
|
4912 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
4913 |
+
adding.setAttribute("class", "input_deactive");
|
4914 |
+
}
|
4915 |
+
else
|
4916 |
+
{
|
4917 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
4918 |
+
adding.setAttribute("class", "input_active");
|
4919 |
+
}
|
4920 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
4921 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
4922 |
+
adding.setAttribute("value", w_first_val);
|
4923 |
+
adding.setAttribute("title", w_title);
|
4924 |
+
adding.setAttribute("onFocus", 'delete_value("'+i+'_elementform_id_temp")');
|
4925 |
+
adding.setAttribute("onBlur", 'return_value("'+i+'_elementform_id_temp")');
|
4926 |
+
adding.setAttribute("onChange", 'change_value("'+i+'_elementform_id_temp")');
|
4927 |
+
|
4928 |
+
|
4929 |
+
var div = document.createElement('div');
|
4930 |
+
div.setAttribute("id", "main_div");
|
4931 |
+
|
4932 |
+
var table = document.createElement('table');
|
4933 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
4934 |
+
|
4935 |
+
var tr = document.createElement('tr');
|
4936 |
+
|
4937 |
+
var td1 = document.createElement('td');
|
4938 |
+
td1.setAttribute("valign", 'middle');
|
4939 |
+
td1.setAttribute("align", 'left');
|
4940 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
4941 |
+
|
4942 |
+
var td2 = document.createElement('td');
|
4943 |
+
td2.setAttribute("valign", 'middle');
|
4944 |
+
td2.setAttribute("align", 'left');
|
4945 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
4946 |
+
|
4947 |
+
var br1 = document.createElement('br');
|
4948 |
+
var br2 = document.createElement('br');
|
4949 |
+
var br3 = document.createElement('br');
|
4950 |
+
var br4 = document.createElement('br');
|
4951 |
+
|
4952 |
|
4953 |
+
|
4954 |
+
var label = document.createElement('span');
|
4955 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
4956 |
+
label.innerHTML = w_field_label;
|
4957 |
+
label.setAttribute("class", "label");
|
4958 |
+
|
4959 |
+
var required = document.createElement('span');
|
4960 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
4961 |
+
required.innerHTML = "";
|
4962 |
+
required.setAttribute("class", "required");
|
4963 |
+
if(w_required=="yes")
|
4964 |
+
required.innerHTML = " *";
|
4965 |
+
var main_td = document.getElementById('show_table');
|
4966 |
+
|
4967 |
+
td1.appendChild(label);
|
4968 |
+
td1.appendChild(required);
|
4969 |
+
td2.appendChild(adding_type);
|
4970 |
+
td2.appendChild(adding_required);
|
4971 |
+
td2.appendChild(adding_unique);
|
4972 |
+
td2.appendChild(adding);
|
4973 |
+
tr.appendChild(td1);
|
4974 |
+
tr.appendChild(td2);
|
4975 |
+
table.appendChild(tr);
|
4976 |
+
|
4977 |
+
div.appendChild(table);
|
4978 |
+
div.appendChild(br3);
|
4979 |
+
main_td.appendChild(div);
|
4980 |
+
if(w_field_label_pos=="top")
|
4981 |
+
label_top(i);
|
4982 |
+
change_class(w_class, i);
|
4983 |
+
refresh_attr(i, 'type_text');
|
4984 |
+
}
|
4985 |
|
4986 |
+
function type_number(i, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4987 |
|
4988 |
+
element_ids=[ 'option1', 'option2'];
|
4989 |
+
document.getElementById("element_type").value="type_number";
|
4990 |
+
|
4991 |
+
delete_last_child();
|
4992 |
+
// edit table
|
4993 |
+
var edit_div = document.createElement('div');
|
4994 |
+
edit_div.setAttribute("id", "edit_div");
|
4995 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
4996 |
+
|
4997 |
+
var edit_main_table = document.createElement('table');
|
4998 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
4999 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
5000 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
5001 |
+
|
5002 |
+
var edit_main_tr1 = document.createElement('tr');
|
5003 |
+
edit_main_tr1.setAttribute("valing", "top");
|
5004 |
+
|
5005 |
+
var edit_main_tr2 = document.createElement('tr');
|
5006 |
+
edit_main_tr2.setAttribute("valing", "top");
|
5007 |
+
|
5008 |
+
var edit_main_tr3 = document.createElement('tr');
|
5009 |
+
edit_main_tr3.setAttribute("valing", "top");
|
5010 |
+
|
5011 |
+
var edit_main_tr4 = document.createElement('tr');
|
5012 |
+
edit_main_tr4.setAttribute("valing", "top");
|
5013 |
+
|
5014 |
+
var edit_main_tr5 = document.createElement('tr');
|
5015 |
+
edit_main_tr5.setAttribute("valing", "top");
|
5016 |
+
|
5017 |
+
var edit_main_tr6 = document.createElement('tr');
|
5018 |
+
edit_main_tr6.setAttribute("valing", "top");
|
5019 |
+
|
5020 |
+
var edit_main_tr7 = document.createElement('tr');
|
5021 |
+
edit_main_tr7.setAttribute("valing", "top");
|
5022 |
+
|
5023 |
+
var edit_main_tr8 = document.createElement('tr');
|
5024 |
+
edit_main_tr8.setAttribute("valing", "top");
|
5025 |
+
|
5026 |
+
var edit_main_td1 = document.createElement('td');
|
5027 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
5028 |
+
var edit_main_td1_1 = document.createElement('td');
|
5029 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
5030 |
+
var edit_main_td2 = document.createElement('td');
|
5031 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
5032 |
+
var edit_main_td2_1 = document.createElement('td');
|
5033 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
5034 |
+
|
5035 |
+
var edit_main_td3 = document.createElement('td');
|
5036 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
5037 |
+
var edit_main_td3_1 = document.createElement('td');
|
5038 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
5039 |
+
var edit_main_td4 = document.createElement('td');
|
5040 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
5041 |
+
var edit_main_td4_1 = document.createElement('td');
|
5042 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
5043 |
+
|
5044 |
+
var edit_main_td5 = document.createElement('td');
|
5045 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
5046 |
+
var edit_main_td5_1 = document.createElement('td');
|
5047 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
5048 |
+
|
5049 |
+
var edit_main_td6 = document.createElement('td');
|
5050 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
5051 |
+
var edit_main_td6_1 = document.createElement('td');
|
5052 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
5053 |
+
|
5054 |
+
var edit_main_td7 = document.createElement('td');
|
5055 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
5056 |
+
var edit_main_td7_1 = document.createElement('td');
|
5057 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
5058 |
+
|
5059 |
+
var edit_main_td8 = document.createElement('td');
|
5060 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
5061 |
+
var edit_main_td8_1 = document.createElement('td');
|
5062 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
5063 |
+
|
5064 |
+
var el_label_label = document.createElement('label');
|
5065 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5066 |
+
el_label_label.innerHTML = "Field label";
|
5067 |
+
|
5068 |
+
var el_label_textarea = document.createElement('textarea');
|
5069 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
5070 |
+
el_label_textarea.setAttribute("rows", "4");
|
5071 |
+
el_label_textarea.style.cssText = "width:200px";
|
5072 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
5073 |
+
el_label_textarea.innerHTML = w_field_label;
|
5074 |
+
|
5075 |
+
var el_label_position_label = document.createElement('label');
|
5076 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5077 |
+
el_label_position_label.innerHTML = "Field label position";
|
5078 |
+
|
5079 |
+
var el_label_position1 = document.createElement('input');
|
5080 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
5081 |
+
el_label_position1.setAttribute("type", "radio");
|
5082 |
+
el_label_position1.setAttribute("value", "left");
|
5083 |
+
|
5084 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
5085 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
5086 |
+
Left = document.createTextNode("Left");
|
5087 |
+
|
5088 |
+
var el_label_position2 = document.createElement('input');
|
5089 |
+
|
5090 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
5091 |
+
el_label_position2.setAttribute("type", "radio");
|
5092 |
+
el_label_position2.setAttribute("value", "top");
|
5093 |
+
|
5094 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
5095 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
5096 |
+
Top = document.createTextNode("Top");
|
5097 |
+
|
5098 |
+
if(w_field_label_pos=="top")
|
5099 |
+
el_label_position2.setAttribute("checked", "checked");
|
5100 |
+
else
|
5101 |
+
el_label_position1.setAttribute("checked", "checked");
|
5102 |
+
|
5103 |
+
var el_size_label = document.createElement('label');
|
5104 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5105 |
+
el_size_label.innerHTML = "Field size(px) ";
|
5106 |
+
var el_size = document.createElement('input');
|
5107 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
5108 |
+
el_size.setAttribute("type", "text");
|
5109 |
+
el_size.setAttribute("value", w_size);
|
5110 |
+
|
5111 |
+
el_size.setAttribute("name", "edit_for_size");
|
5112 |
+
el_size.setAttribute("onKeyPress", "return check_isnum_point(event)");
|
5113 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_elementform_id_temp', this.value)");
|
5114 |
+
|
5115 |
+
var el_first_value_label = document.createElement('label');
|
5116 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5117 |
+
el_first_value_label.innerHTML = "Value if empty ";
|
5118 |
+
|
5119 |
+
var el_first_value_input = document.createElement('input');
|
5120 |
+
el_first_value_input.setAttribute("id", "el_first_value_input");
|
5121 |
+
el_first_value_input.setAttribute("type", "text");
|
5122 |
+
el_first_value_input.setAttribute("value", w_title);
|
5123 |
+
el_first_value_input.style.cssText = "width:200px;";
|
5124 |
+
el_first_value_input.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_elementform_id_temp')");
|
5125 |
+
var el_required_label = document.createElement('label');
|
5126 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5127 |
+
el_required_label.innerHTML = "Required";
|
5128 |
+
|
5129 |
+
var el_required = document.createElement('input');
|
5130 |
+
el_required.setAttribute("id", "el_send");
|
5131 |
+
el_required.setAttribute("type", "checkbox");
|
5132 |
+
el_required.setAttribute("value", "yes");
|
5133 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
5134 |
+
if(w_required=="yes")
|
5135 |
+
el_required.setAttribute("checked", "checked");
|
5136 |
+
|
5137 |
+
var el_unique_label = document.createElement('label');
|
5138 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5139 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
5140 |
+
|
5141 |
+
var el_unique = document.createElement('input');
|
5142 |
+
el_unique.setAttribute("id", "el_send");
|
5143 |
+
el_unique.setAttribute("type", "checkbox");
|
5144 |
+
el_unique.setAttribute("value", "yes");
|
5145 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
5146 |
+
if(w_unique=="yes")
|
5147 |
+
el_unique.setAttribute("checked", "checked");
|
5148 |
+
|
5149 |
+
var el_style_label = document.createElement('label');
|
5150 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5151 |
+
el_style_label.innerHTML = "Class name";
|
5152 |
+
|
5153 |
+
var el_style_textarea = document.createElement('input');
|
5154 |
+
el_style_textarea.setAttribute("id", "element_style");
|
5155 |
+
el_style_textarea.setAttribute("type", "text");
|
5156 |
+
el_style_textarea.setAttribute("value", w_class);
|
5157 |
+
el_style_textarea.style.cssText = "width:200px;";
|
5158 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
5159 |
+
|
5160 |
+
var el_attr_label = document.createElement('label');
|
5161 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5162 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
5163 |
+
|
5164 |
+
var el_attr_add = document.createElement('img');
|
5165 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
5166 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
5167 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
5168 |
+
el_attr_add.setAttribute("title", 'add');
|
5169 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
5170 |
+
var el_attr_table = document.createElement('table');
|
5171 |
+
el_attr_table.setAttribute("id", 'attributes');
|
5172 |
+
el_attr_table.setAttribute("border", '0');
|
5173 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
5174 |
+
var el_attr_tr_label = document.createElement('tr');
|
5175 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
5176 |
+
var el_attr_td_name_label = document.createElement('th');
|
5177 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
5178 |
+
var el_attr_td_value_label = document.createElement('th');
|
5179 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
5180 |
+
var el_attr_td_X_label = document.createElement('th');
|
5181 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
5182 |
+
var el_attr_name_label = document.createElement('label');
|
5183 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
5184 |
+
el_attr_name_label.innerHTML = "Name";
|
5185 |
+
|
5186 |
+
var el_attr_value_label = document.createElement('label');
|
5187 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
5188 |
+
el_attr_value_label.innerHTML = "Value";
|
5189 |
+
|
5190 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
5191 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
5192 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
5193 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
5194 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
5195 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
5196 |
+
|
5197 |
+
n=w_attr_name.length;
|
5198 |
+
for(j=1; j<=n; j++)
|
5199 |
+
{
|
5200 |
+
var el_attr_tr = document.createElement('tr');
|
5201 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
5202 |
+
el_attr_tr.setAttribute("idi", j);
|
5203 |
+
var el_attr_td_name = document.createElement('td');
|
5204 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
5205 |
+
var el_attr_td_value = document.createElement('td');
|
5206 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
5207 |
+
|
5208 |
+
var el_attr_td_X = document.createElement('td');
|
5209 |
+
var el_attr_name = document.createElement('input');
|
5210 |
+
|
5211 |
+
el_attr_name.setAttribute("type", "text");
|
5212 |
+
|
5213 |
+
el_attr_name.style.cssText = "width:100px";
|
5214 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
5215 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
5216 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
5217 |
+
|
5218 |
+
var el_attr_value = document.createElement('input');
|
5219 |
+
|
5220 |
+
el_attr_value.setAttribute("type", "text");
|
5221 |
+
|
5222 |
+
el_attr_value.style.cssText = "width:100px";
|
5223 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
5224 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
5225 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
5226 |
+
|
5227 |
+
var el_attr_remove = document.createElement('img');
|
5228 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
5229 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
5230 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
5231 |
+
el_attr_remove.setAttribute("align", 'top');
|
5232 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
5233 |
+
el_attr_table.appendChild(el_attr_tr);
|
5234 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
5235 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
5236 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
5237 |
+
el_attr_td_name.appendChild(el_attr_name);
|
5238 |
+
el_attr_td_value.appendChild(el_attr_value);
|
5239 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
5240 |
+
|
5241 |
+
}
|
5242 |
+
|
5243 |
+
|
5244 |
+
var t = document.getElementById('edit_table');
|
5245 |
+
|
5246 |
+
var br = document.createElement('br');
|
5247 |
+
var br1 = document.createElement('br');
|
5248 |
+
var br2 = document.createElement('br');
|
5249 |
+
var br3 = document.createElement('br');
|
5250 |
+
var br4 = document.createElement('br');
|
5251 |
+
var br5 = document.createElement('br');
|
5252 |
+
var br6 = document.createElement('br');
|
5253 |
+
edit_main_td1.appendChild(el_label_label);
|
5254 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
5255 |
+
|
5256 |
+
edit_main_td2.appendChild(el_label_position_label);
|
5257 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
5258 |
+
edit_main_td2_1.appendChild(Left);
|
5259 |
+
edit_main_td2_1.appendChild(br2);
|
5260 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
5261 |
+
edit_main_td2_1.appendChild(Top);
|
5262 |
+
|
5263 |
+
edit_main_td3.appendChild(el_size_label);
|
5264 |
+
edit_main_td3_1.appendChild(el_size);
|
5265 |
+
|
5266 |
+
edit_main_td4.appendChild(el_first_value_label);
|
5267 |
+
edit_main_td4_1.appendChild(el_first_value_input);
|
5268 |
+
|
5269 |
+
edit_main_td5.appendChild(el_style_label);
|
5270 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
5271 |
+
edit_main_td6.appendChild(el_required_label);
|
5272 |
+
edit_main_td6_1.appendChild(el_required);
|
5273 |
+
|
5274 |
+
edit_main_td8.appendChild(el_unique_label);
|
5275 |
+
edit_main_td8_1.appendChild(el_unique);
|
5276 |
+
|
5277 |
+
|
5278 |
+
edit_main_td7.appendChild(el_attr_label);
|
5279 |
+
edit_main_td7.appendChild(el_attr_add);
|
5280 |
+
edit_main_td7.appendChild(br6);
|
5281 |
+
edit_main_td7.appendChild(el_attr_table);
|
5282 |
+
edit_main_td7.setAttribute("colspan", "2");
|
5283 |
+
|
5284 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
5285 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
5286 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
5287 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
5288 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
5289 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
5290 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
5291 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
5292 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
5293 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
5294 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
5295 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
5296 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
5297 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
5298 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
5299 |
+
edit_main_table.appendChild(edit_main_tr1);
|
5300 |
+
edit_main_table.appendChild(edit_main_tr2);
|
5301 |
+
edit_main_table.appendChild(edit_main_tr3);
|
5302 |
+
edit_main_table.appendChild(edit_main_tr4);
|
5303 |
+
edit_main_table.appendChild(edit_main_tr5);
|
5304 |
+
edit_main_table.appendChild(edit_main_tr6);
|
5305 |
+
edit_main_table.appendChild(edit_main_tr8);
|
5306 |
+
edit_main_table.appendChild(edit_main_tr7);
|
5307 |
+
edit_div.appendChild(edit_main_table);
|
5308 |
+
|
5309 |
+
t.appendChild(edit_div);
|
5310 |
+
add_id_and_name(i, 'type_text');
|
5311 |
+
|
5312 |
+
//show table
|
5313 |
|
5314 |
+
element='input'; type='text';
|
5315 |
+
var adding_type = document.createElement("input");
|
5316 |
+
adding_type.setAttribute("type", "hidden");
|
5317 |
+
adding_type.setAttribute("value", "type_number");
|
5318 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
5319 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
5320 |
+
|
5321 |
+
var adding_required= document.createElement("input");
|
5322 |
+
adding_required.setAttribute("type", "hidden");
|
5323 |
+
adding_required.setAttribute("value", w_required);
|
5324 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
5325 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
5326 |
+
|
5327 |
+
var adding_unique= document.createElement("input");
|
5328 |
+
adding_unique.setAttribute("type", "hidden");
|
5329 |
+
adding_unique.setAttribute("value", w_unique);
|
5330 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
5331 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
5332 |
+
|
5333 |
+
|
5334 |
+
var adding = document.createElement(element);
|
5335 |
+
adding.setAttribute("type", type);
|
5336 |
+
|
5337 |
+
if(w_title==w_first_val)
|
5338 |
+
{
|
5339 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
5340 |
+
adding.setAttribute("class", "input_deactive");
|
5341 |
+
}
|
5342 |
+
else
|
5343 |
+
{
|
5344 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
5345 |
+
adding.setAttribute("class", "input_active");
|
5346 |
+
}
|
5347 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
5348 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
5349 |
+
adding.setAttribute("value", w_first_val);
|
5350 |
+
adding.setAttribute("title", w_title);
|
5351 |
+
adding.setAttribute("onKeyPress", "return check_isnum_point(event)");
|
5352 |
+
adding.setAttribute("onFocus", 'delete_value("'+i+'_elementform_id_temp")');
|
5353 |
+
adding.setAttribute("onBlur", 'return_value("'+i+'_elementform_id_temp")');
|
5354 |
+
adding.setAttribute("onChange", 'change_value("'+i+'_elementform_id_temp")');
|
5355 |
+
|
5356 |
+
|
5357 |
+
var div = document.createElement('div');
|
5358 |
+
div.setAttribute("id", "main_div");
|
5359 |
+
|
5360 |
+
var table = document.createElement('table');
|
5361 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
5362 |
+
|
5363 |
+
var tr = document.createElement('tr');
|
5364 |
+
|
5365 |
+
var td1 = document.createElement('td');
|
5366 |
+
td1.setAttribute("valign", 'middle');
|
5367 |
+
td1.setAttribute("align", 'left');
|
5368 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
5369 |
+
|
5370 |
+
var td2 = document.createElement('td');
|
5371 |
+
td2.setAttribute("valign", 'middle');
|
5372 |
+
td2.setAttribute("align", 'left');
|
5373 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
5374 |
+
|
5375 |
+
var br1 = document.createElement('br');
|
5376 |
+
var br2 = document.createElement('br');
|
5377 |
+
var br3 = document.createElement('br');
|
5378 |
+
var br4 = document.createElement('br');
|
5379 |
+
|
5380 |
|
5381 |
+
|
5382 |
+
var label = document.createElement('span');
|
5383 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
5384 |
+
label.innerHTML = w_field_label;
|
5385 |
+
label.setAttribute("class", "label");
|
5386 |
+
|
5387 |
+
var required = document.createElement('span');
|
5388 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
5389 |
+
required.innerHTML = "";
|
5390 |
+
required.setAttribute("class", "required");
|
5391 |
+
if(w_required=="yes")
|
5392 |
+
required.innerHTML = " *";
|
5393 |
+
var main_td = document.getElementById('show_table');
|
5394 |
+
|
5395 |
+
td1.appendChild(label);
|
5396 |
+
td1.appendChild(required);
|
5397 |
+
td2.appendChild(adding_type);
|
5398 |
+
td2.appendChild(adding_required);
|
5399 |
+
td2.appendChild(adding_unique);
|
5400 |
+
td2.appendChild(adding);
|
5401 |
+
tr.appendChild(td1);
|
5402 |
+
tr.appendChild(td2);
|
5403 |
+
table.appendChild(tr);
|
5404 |
+
|
5405 |
+
div.appendChild(table);
|
5406 |
+
div.appendChild(br3);
|
5407 |
+
main_td.appendChild(div);
|
5408 |
+
if(w_field_label_pos=="top")
|
5409 |
+
label_top(i);
|
5410 |
+
change_class(w_class, i);
|
5411 |
+
refresh_attr(i, 'type_text');
|
5412 |
+
}
|
5413 |
|
5414 |
+
function type_password(i, w_field_label, w_field_label_pos, w_size, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
5415 |
|
5416 |
+
document.getElementById("element_type").value="type_password";
|
5417 |
|
5418 |
+
delete_last_child();
|
5419 |
+
// edit table
|
5420 |
+
var edit_div = document.createElement('div');
|
5421 |
+
edit_div.setAttribute("id", "edit_div");
|
5422 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
5423 |
+
|
5424 |
+
var edit_main_table = document.createElement('table');
|
5425 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
5426 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
5427 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
5428 |
+
|
5429 |
+
var edit_main_tr1 = document.createElement('tr');
|
5430 |
+
edit_main_tr1.setAttribute("valing", "top");
|
5431 |
+
|
5432 |
+
var edit_main_tr2 = document.createElement('tr');
|
5433 |
+
edit_main_tr2.setAttribute("valing", "top");
|
5434 |
+
|
5435 |
+
var edit_main_tr3 = document.createElement('tr');
|
5436 |
+
edit_main_tr3.setAttribute("valing", "top");
|
5437 |
+
|
5438 |
+
var edit_main_tr4 = document.createElement('tr');
|
5439 |
+
edit_main_tr4.setAttribute("valing", "top");
|
5440 |
+
|
5441 |
+
var edit_main_tr5 = document.createElement('tr');
|
5442 |
+
edit_main_tr5.setAttribute("valing", "top");
|
5443 |
+
|
5444 |
+
var edit_main_tr6 = document.createElement('tr');
|
5445 |
+
edit_main_tr6.setAttribute("valing", "top");
|
5446 |
+
|
5447 |
+
var edit_main_tr7 = document.createElement('tr');
|
5448 |
+
edit_main_tr7.setAttribute("valing", "top");
|
5449 |
+
|
5450 |
+
var edit_main_td1 = document.createElement('td');
|
5451 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
5452 |
+
var edit_main_td1_1 = document.createElement('td');
|
5453 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
5454 |
+
var edit_main_td2 = document.createElement('td');
|
5455 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
5456 |
+
var edit_main_td2_1 = document.createElement('td');
|
5457 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
5458 |
+
|
5459 |
+
var edit_main_td3 = document.createElement('td');
|
5460 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
5461 |
+
var edit_main_td3_1 = document.createElement('td');
|
5462 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
5463 |
+
|
5464 |
+
var edit_main_td4 = document.createElement('td');
|
5465 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
5466 |
+
var edit_main_td4_1 = document.createElement('td');
|
5467 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
5468 |
+
|
5469 |
+
var edit_main_td5 = document.createElement('td');
|
5470 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
5471 |
+
var edit_main_td5_1 = document.createElement('td');
|
5472 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
5473 |
+
|
5474 |
+
var edit_main_td6 = document.createElement('td');
|
5475 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
5476 |
+
var edit_main_td6_1 = document.createElement('td');
|
5477 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
5478 |
+
|
5479 |
+
var edit_main_td7 = document.createElement('td');
|
5480 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
5481 |
+
var edit_main_td7_1 = document.createElement('td');
|
5482 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
5483 |
+
|
5484 |
+
var el_label_label = document.createElement('label');
|
5485 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5486 |
+
el_label_label.innerHTML = "Field label";
|
5487 |
+
|
5488 |
+
var el_label_textarea = document.createElement('textarea');
|
5489 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
5490 |
+
el_label_textarea.setAttribute("rows", "4");
|
5491 |
+
el_label_textarea.style.cssText = "width:200px;";
|
5492 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
5493 |
+
el_label_textarea.innerHTML = w_field_label;
|
5494 |
+
|
5495 |
+
var el_label_position_label = document.createElement('label');
|
5496 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5497 |
+
el_label_position_label.innerHTML = "Field label position";
|
5498 |
+
|
5499 |
+
var el_label_position1 = document.createElement('input');
|
5500 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
5501 |
+
el_label_position1.setAttribute("type", "radio");
|
5502 |
+
el_label_position1.setAttribute("value", "left");
|
5503 |
+
|
5504 |
+
|
5505 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
5506 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
5507 |
+
Left = document.createTextNode("Left");
|
5508 |
+
|
5509 |
+
var el_label_position2 = document.createElement('input');
|
5510 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
5511 |
+
el_label_position2.setAttribute("type", "radio");
|
5512 |
+
el_label_position2.setAttribute("value", "top");
|
5513 |
+
|
5514 |
+
|
5515 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
5516 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
5517 |
+
Top = document.createTextNode("Top");
|
5518 |
+
|
5519 |
+
if(w_field_label_pos=="top")
|
5520 |
+
|
5521 |
+
el_label_position2.setAttribute("checked", "checked");
|
5522 |
+
else
|
5523 |
+
el_label_position1.setAttribute("checked", "checked");
|
5524 |
+
|
5525 |
+
var el_size_label = document.createElement('label');
|
5526 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5527 |
+
el_size_label.innerHTML = "Field size(px) ";
|
5528 |
+
|
5529 |
+
var el_size = document.createElement('input');
|
5530 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
5531 |
+
el_size.setAttribute("type", "text");
|
5532 |
+
el_size.setAttribute("value", w_size);
|
5533 |
+
|
5534 |
+
el_size.setAttribute("name", "edit_for_size");
|
5535 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
5536 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_elementform_id_temp', this.value)");
|
5537 |
+
|
5538 |
+
var el_required_label = document.createElement('label');
|
5539 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5540 |
+
el_required_label.innerHTML = "Required";
|
5541 |
+
|
5542 |
+
var el_required = document.createElement('input');
|
5543 |
+
el_required.setAttribute("id", "el_send");
|
5544 |
+
el_required.setAttribute("type", "checkbox");
|
5545 |
+
el_required.setAttribute("value", "yes");
|
5546 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
5547 |
+
if(w_required=="yes")
|
5548 |
+
|
5549 |
+
el_required.setAttribute("checked", "checked");
|
5550 |
+
|
5551 |
+
var el_unique_label = document.createElement('label');
|
5552 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5553 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
5554 |
+
|
5555 |
+
var el_unique = document.createElement('input');
|
5556 |
+
el_unique.setAttribute("id", "el_send");
|
5557 |
+
el_unique.setAttribute("type", "checkbox");
|
5558 |
+
el_unique.setAttribute("value", "yes");
|
5559 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
5560 |
+
if(w_unique=="yes")
|
5561 |
+
el_unique.setAttribute("checked", "checked");
|
5562 |
+
|
5563 |
+
var el_style_label = document.createElement('label');
|
5564 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5565 |
+
el_style_label.innerHTML = "Class name";
|
5566 |
+
|
5567 |
+
var el_style_textarea = document.createElement('input');
|
5568 |
+
el_style_textarea.setAttribute("id", "element_style");
|
5569 |
+
el_style_textarea.setAttribute("type", "text");
|
5570 |
+
el_style_textarea.setAttribute("value", w_class);
|
5571 |
+
el_style_textarea.style.cssText = "width:200px;";
|
5572 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
5573 |
+
var el_attr_label = document.createElement('label');
|
5574 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5575 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
5576 |
+
var el_attr_add = document.createElement('img');
|
5577 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
5578 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
5579 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
5580 |
+
el_attr_add.setAttribute("title", 'add');
|
5581 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
5582 |
+
var el_attr_table = document.createElement('table');
|
5583 |
+
el_attr_table.setAttribute("id", 'attributes');
|
5584 |
+
el_attr_table.setAttribute("border", '0');
|
5585 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
5586 |
+
var el_attr_tr_label = document.createElement('tr');
|
5587 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
5588 |
+
var el_attr_td_name_label = document.createElement('th');
|
5589 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
5590 |
+
var el_attr_td_value_label = document.createElement('th');
|
5591 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
5592 |
+
var el_attr_td_X_label = document.createElement('th');
|
5593 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
5594 |
+
var el_attr_name_label = document.createElement('label');
|
5595 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
5596 |
+
el_attr_name_label.innerHTML = "Name";
|
5597 |
+
|
5598 |
+
var el_attr_value_label = document.createElement('label');
|
5599 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
5600 |
+
el_attr_value_label.innerHTML = "Value";
|
5601 |
+
|
5602 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
5603 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
5604 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
5605 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
5606 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
5607 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
5608 |
+
|
5609 |
+
n=w_attr_name.length;
|
5610 |
+
for(j=1; j<=n; j++)
|
5611 |
+
{
|
5612 |
+
var el_attr_tr = document.createElement('tr');
|
5613 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
5614 |
+
el_attr_tr.setAttribute("idi", j);
|
5615 |
+
var el_attr_td_name = document.createElement('td');
|
5616 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
5617 |
+
var el_attr_td_value = document.createElement('td');
|
5618 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
5619 |
+
|
5620 |
+
var el_attr_td_X = document.createElement('td');
|
5621 |
+
var el_attr_name = document.createElement('input');
|
5622 |
+
|
5623 |
+
el_attr_name.setAttribute("type", "text");
|
5624 |
+
|
5625 |
+
el_attr_name.style.cssText = "width:100px";
|
5626 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
5627 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
5628 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
5629 |
+
|
5630 |
+
var el_attr_value = document.createElement('input');
|
5631 |
+
|
5632 |
+
el_attr_value.setAttribute("type", "text");
|
5633 |
+
|
5634 |
+
el_attr_value.style.cssText = "width:100px";
|
5635 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
5636 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
5637 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
5638 |
+
|
5639 |
+
var el_attr_remove = document.createElement('img');
|
5640 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
5641 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
5642 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
5643 |
+
el_attr_remove.setAttribute("align", 'top');
|
5644 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
5645 |
+
el_attr_table.appendChild(el_attr_tr);
|
5646 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
5647 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
5648 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
5649 |
+
el_attr_td_name.appendChild(el_attr_name);
|
5650 |
+
el_attr_td_value.appendChild(el_attr_value);
|
5651 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
5652 |
+
|
5653 |
+
}
|
5654 |
+
|
5655 |
+
var t = document.getElementById('edit_table');
|
5656 |
+
|
5657 |
+
var br = document.createElement('br');
|
5658 |
+
var br1 = document.createElement('br');
|
5659 |
+
var br2 = document.createElement('br');
|
5660 |
+
var br3 = document.createElement('br');
|
5661 |
+
var br4 = document.createElement('br');
|
5662 |
+
var br5 = document.createElement('br');
|
5663 |
+
var br6 = document.createElement('br');
|
5664 |
+
|
5665 |
+
edit_main_td1.appendChild(el_label_label);
|
5666 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
5667 |
+
|
5668 |
+
edit_main_td2.appendChild(el_label_position_label);
|
5669 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
5670 |
+
edit_main_td2_1.appendChild(Left);
|
5671 |
+
edit_main_td2_1.appendChild(br2);
|
5672 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
5673 |
+
edit_main_td2_1.appendChild(Top);
|
5674 |
+
|
5675 |
+
edit_main_td3.appendChild(el_size_label);
|
5676 |
+
edit_main_td3_1.appendChild(el_size);
|
5677 |
+
|
5678 |
+
edit_main_td4.appendChild(el_style_label);
|
5679 |
+
edit_main_td4_1.appendChild(el_style_textarea);
|
5680 |
+
|
5681 |
+
edit_main_td5.appendChild(el_required_label);
|
5682 |
+
edit_main_td5_1.appendChild(el_required);
|
5683 |
+
|
5684 |
+
edit_main_td7.appendChild(el_unique_label);
|
5685 |
+
edit_main_td7_1.appendChild(el_unique);
|
5686 |
+
|
5687 |
+
edit_main_td6.appendChild(el_attr_label);
|
5688 |
+
edit_main_td6.appendChild(el_attr_add);
|
5689 |
+
edit_main_td6.appendChild(br3);
|
5690 |
+
edit_main_td6.appendChild(el_attr_table);
|
5691 |
+
edit_main_td6.setAttribute("colspan", "2");
|
5692 |
+
|
5693 |
+
|
5694 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
5695 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
5696 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
5697 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
5698 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
5699 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
5700 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
5701 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
5702 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
5703 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
5704 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
5705 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
5706 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
5707 |
+
edit_main_table.appendChild(edit_main_tr1);
|
5708 |
+
edit_main_table.appendChild(edit_main_tr2);
|
5709 |
+
edit_main_table.appendChild(edit_main_tr3);
|
5710 |
+
edit_main_table.appendChild(edit_main_tr4);
|
5711 |
+
edit_main_table.appendChild(edit_main_tr5);
|
5712 |
+
edit_main_table.appendChild(edit_main_tr7);
|
5713 |
+
edit_main_table.appendChild(edit_main_tr6);
|
5714 |
+
edit_div.appendChild(edit_main_table);
|
5715 |
+
|
5716 |
+
t.appendChild(edit_div);
|
5717 |
+
add_id_and_name(i, 'type_text');
|
5718 |
|
5719 |
+
//show table
|
5720 |
|
5721 |
+
element='input'; type='password';
|
5722 |
+
var adding_type = document.createElement("input");
|
5723 |
+
adding_type.setAttribute("type", "hidden");
|
5724 |
+
adding_type.setAttribute("value", "type_password");
|
5725 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
5726 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
5727 |
+
var adding_required= document.createElement("input");
|
5728 |
+
adding_required.setAttribute("type", "hidden");
|
5729 |
+
adding_required.setAttribute("value", w_required);
|
5730 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
5731 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
5732 |
+
|
5733 |
+
var adding_unique= document.createElement("input");
|
5734 |
+
adding_unique.setAttribute("type", "hidden");
|
5735 |
+
adding_unique.setAttribute("value", w_unique);
|
5736 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
5737 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
5738 |
+
|
5739 |
+
var adding = document.createElement(element);
|
5740 |
+
adding.setAttribute("type", type);
|
5741 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
5742 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
5743 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
5744 |
+
|
5745 |
+
|
5746 |
+
var div = document.createElement('div');
|
5747 |
+
div.setAttribute("id", "main_div");
|
5748 |
+
|
5749 |
+
var table = document.createElement('table');
|
5750 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
5751 |
+
|
5752 |
+
var tr = document.createElement('tr');
|
5753 |
+
|
5754 |
+
var td1 = document.createElement('td');
|
5755 |
+
td1.setAttribute("valign", 'middle');
|
5756 |
+
td1.setAttribute("align", 'left');
|
5757 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
5758 |
+
|
5759 |
+
var td2 = document.createElement('td');
|
5760 |
+
td2.setAttribute("valign", 'middle');
|
5761 |
+
td2.setAttribute("align", 'left');
|
5762 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
5763 |
+
|
5764 |
+
var br1 = document.createElement('br');
|
5765 |
+
var br2 = document.createElement('br');
|
5766 |
+
var br3 = document.createElement('br');
|
5767 |
+
var br4 = document.createElement('br');
|
5768 |
+
|
5769 |
+
|
5770 |
+
var label = document.createElement('span');
|
5771 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
5772 |
+
label.innerHTML = w_field_label;
|
5773 |
+
label.setAttribute("class", "label");
|
5774 |
+
|
5775 |
+
var required = document.createElement('span');
|
5776 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
5777 |
+
required.innerHTML = "";
|
5778 |
+
required.setAttribute("class", "required");
|
5779 |
+
if(w_required=="yes")
|
5780 |
+
required.innerHTML = " *";
|
5781 |
+
var main_td = document.getElementById('show_table');
|
5782 |
+
|
5783 |
+
|
5784 |
+
td1.appendChild(label);
|
5785 |
+
td1.appendChild(required);
|
5786 |
+
td2.appendChild(adding_type);
|
5787 |
+
td2.appendChild(adding_required);
|
5788 |
+
td2.appendChild(adding_unique);
|
5789 |
+
td2.appendChild(adding);
|
5790 |
+
tr.appendChild(td1);
|
5791 |
+
tr.appendChild(td2);
|
5792 |
+
table.appendChild(tr);
|
5793 |
+
|
5794 |
+
div.appendChild(table);
|
5795 |
+
div.appendChild(br3);
|
5796 |
+
main_td.appendChild(div);
|
5797 |
+
if(w_field_label_pos=="top")
|
5798 |
+
label_top(i);
|
5799 |
+
change_class(w_class, i);
|
5800 |
+
refresh_attr(i, 'type_text');
|
5801 |
+
}
|
5802 |
|
5803 |
+
function type_textarea(i, w_field_label, w_field_label_pos, w_size_w, w_size_h, w_first_val, w_title, w_required, w_unique, w_class, w_attr_name, w_attr_value){
|
5804 |
+
|
5805 |
+
document.getElementById("element_type").value="type_textarea";
|
5806 |
|
5807 |
+
delete_last_child();
|
5808 |
+
// edit table
|
5809 |
+
var edit_div = document.createElement('div');
|
5810 |
+
edit_div.setAttribute("id", "edit_div");
|
5811 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
5812 |
+
|
5813 |
+
var edit_main_table = document.createElement('table');
|
5814 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
5815 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
5816 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
5817 |
+
|
5818 |
+
var edit_main_tr1 = document.createElement('tr');
|
5819 |
+
edit_main_tr1.setAttribute("valing", "top");
|
5820 |
+
|
5821 |
+
var edit_main_tr2 = document.createElement('tr');
|
5822 |
+
edit_main_tr2.setAttribute("valing", "top");
|
5823 |
+
|
5824 |
+
var edit_main_tr3 = document.createElement('tr');
|
5825 |
+
edit_main_tr3.setAttribute("valing", "top");
|
5826 |
+
|
5827 |
+
var edit_main_tr4 = document.createElement('tr');
|
5828 |
+
edit_main_tr4.setAttribute("valing", "top");
|
5829 |
+
|
5830 |
+
var edit_main_tr5 = document.createElement('tr');
|
5831 |
+
edit_main_tr5.setAttribute("valing", "top");
|
5832 |
+
|
5833 |
+
var edit_main_tr6 = document.createElement('tr');
|
5834 |
+
edit_main_tr6.setAttribute("valing", "top");
|
5835 |
+
var edit_main_tr7 = document.createElement('tr');
|
5836 |
+
edit_main_tr7.setAttribute("valing", "top");
|
5837 |
+
|
5838 |
+
var edit_main_tr8 = document.createElement('tr');
|
5839 |
+
edit_main_tr8.setAttribute("valing", "top");
|
5840 |
+
|
5841 |
+
var edit_main_td1 = document.createElement('td');
|
5842 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
5843 |
+
var edit_main_td1_1 = document.createElement('td');
|
5844 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
5845 |
+
var edit_main_td2 = document.createElement('td');
|
5846 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
5847 |
+
var edit_main_td2_1 = document.createElement('td');
|
5848 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
5849 |
+
|
5850 |
+
var edit_main_td3 = document.createElement('td');
|
5851 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
5852 |
+
var edit_main_td3_1 = document.createElement('td');
|
5853 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
5854 |
+
var edit_main_td4 = document.createElement('td');
|
5855 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
5856 |
+
var edit_main_td4_1 = document.createElement('td');
|
5857 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
5858 |
+
|
5859 |
+
var edit_main_td5 = document.createElement('td');
|
5860 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
5861 |
+
var edit_main_td5_1 = document.createElement('td');
|
5862 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
5863 |
+
|
5864 |
+
var edit_main_td6 = document.createElement('td');
|
5865 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
5866 |
+
var edit_main_td6_1 = document.createElement('td');
|
5867 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
5868 |
+
|
5869 |
+
var edit_main_td7 = document.createElement('td');
|
5870 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
5871 |
+
var edit_main_td7_1 = document.createElement('td');
|
5872 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
5873 |
+
|
5874 |
+
var edit_main_td8 = document.createElement('td');
|
5875 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
5876 |
+
var edit_main_td8_1 = document.createElement('td');
|
5877 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
5878 |
+
|
5879 |
+
var el_label_label = document.createElement('label');
|
5880 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5881 |
+
el_label_label.innerHTML = "Field label";
|
5882 |
+
|
5883 |
+
var el_label_textarea = document.createElement('textarea');
|
5884 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
5885 |
+
el_label_textarea.setAttribute("rows", "4");
|
5886 |
+
el_label_textarea.style.cssText = "width:200px;";
|
5887 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
5888 |
+
el_label_textarea.innerHTML = w_field_label;
|
5889 |
+
|
5890 |
+
var el_label_position_label = document.createElement('label');
|
5891 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5892 |
+
el_label_position_label.innerHTML = "Field label position";
|
5893 |
+
|
5894 |
+
var el_label_position1 = document.createElement('input');
|
5895 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
5896 |
+
el_label_position1.setAttribute("type", "radio");
|
5897 |
+
el_label_position1.setAttribute("value", "left");
|
5898 |
+
|
5899 |
+
|
5900 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
5901 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
5902 |
+
Left = document.createTextNode("Left");
|
5903 |
+
|
5904 |
+
var el_label_position2 = document.createElement('input');
|
5905 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
5906 |
+
el_label_position2.setAttribute("type", "radio");
|
5907 |
+
el_label_position2.setAttribute("value", "top");
|
5908 |
+
|
5909 |
+
|
5910 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
5911 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
5912 |
+
Top = document.createTextNode("Top");
|
5913 |
+
|
5914 |
+
if(w_field_label_pos=="top")
|
5915 |
+
el_label_position2.setAttribute("checked", "checked");
|
5916 |
+
else
|
5917 |
+
el_label_position1.setAttribute("checked", "checked");
|
5918 |
+
|
5919 |
+
var el_size_label = document.createElement('label');
|
5920 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5921 |
+
el_size_label.innerHTML = "Field size(px) ";
|
5922 |
+
|
5923 |
+
var el_size_w = document.createElement('input');
|
5924 |
+
el_size_w.setAttribute("id", "edit_for_input_size");
|
5925 |
+
el_size_w.setAttribute("type", "text");
|
5926 |
+
el_size_w.setAttribute("value", w_size_w);
|
5927 |
+
el_size_w.style.cssText = "margin-right:2px; width: 60px";
|
5928 |
+
el_size_w.setAttribute("name", "edit_for_size");
|
5929 |
+
el_size_w.setAttribute("onKeyPress", "return check_isnum(event)");
|
5930 |
+
el_size_w.setAttribute("onKeyUp", "change_w_style('"+i+"_elementform_id_temp', this.value)");
|
5931 |
+
|
5932 |
+
X = document.createTextNode("x");
|
5933 |
+
|
5934 |
+
var el_size_h = document.createElement('input');
|
5935 |
+
el_size_h.setAttribute("id", "edit_for_input_size");
|
5936 |
+
el_size_h.setAttribute("type", "text");
|
5937 |
+
el_size_h.setAttribute("value", w_size_h);
|
5938 |
+
el_size_h.style.cssText = "margin-left:2px; width:60px";
|
5939 |
+
el_size_h.setAttribute("name", "edit_for_size");
|
5940 |
+
el_size_h.setAttribute("onKeyPress", "return check_isnum(event)");
|
5941 |
+
el_size_h.setAttribute("onKeyUp", "change_h_style('"+i+"_elementform_id_temp', this.value)");
|
5942 |
+
var el_first_value_label = document.createElement('label');
|
5943 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5944 |
+
el_first_value_label.innerHTML = "Value if empty";
|
5945 |
+
|
5946 |
+
var el_first_value_input = document.createElement('input');
|
5947 |
+
el_first_value_input.setAttribute("id", "el_first_value_input");
|
5948 |
+
el_first_value_input.setAttribute("type", "text");
|
5949 |
+
el_first_value_input.setAttribute("value", w_title);
|
5950 |
+
el_first_value_input.style.cssText = "width:200px;";
|
5951 |
+
el_first_value_input.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_elementform_id_temp')");
|
5952 |
+
var el_required_label = document.createElement('label');
|
5953 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5954 |
+
el_required_label.innerHTML = "Required";
|
5955 |
+
|
5956 |
+
var el_required = document.createElement('input');
|
5957 |
+
el_required.setAttribute("id", "el_send");
|
5958 |
+
el_required.setAttribute("type", "checkbox");
|
5959 |
+
el_required.setAttribute("value", "yes");
|
5960 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
5961 |
+
if(w_required=="yes")
|
5962 |
+
el_required.setAttribute("checked", "checked");
|
5963 |
+
|
5964 |
+
var el_unique_label = document.createElement('label');
|
5965 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5966 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
5967 |
+
|
5968 |
+
var el_unique = document.createElement('input');
|
5969 |
+
el_unique.setAttribute("id", "el_send");
|
5970 |
+
el_unique.setAttribute("type", "checkbox");
|
5971 |
+
el_unique.setAttribute("value", "yes");
|
5972 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
5973 |
+
if(w_unique=="yes")
|
5974 |
+
el_unique.setAttribute("checked", "checked");
|
5975 |
+
|
5976 |
+
var el_style_label = document.createElement('label');
|
5977 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5978 |
+
el_style_label.innerHTML = "Class name";
|
5979 |
+
|
5980 |
+
var el_style_textarea = document.createElement('input');
|
5981 |
+
el_style_textarea.setAttribute("id", "element_style");
|
5982 |
+
el_style_textarea.setAttribute("type", "text");
|
5983 |
+
el_style_textarea.setAttribute("value", w_class);
|
5984 |
+
el_style_textarea.style.cssText = "width:200px;";
|
5985 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
5986 |
+
|
5987 |
+
var el_attr_label = document.createElement('label');
|
5988 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
5989 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
5990 |
+
|
5991 |
+
var el_attr_add = document.createElement('img');
|
5992 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
5993 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
5994 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
5995 |
+
el_attr_add.setAttribute("title", 'add');
|
5996 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
5997 |
+
var el_attr_table = document.createElement('table');
|
5998 |
+
el_attr_table.setAttribute("id", 'attributes');
|
5999 |
+
el_attr_table.setAttribute("border", '0');
|
6000 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
6001 |
+
var el_attr_tr_label = document.createElement('tr');
|
6002 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
6003 |
+
var el_attr_td_name_label = document.createElement('th');
|
6004 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
6005 |
+
var el_attr_td_value_label = document.createElement('th');
|
6006 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
6007 |
+
var el_attr_td_X_label = document.createElement('th');
|
6008 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
6009 |
+
var el_attr_name_label = document.createElement('label');
|
6010 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
6011 |
+
el_attr_name_label.innerHTML = "Name";
|
6012 |
+
|
6013 |
+
var el_attr_value_label = document.createElement('label');
|
6014 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
6015 |
+
el_attr_value_label.innerHTML = "Value";
|
6016 |
+
|
6017 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
6018 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
6019 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
6020 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
6021 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
6022 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
6023 |
+
|
6024 |
+
n=w_attr_name.length;
|
6025 |
+
for(j=1; j<=n; j++)
|
6026 |
+
{
|
6027 |
+
var el_attr_tr = document.createElement('tr');
|
6028 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
6029 |
+
el_attr_tr.setAttribute("idi", j);
|
6030 |
+
var el_attr_td_name = document.createElement('td');
|
6031 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
6032 |
+
var el_attr_td_value = document.createElement('td');
|
6033 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
6034 |
+
|
6035 |
+
var el_attr_td_X = document.createElement('td');
|
6036 |
+
var el_attr_name = document.createElement('input');
|
6037 |
+
|
6038 |
+
el_attr_name.setAttribute("type", "text");
|
6039 |
+
|
6040 |
+
el_attr_name.style.cssText = "width:100px";
|
6041 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
6042 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
6043 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
6044 |
+
|
6045 |
+
var el_attr_value = document.createElement('input');
|
6046 |
+
|
6047 |
+
el_attr_value.setAttribute("type", "text");
|
6048 |
+
|
6049 |
+
el_attr_value.style.cssText = "width:100px";
|
6050 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
6051 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
6052 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
6053 |
+
|
6054 |
+
var el_attr_remove = document.createElement('img');
|
6055 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
6056 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
6057 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
6058 |
+
el_attr_remove.setAttribute("align", 'top');
|
6059 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
6060 |
+
el_attr_table.appendChild(el_attr_tr);
|
6061 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
6062 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
6063 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
6064 |
+
el_attr_td_name.appendChild(el_attr_name);
|
6065 |
+
el_attr_td_value.appendChild(el_attr_value);
|
6066 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
6067 |
+
|
6068 |
+
}
|
6069 |
+
|
6070 |
+
var t = document.getElementById('edit_table');
|
6071 |
+
|
6072 |
+
var br = document.createElement('br');
|
6073 |
+
var br1 = document.createElement('br');
|
6074 |
+
var br2 = document.createElement('br');
|
6075 |
+
var br3 = document.createElement('br');
|
6076 |
+
var br4 = document.createElement('br');
|
6077 |
+
var br5 = document.createElement('br');
|
6078 |
+
var br6 = document.createElement('br');
|
6079 |
+
|
6080 |
+
edit_main_td1.appendChild(el_label_label);
|
6081 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
6082 |
+
|
6083 |
+
edit_main_td2.appendChild(el_label_position_label);
|
6084 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
6085 |
+
edit_main_td2_1.appendChild(Left);
|
6086 |
+
edit_main_td2_1.appendChild(br2);
|
6087 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
6088 |
+
edit_main_td2_1.appendChild(Top);
|
6089 |
+
|
6090 |
+
edit_main_td3.appendChild(el_size_label);
|
6091 |
+
|
6092 |
+
edit_main_td3_1.appendChild(el_size_w);
|
6093 |
+
edit_main_td3_1.appendChild(X);
|
6094 |
+
edit_main_td3_1.appendChild(el_size_h);
|
6095 |
+
|
6096 |
+
edit_main_td4.appendChild(el_first_value_label);
|
6097 |
+
edit_main_td4_1.appendChild(el_first_value_input);
|
6098 |
+
|
6099 |
+
edit_main_td5.appendChild(el_style_label);
|
6100 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
6101 |
+
|
6102 |
+
edit_main_td6.appendChild(el_required_label);
|
6103 |
+
edit_main_td6_1.appendChild(el_required);
|
6104 |
+
|
6105 |
+
edit_main_td8.appendChild(el_unique_label);
|
6106 |
+
edit_main_td8_1.appendChild(el_unique);
|
6107 |
+
|
6108 |
+
edit_main_td7.appendChild(el_attr_label);
|
6109 |
+
edit_main_td7.appendChild(el_attr_add);
|
6110 |
+
edit_main_td7.appendChild(br6);
|
6111 |
+
edit_main_td7.appendChild(el_attr_table);
|
6112 |
+
edit_main_td7.setAttribute("colspan", "2");
|
6113 |
+
|
6114 |
+
|
6115 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
6116 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
6117 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
6118 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
6119 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
6120 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
6121 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
6122 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
6123 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
6124 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
6125 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
6126 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
6127 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
6128 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
6129 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
6130 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
6131 |
+
edit_main_table.appendChild(edit_main_tr1);
|
6132 |
+
edit_main_table.appendChild(edit_main_tr2);
|
6133 |
+
edit_main_table.appendChild(edit_main_tr3);
|
6134 |
+
edit_main_table.appendChild(edit_main_tr4);
|
6135 |
+
edit_main_table.appendChild(edit_main_tr5);
|
6136 |
+
edit_main_table.appendChild(edit_main_tr6);
|
6137 |
+
edit_main_table.appendChild(edit_main_tr8);
|
6138 |
+
edit_main_table.appendChild(edit_main_tr7);
|
6139 |
+
edit_div.appendChild(edit_main_table);
|
6140 |
+
|
6141 |
+
t.appendChild(edit_div);
|
6142 |
+
add_id_and_name(i, 'type_text');
|
6143 |
|
6144 |
+
//show table
|
|
|
6145 |
|
6146 |
+
element='textarea';
|
6147 |
+
var adding_type = document.createElement("input");
|
6148 |
+
adding_type.setAttribute("type", "hidden");
|
6149 |
+
adding_type.setAttribute("value", "type_textarea");
|
6150 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
6151 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
6152 |
+
var adding_required= document.createElement("input");
|
6153 |
+
adding_required.setAttribute("type", "hidden");
|
6154 |
+
adding_required.setAttribute("value", w_required);
|
6155 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
6156 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
6157 |
+
|
6158 |
+
var adding_unique= document.createElement("input");
|
6159 |
+
adding_unique.setAttribute("type", "hidden");
|
6160 |
+
adding_unique.setAttribute("value", w_unique);
|
6161 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
6162 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
6163 |
+
|
6164 |
+
var div = document.createElement('div');
|
6165 |
+
div.setAttribute("id", "main_div");
|
6166 |
+
|
6167 |
+
var table = document.createElement('table');
|
6168 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
6169 |
+
|
6170 |
+
var tr = document.createElement('tr');
|
6171 |
+
|
6172 |
+
var td1 = document.createElement('td');
|
6173 |
+
td1.setAttribute("valign", 'top');
|
6174 |
+
td1.setAttribute("align", 'left');
|
6175 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
6176 |
+
|
6177 |
+
var td2 = document.createElement('td');
|
6178 |
+
td2.setAttribute("valign", 'top');
|
6179 |
+
td2.setAttribute("align", 'left');
|
6180 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
6181 |
+
|
6182 |
+
var br1 = document.createElement('br');
|
6183 |
+
var br2 = document.createElement('br');
|
6184 |
+
var br3 = document.createElement('br');
|
6185 |
+
var br4 = document.createElement('br');
|
6186 |
+
|
6187 |
+
var label = document.createElement('span');
|
6188 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
6189 |
+
label.innerHTML = w_field_label;
|
6190 |
+
label.setAttribute("class", "label");
|
6191 |
+
|
6192 |
+
var required = document.createElement('span');
|
6193 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
6194 |
+
required.innerHTML = "";
|
6195 |
+
required.setAttribute("class", "required");
|
6196 |
+
if(w_required=="yes")
|
6197 |
+
required.innerHTML = " *";
|
6198 |
+
var adding = document.createElement(element);
|
6199 |
+
if(w_title==w_first_val)
|
6200 |
+
{
|
6201 |
+
adding.style.cssText = "width:"+w_size_w+"px; height:"+w_size_h+"px;";
|
6202 |
+
adding.setAttribute("class", "input_deactive");
|
6203 |
+
}
|
6204 |
+
else
|
6205 |
+
{
|
6206 |
+
adding.style.cssText = "width:"+w_size_w+"px; height:"+w_size_h+"px;";
|
6207 |
+
adding.setAttribute("class", "input_active");
|
6208 |
+
}
|
6209 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
6210 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
6211 |
+
adding.setAttribute("title", w_title);
|
6212 |
+
adding.setAttribute("value",w_first_val);
|
6213 |
+
adding.setAttribute("onFocus", "delete_value('"+i+"_elementform_id_temp')");
|
6214 |
+
adding.setAttribute("onBlur", "return_value('"+i+"_elementform_id_temp')");
|
6215 |
+
adding.setAttribute("onChange", "change_value('"+i+"_elementform_id_temp')");
|
6216 |
+
adding.innerHTML=w_first_val;
|
6217 |
+
|
6218 |
+
|
6219 |
+
var main_td = document.getElementById('show_table');
|
6220 |
+
|
6221 |
+
|
6222 |
+
td1.appendChild(label);
|
6223 |
+
td1.appendChild(required);
|
6224 |
+
td2.appendChild(adding_type);
|
6225 |
+
|
6226 |
+
td2.appendChild(adding_required);
|
6227 |
+
td2.appendChild(adding_unique);
|
6228 |
+
td2.appendChild(adding);
|
6229 |
+
tr.appendChild(td1);
|
6230 |
+
tr.appendChild(td2);
|
6231 |
+
table.appendChild(tr);
|
6232 |
+
|
6233 |
+
div.appendChild(table);
|
6234 |
+
div.appendChild(br3);
|
6235 |
+
main_td.appendChild(div);
|
6236 |
+
if(w_field_label_pos=="top")
|
6237 |
+
label_top(i);
|
6238 |
+
change_class(w_class, i);
|
6239 |
+
refresh_attr(i, 'type_text');
|
6240 |
+
}
|
6241 |
|
6242 |
+
function type_phone(i, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_mini_labels, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
6243 |
+
document.getElementById("element_type").value = "type_phone";
|
6244 |
+
delete_last_child();
|
6245 |
+
// edit table
|
6246 |
+
var edit_div = document.createElement('div');
|
6247 |
+
edit_div.setAttribute("id", "edit_div");
|
6248 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
6249 |
+
|
6250 |
+
var edit_main_table = document.createElement('table');
|
6251 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
6252 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
6253 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
6254 |
+
|
6255 |
+
var edit_main_tr1 = document.createElement('tr');
|
6256 |
+
edit_main_tr1.setAttribute("valing", "top");
|
6257 |
+
|
6258 |
+
var edit_main_tr2 = document.createElement('tr');
|
6259 |
+
edit_main_tr2.setAttribute("valing", "top");
|
6260 |
+
|
6261 |
+
var edit_main_tr3 = document.createElement('tr');
|
6262 |
+
edit_main_tr3.setAttribute("valing", "top");
|
6263 |
+
|
6264 |
+
var edit_main_tr4 = document.createElement('tr');
|
6265 |
+
edit_main_tr4.setAttribute("valing", "top");
|
6266 |
+
|
6267 |
+
var edit_main_tr5 = document.createElement('tr');
|
6268 |
+
edit_main_tr5.setAttribute("valing", "top");
|
6269 |
+
|
6270 |
+
var edit_main_tr6 = document.createElement('tr');
|
6271 |
+
edit_main_tr6.setAttribute("valing", "top");
|
6272 |
+
|
6273 |
+
var edit_main_tr7 = document.createElement('tr');
|
6274 |
+
edit_main_tr7.setAttribute("valing", "top");
|
6275 |
+
|
6276 |
+
var edit_main_tr8 = document.createElement('tr');
|
6277 |
+
edit_main_tr8.setAttribute("valing", "top");
|
6278 |
+
|
6279 |
+
var edit_main_td1 = document.createElement('td');
|
6280 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
6281 |
+
var edit_main_td1_1 = document.createElement('td');
|
6282 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
6283 |
+
var edit_main_td2 = document.createElement('td');
|
6284 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
6285 |
+
var edit_main_td2_1 = document.createElement('td');
|
6286 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
6287 |
+
|
6288 |
+
var edit_main_td3 = document.createElement('td');
|
6289 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
6290 |
+
var edit_main_td3_1 = document.createElement('td');
|
6291 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
6292 |
+
var edit_main_td4 = document.createElement('td');
|
6293 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
6294 |
+
var edit_main_td4_1 = document.createElement('td');
|
6295 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
6296 |
+
|
6297 |
+
var edit_main_td5 = document.createElement('td');
|
6298 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
6299 |
+
var edit_main_td5_1 = document.createElement('td');
|
6300 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
6301 |
+
|
6302 |
+
var edit_main_td6 = document.createElement('td');
|
6303 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
6304 |
+
var edit_main_td6_1 = document.createElement('td');
|
6305 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
6306 |
+
|
6307 |
+
var edit_main_td7 = document.createElement('td');
|
6308 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
6309 |
+
var edit_main_td7_1 = document.createElement('td');
|
6310 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
6311 |
+
|
6312 |
+
var edit_main_td8 = document.createElement('td');
|
6313 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
6314 |
+
var edit_main_td8_1 = document.createElement('td');
|
6315 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
6316 |
+
|
6317 |
+
var el_label_label = document.createElement('label');
|
6318 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6319 |
+
el_label_label.innerHTML = "Field label";
|
6320 |
+
|
6321 |
+
var el_label_textarea = document.createElement('textarea');
|
6322 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
6323 |
+
el_label_textarea.setAttribute("rows", "4");
|
6324 |
+
el_label_textarea.style.cssText = "width:200px;";
|
6325 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
6326 |
+
el_label_textarea.innerHTML = w_field_label;
|
6327 |
+
|
6328 |
+
var el_label_position_label = document.createElement('label');
|
6329 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6330 |
+
el_label_position_label.innerHTML = "Field label position";
|
6331 |
+
|
6332 |
+
var el_label_position1 = document.createElement('input');
|
6333 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
6334 |
+
el_label_position1.setAttribute("type", "radio");
|
6335 |
+
el_label_position1.setAttribute("value", "left");
|
6336 |
+
|
6337 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
6338 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
6339 |
+
Left = document.createTextNode("Left");
|
6340 |
+
|
6341 |
+
var el_label_position2 = document.createElement('input');
|
6342 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
6343 |
+
el_label_position2.setAttribute("type", "radio");
|
6344 |
+
el_label_position2.setAttribute("value", "top");
|
6345 |
+
|
6346 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
6347 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
6348 |
+
Top = document.createTextNode("Top");
|
6349 |
+
|
6350 |
+
if(w_field_label_pos=="top")
|
6351 |
+
el_label_position2.setAttribute("checked", "checked");
|
6352 |
+
else
|
6353 |
+
el_label_position1.setAttribute("checked", "checked");
|
6354 |
+
|
6355 |
+
var el_size_label = document.createElement('label');
|
6356 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6357 |
+
el_size_label.innerHTML = "Field size(px) ";
|
6358 |
+
var el_size = document.createElement('input');
|
6359 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
6360 |
+
el_size.setAttribute("type", "text");
|
6361 |
+
el_size.setAttribute("value", w_size);
|
6362 |
+
el_size.setAttribute("name", "edit_for_size");
|
6363 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
6364 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_element_lastform_id_temp', this.value);");
|
6365 |
+
|
6366 |
+
var gic = document.createTextNode("-");
|
6367 |
+
|
6368 |
+
var el_first_value_label = document.createElement('label');
|
6369 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6370 |
+
el_first_value_label.innerHTML = "Value if empty ";
|
6371 |
+
|
6372 |
+
var el_first_value_area = document.createElement('input');
|
6373 |
+
el_first_value_area.setAttribute("id", "el_first_value_area");
|
6374 |
+
el_first_value_area.setAttribute("type", "text");
|
6375 |
+
el_first_value_area.setAttribute("value", w_title[0]);
|
6376 |
+
el_first_value_area.style.cssText = "width:50px; margin-right:4px";
|
6377 |
+
el_first_value_area.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_firstform_id_temp')");
|
6378 |
+
|
6379 |
+
var el_first_value_phone = document.createElement('input');
|
6380 |
+
el_first_value_phone.setAttribute("id", "el_first_value_phone");
|
6381 |
+
el_first_value_phone.setAttribute("type", "text");
|
6382 |
+
el_first_value_phone.setAttribute("value", w_title[1]);
|
6383 |
+
el_first_value_phone.style.cssText = "width:100px; margin-left:4px";
|
6384 |
+
el_first_value_phone.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_lastform_id_temp')");
|
6385 |
+
|
6386 |
+
|
6387 |
+
var el_required_label = document.createElement('label');
|
6388 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6389 |
+
el_required_label.innerHTML = "Required";
|
6390 |
+
|
6391 |
+
var el_required = document.createElement('input');
|
6392 |
+
el_required.setAttribute("id", "el_send");
|
6393 |
+
el_required.setAttribute("type", "checkbox");
|
6394 |
+
el_required.setAttribute("value", "yes");
|
6395 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
6396 |
+
if(w_required=="yes")
|
6397 |
+
el_required.setAttribute("checked", "checked");
|
6398 |
+
|
6399 |
+
var el_unique_label = document.createElement('label');
|
6400 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6401 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
6402 |
+
|
6403 |
+
var el_unique = document.createElement('input');
|
6404 |
+
el_unique.setAttribute("id", "el_send");
|
6405 |
+
el_unique.setAttribute("type", "checkbox");
|
6406 |
+
el_unique.setAttribute("value", "yes");
|
6407 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
6408 |
+
if(w_unique=="yes")
|
6409 |
+
el_unique.setAttribute("checked", "checked");
|
6410 |
+
|
6411 |
+
var el_style_label = document.createElement('label');
|
6412 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6413 |
+
el_style_label.innerHTML = "Class name";
|
6414 |
+
|
6415 |
+
var el_style_textarea = document.createElement('input');
|
6416 |
+
el_style_textarea.setAttribute("id", "element_style");
|
6417 |
+
el_style_textarea.setAttribute("type", "text");
|
6418 |
+
el_style_textarea.setAttribute("value", w_class);
|
6419 |
+
el_style_textarea.style.cssText = "width:200px;";
|
6420 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
6421 |
+
|
6422 |
+
var el_attr_label = document.createElement('label');
|
6423 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6424 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
6425 |
+
|
6426 |
+
var el_attr_add = document.createElement('img');
|
6427 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
6428 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
6429 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
6430 |
+
el_attr_add.setAttribute("title", 'add');
|
6431 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_name')");
|
6432 |
+
|
6433 |
+
var el_attr_table = document.createElement('table');
|
6434 |
+
el_attr_table.setAttribute("id", 'attributes');
|
6435 |
+
el_attr_table.setAttribute("border", '0');
|
6436 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
6437 |
+
var el_attr_tr_label = document.createElement('tr');
|
6438 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
6439 |
+
var el_attr_td_name_label = document.createElement('th');
|
6440 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
6441 |
+
var el_attr_td_value_label = document.createElement('th');
|
6442 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
6443 |
+
var el_attr_td_X_label = document.createElement('th');
|
6444 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
6445 |
+
var el_attr_name_label = document.createElement('label');
|
6446 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
6447 |
+
el_attr_name_label.innerHTML = "Name";
|
6448 |
+
|
6449 |
+
var el_attr_value_label = document.createElement('label');
|
6450 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
6451 |
+
el_attr_value_label.innerHTML = "Value";
|
6452 |
+
|
6453 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
6454 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
6455 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
6456 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
6457 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
6458 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
6459 |
+
|
6460 |
+
n=w_attr_name.length;
|
6461 |
+
for(j=1; j<=n; j++)
|
6462 |
+
{
|
6463 |
+
var el_attr_tr = document.createElement('tr');
|
6464 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
6465 |
+
el_attr_tr.setAttribute("idi", j);
|
6466 |
+
var el_attr_td_name = document.createElement('td');
|
6467 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
6468 |
+
var el_attr_td_value = document.createElement('td');
|
6469 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
6470 |
+
|
6471 |
+
var el_attr_td_X = document.createElement('td');
|
6472 |
+
var el_attr_name = document.createElement('input');
|
6473 |
+
|
6474 |
+
el_attr_name.setAttribute("type", "text");
|
6475 |
+
|
6476 |
+
el_attr_name.style.cssText = "width:100px";
|
6477 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
6478 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
6479 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_name')");
|
6480 |
+
|
6481 |
+
var el_attr_value = document.createElement('input');
|
6482 |
+
|
6483 |
+
el_attr_value.setAttribute("type", "text");
|
6484 |
+
|
6485 |
+
el_attr_value.style.cssText = "width:100px";
|
6486 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
6487 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
6488 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_name')");
|
6489 |
+
|
6490 |
+
var el_attr_remove = document.createElement('img');
|
6491 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
6492 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
6493 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
6494 |
+
el_attr_remove.setAttribute("align", 'top');
|
6495 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_name')");
|
6496 |
+
el_attr_table.appendChild(el_attr_tr);
|
6497 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
6498 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
6499 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
6500 |
+
el_attr_td_name.appendChild(el_attr_name);
|
6501 |
+
el_attr_td_value.appendChild(el_attr_value);
|
6502 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
6503 |
+
|
6504 |
+
}
|
6505 |
+
|
6506 |
+
|
6507 |
+
var t = document.getElementById('edit_table');
|
6508 |
+
|
6509 |
+
var br = document.createElement('br');
|
6510 |
+
var br1 = document.createElement('br');
|
6511 |
+
var br2 = document.createElement('br');
|
6512 |
+
var br3 = document.createElement('br');
|
6513 |
+
var br4 = document.createElement('br');
|
6514 |
+
var br5 = document.createElement('br');
|
6515 |
+
var br6 = document.createElement('br');
|
6516 |
+
|
6517 |
+
edit_main_td1.appendChild(el_label_label);
|
6518 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
6519 |
+
|
6520 |
+
edit_main_td2.appendChild(el_label_position_label);
|
6521 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
6522 |
+
edit_main_td2_1.appendChild(Left);
|
6523 |
+
edit_main_td2_1.appendChild(br2);
|
6524 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
6525 |
+
edit_main_td2_1.appendChild(Top);
|
6526 |
+
|
6527 |
+
edit_main_td3.appendChild(el_first_value_label);
|
6528 |
+
edit_main_td3_1.appendChild(el_first_value_area);
|
6529 |
+
edit_main_td3_1.appendChild(gic);
|
6530 |
+
edit_main_td3_1.appendChild(el_first_value_phone);
|
6531 |
+
|
6532 |
+
edit_main_td7.appendChild(el_size_label);
|
6533 |
+
edit_main_td7_1.appendChild(el_size);
|
6534 |
|
6535 |
+
edit_main_td4.appendChild(el_style_label);
|
6536 |
+
edit_main_td4_1.appendChild(el_style_textarea);
|
6537 |
|
6538 |
+
edit_main_td5.appendChild(el_required_label);
|
6539 |
+
edit_main_td5_1.appendChild(el_required);
|
6540 |
+
|
6541 |
+
edit_main_td8.appendChild(el_unique_label);
|
6542 |
+
edit_main_td8_1.appendChild(el_unique);
|
6543 |
+
|
6544 |
+
edit_main_td6.appendChild(el_attr_label);
|
6545 |
+
edit_main_td6.appendChild(el_attr_add);
|
6546 |
+
edit_main_td6.appendChild(br3);
|
6547 |
+
edit_main_td6.appendChild(el_attr_table);
|
6548 |
+
edit_main_td6.setAttribute("colspan", "2");
|
6549 |
+
|
6550 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
6551 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
6552 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
6553 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
6554 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
6555 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
6556 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
6557 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
6558 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
6559 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
6560 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
6561 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
6562 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
6563 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
6564 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
6565 |
+
edit_main_table.appendChild(edit_main_tr1);
|
6566 |
+
edit_main_table.appendChild(edit_main_tr2);
|
6567 |
+
edit_main_table.appendChild(edit_main_tr3);
|
6568 |
+
edit_main_table.appendChild(edit_main_tr7);
|
6569 |
+
edit_main_table.appendChild(edit_main_tr4);
|
6570 |
+
edit_main_table.appendChild(edit_main_tr5);
|
6571 |
+
edit_main_table.appendChild(edit_main_tr8);
|
6572 |
+
edit_main_table.appendChild(edit_main_tr6);
|
6573 |
+
edit_div.appendChild(edit_main_table);
|
6574 |
+
|
6575 |
+
t.appendChild(edit_div);
|
6576 |
+
add_id_and_name(i, 'type_name');
|
6577 |
|
6578 |
+
//show table
|
|
|
|
|
|
|
6579 |
|
6580 |
+
var adding_type = document.createElement("input");
|
6581 |
+
adding_type.setAttribute("type", "hidden");
|
6582 |
+
adding_type.setAttribute("value", "type_phone");
|
6583 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
6584 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
6585 |
+
var adding_required= document.createElement("input");
|
6586 |
+
adding_required.setAttribute("type", "hidden");
|
6587 |
+
adding_required.setAttribute("value", w_required);
|
6588 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
6589 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
6590 |
+
|
6591 |
+
var adding_unique= document.createElement("input");
|
6592 |
+
adding_unique.setAttribute("type", "hidden");
|
6593 |
+
adding_unique.setAttribute("value", w_unique);
|
6594 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
6595 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
6596 |
+
|
6597 |
+
var div = document.createElement('div');
|
6598 |
+
div.setAttribute("id", "main_div");
|
6599 |
+
|
6600 |
+
var table = document.createElement('table');
|
6601 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
6602 |
+
var div_for_editable_labels = document.createElement('div');
|
6603 |
+
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
6604 |
+
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
6605 |
+
div_for_editable_labels.appendChild(edit_labels);
|
6606 |
+
|
6607 |
+
var tr = document.createElement('tr');
|
6608 |
+
var td1 = document.createElement('td');
|
6609 |
+
td1.setAttribute("valign", 'top');
|
6610 |
+
td1.setAttribute("align", 'left');
|
6611 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
6612 |
+
|
6613 |
+
var td2 = document.createElement('td');
|
6614 |
+
td2.setAttribute("valign", 'top');
|
6615 |
+
td2.setAttribute("align", 'left');
|
6616 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
6617 |
+
|
6618 |
+
var table_name = document.createElement('table');
|
6619 |
+
table_name.setAttribute("id", i+"_table_name");
|
6620 |
+
table_name.setAttribute("cellpadding", '0');
|
6621 |
+
table_name.setAttribute("cellspacing", '0');
|
6622 |
+
|
6623 |
+
var tr_name1 = document.createElement('tr');
|
6624 |
+
tr_name1.setAttribute("id", i+"_tr_name1");
|
6625 |
+
|
6626 |
+
var tr_name2 = document.createElement('tr');
|
6627 |
+
tr_name2.setAttribute("id", i+"_tr_name2");
|
6628 |
+
|
6629 |
+
var td_name_input1 = document.createElement('td');
|
6630 |
+
td_name_input1.setAttribute("id", i+"_td_name_input_first");
|
6631 |
+
|
6632 |
+
var td_name_input2 = document.createElement('td');
|
6633 |
+
td_name_input2.setAttribute("id", i+"_td_name_input_last");
|
6634 |
+
|
6635 |
+
var td_name_label1 = document.createElement('td');
|
6636 |
+
td_name_label1.setAttribute("id", i+"_td_name_label_first");
|
6637 |
+
td_name_label1.setAttribute("align", "left");
|
6638 |
+
|
6639 |
+
var td_name_label2 = document.createElement('td');
|
6640 |
+
td_name_label2.setAttribute("id", i+"_td_name_label_last");
|
6641 |
+
td_name_label2.setAttribute("align", "left");
|
6642 |
+
|
6643 |
+
var br1 = document.createElement('br');
|
6644 |
+
var br2 = document.createElement('br');
|
6645 |
+
var br3 = document.createElement('br');
|
6646 |
+
var br4 = document.createElement('br');
|
6647 |
+
|
6648 |
+
|
6649 |
+
var label = document.createElement('span');
|
6650 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
6651 |
+
label.innerHTML = w_field_label;
|
6652 |
+
label.setAttribute("class", "label");
|
6653 |
+
|
6654 |
+
var required = document.createElement('span');
|
6655 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
6656 |
+
required.innerHTML = "";
|
6657 |
+
required.setAttribute("class", "required");
|
6658 |
+
if(w_required=="yes")
|
6659 |
+
required.innerHTML = " *";
|
6660 |
+
|
6661 |
+
var first = document.createElement('input');
|
6662 |
+
first.setAttribute("type", 'text');
|
6663 |
+
|
6664 |
+
if(w_title[0]==w_first_val[0])
|
6665 |
+
first.setAttribute("class", "input_deactive");
|
6666 |
+
else
|
6667 |
+
first.setAttribute("class", "input_active");
|
6668 |
+
|
6669 |
+
first.style.cssText = "width:50px";
|
6670 |
+
first.setAttribute("id", i+"_element_firstform_id_temp");
|
6671 |
+
first.setAttribute("name", i+"_element_firstform_id_temp");
|
6672 |
+
first.setAttribute("value", w_first_val[0]);
|
6673 |
+
first.setAttribute("title", w_title[0]);
|
6674 |
+
first.setAttribute("onFocus", 'delete_value("'+i+'_element_firstform_id_temp")');
|
6675 |
+
first.setAttribute("onBlur", 'return_value("'+i+'_element_firstform_id_temp")');
|
6676 |
+
first.setAttribute("onChange", "change_value('"+i+"_element_firstform_id_temp')");
|
6677 |
+
first.setAttribute("onKeyPress", "return check_isnum(event)");
|
6678 |
+
|
6679 |
+
var gic = document.createElement('span');
|
6680 |
+
gic.setAttribute("class", "wdform_line");
|
6681 |
+
gic.style.cssText = "margin: 0px 4px 0px 4px; padding: 0px;";
|
6682 |
+
gic.innerHTML = "-";
|
6683 |
+
|
6684 |
+
var first_label = document.createElement('label');
|
6685 |
+
first_label.setAttribute("class", "mini_label");
|
6686 |
+
first_label.setAttribute("id", i+"_mini_label_area_code");
|
6687 |
+
first_label.innerHTML= w_mini_labels[0];
|
6688 |
+
|
6689 |
+
var last = document.createElement('input');
|
6690 |
+
last.setAttribute("type", 'text');
|
6691 |
+
|
6692 |
+
if(w_title[1]==w_first_val[1])
|
6693 |
+
last.setAttribute("class", "input_deactive");
|
6694 |
+
else
|
6695 |
+
last.setAttribute("class", "input_active");
|
6696 |
+
|
6697 |
+
last.style.cssText = "width:"+w_size+"px";
|
6698 |
+
last.setAttribute("id", i+"_element_lastform_id_temp");
|
6699 |
+
last.setAttribute("name", i+"_element_lastform_id_temp");
|
6700 |
+
last.setAttribute("value", w_first_val[1]);
|
6701 |
+
last.setAttribute("title", w_title[1]);
|
6702 |
+
last.setAttribute("onFocus", 'delete_value("'+i+'_element_lastform_id_temp")');
|
6703 |
+
last.setAttribute("onBlur", 'return_value("'+i+'_element_lastform_id_temp")');
|
6704 |
+
last.setAttribute("onChange", "change_value('"+i+"_element_lastform_id_temp')");
|
6705 |
+
last.setAttribute("onKeyPress", "return check_isnum(event)");
|
6706 |
+
|
6707 |
+
var last_label = document.createElement('label');
|
6708 |
+
last_label.setAttribute("class", "mini_label");
|
6709 |
+
last_label.setAttribute("id", i+"_mini_label_phone_number");
|
6710 |
+
last_label.innerHTML=w_mini_labels[1];
|
6711 |
+
|
6712 |
+
var main_td = document.getElementById('show_table');
|
6713 |
+
|
6714 |
+
td1.appendChild(label);
|
6715 |
+
td1.appendChild(required );
|
6716 |
+
|
6717 |
+
td_name_input1.appendChild(first);
|
6718 |
+
td_name_input1.appendChild(gic);
|
6719 |
+
td_name_input2.appendChild(last);
|
6720 |
+
tr_name1.appendChild(td_name_input1);
|
6721 |
+
tr_name1.appendChild(td_name_input2);
|
6722 |
+
|
6723 |
+
td_name_label1.appendChild(first_label);
|
6724 |
+
td_name_label2.appendChild(last_label);
|
6725 |
+
tr_name2.appendChild(td_name_label1);
|
6726 |
+
tr_name2.appendChild(td_name_label2);
|
6727 |
+
table_name.appendChild(tr_name1);
|
6728 |
+
table_name.appendChild(tr_name2);
|
6729 |
+
|
6730 |
+
td2.appendChild(adding_type);
|
6731 |
+
td2.appendChild(adding_required);
|
6732 |
+
td2.appendChild(adding_unique);
|
6733 |
+
td2.appendChild(table_name);
|
6734 |
+
tr.appendChild(td1);
|
6735 |
+
tr.appendChild(td2);
|
6736 |
+
table.appendChild(tr);
|
6737 |
+
|
6738 |
+
div.appendChild(table);
|
6739 |
+
div.appendChild(br3);
|
6740 |
+
div.appendChild(div_for_editable_labels);
|
6741 |
+
main_td.appendChild(div);
|
6742 |
+
|
6743 |
+
if (w_field_label_pos == "top") {
|
6744 |
+
label_top(i);
|
6745 |
}
|
6746 |
+
change_class(w_class, i);
|
6747 |
+
refresh_attr(i, 'type_name');
|
6748 |
+
jQuery(document).ready(function() {
|
6749 |
+
jQuery("label#"+i+"_mini_label_area_code").click(function() {
|
6750 |
+
if (jQuery(this).children('input').length == 0) {
|
6751 |
+
var area_code = "<input type='text' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
6752 |
+
jQuery(this).html(area_code);
|
6753 |
+
jQuery("input.area_code").focus();
|
6754 |
+
jQuery("input.area_code").blur(function() {
|
6755 |
+
var value = jQuery(this).val();
|
6756 |
+
jQuery("#"+i+"_mini_label_area_code").text(value);
|
6757 |
+
});
|
6758 |
+
}
|
6759 |
+
});
|
6760 |
+
jQuery("label#"+i+"_mini_label_phone_number").click(function() {
|
6761 |
+
if (jQuery(this).children('input').length == 0) {
|
6762 |
+
var phone_number = "<input type='text' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
6763 |
+
jQuery(this).html(phone_number);
|
6764 |
+
jQuery("input.phone_number").focus();
|
6765 |
+
jQuery("input.phone_number").blur(function() {
|
6766 |
+
var value = jQuery(this).val();
|
6767 |
+
jQuery("#"+i+"_mini_label_phone_number").text(value);
|
6768 |
+
});
|
6769 |
+
}
|
6770 |
+
});
|
6771 |
+
});
|
6772 |
+
}
|
6773 |
|
6774 |
+
function change_input_range(type, id)
|
6775 |
+
{
|
6776 |
+
var s='';
|
6777 |
+
if(document.getElementById('el_range_'+type+'1').value=='')
|
6778 |
+
s='0';
|
6779 |
+
else
|
6780 |
+
s=document.getElementById('el_range_'+type+'1').value;
|
6781 |
|
6782 |
+
if(document.getElementById('el_range_'+type+'2').value!='')
|
6783 |
+
s=s+'.'+document.getElementById('el_range_'+type+'2').value;
|
6784 |
|
6785 |
+
document.getElementById(id+'_range_'+type+'form_id_temp').value=s;
|
6786 |
}
|
6787 |
+
function explode( delimiter, string ) {
|
6788 |
+
var emptyArray = { 0: '' };
|
6789 |
+
|
6790 |
+
if ( arguments.length != 2
|
6791 |
+
|| typeof arguments[0] == 'undefined'
|
6792 |
+
|| typeof arguments[1] == 'undefined' )
|
6793 |
+
{
|
6794 |
+
return null;
|
6795 |
+
}
|
6796 |
+
|
6797 |
+
if ( delimiter === ''
|
6798 |
+
|| delimiter === false
|
6799 |
+
|| delimiter === null )
|
6800 |
+
{
|
6801 |
+
return false;
|
6802 |
+
}
|
6803 |
+
|
6804 |
+
if ( typeof delimiter == 'function'
|
6805 |
+
|| typeof delimiter == 'object'
|
6806 |
+
|| typeof string == 'function'
|
6807 |
+
|| typeof string == 'object' )
|
6808 |
+
{
|
6809 |
+
return emptyArray;
|
6810 |
+
}
|
6811 |
+
|
6812 |
+
if ( delimiter === true ) {
|
6813 |
+
delimiter = '1';
|
6814 |
+
}
|
6815 |
+
|
6816 |
+
return string.toString().split ( delimiter.toString() );
|
6817 |
}
|
6818 |
|
6819 |
+
function type_name(i, w_field_label, w_field_label_pos, w_first_val, w_title, w_mini_labels, w_size, w_name_format, w_required, w_unique, w_class, w_attr_name, w_attr_value) {
|
6820 |
+
document.getElementById("element_type").value="type_name";
|
|
|
|
|
|
|
|
|
6821 |
|
6822 |
+
delete_last_child();
|
6823 |
+
// edit table
|
6824 |
+
var edit_div = document.createElement('div');
|
6825 |
+
edit_div.setAttribute("id", "edit_div");
|
6826 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
6827 |
+
|
6828 |
+
var edit_main_table = document.createElement('table');
|
6829 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
6830 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
6831 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
6832 |
+
|
6833 |
+
var edit_main_tr1 = document.createElement('tr');
|
6834 |
+
edit_main_tr1.setAttribute("valing", "top");
|
6835 |
+
|
6836 |
+
var edit_main_tr2 = document.createElement('tr');
|
6837 |
+
edit_main_tr2.setAttribute("valing", "top");
|
6838 |
+
|
6839 |
+
var edit_main_tr3 = document.createElement('tr');
|
6840 |
+
edit_main_tr3.setAttribute("valing", "top");
|
6841 |
+
|
6842 |
+
var edit_main_tr4 = document.createElement('tr');
|
6843 |
+
edit_main_tr4.setAttribute("valing", "top");
|
6844 |
+
|
6845 |
+
var edit_main_tr5 = document.createElement('tr');
|
6846 |
+
edit_main_tr5.setAttribute("valing", "top");
|
6847 |
+
|
6848 |
+
var edit_main_tr6 = document.createElement('tr');
|
6849 |
+
edit_main_tr6.setAttribute("valing", "top");
|
6850 |
+
|
6851 |
+
var edit_main_tr7 = document.createElement('tr');
|
6852 |
+
edit_main_tr7.setAttribute("valing", "top");
|
6853 |
+
|
6854 |
+
var edit_main_tr8 = document.createElement('tr');
|
6855 |
+
edit_main_tr8.setAttribute("valing", "top");
|
6856 |
+
|
6857 |
+
var edit_main_tr9 = document.createElement('tr');
|
6858 |
+
edit_main_tr9.setAttribute("valing", "top");
|
6859 |
+
|
6860 |
+
var edit_main_td1 = document.createElement('td');
|
6861 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
6862 |
+
var edit_main_td1_1 = document.createElement('td');
|
6863 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
6864 |
+
var edit_main_td2 = document.createElement('td');
|
6865 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
6866 |
+
var edit_main_td2_1 = document.createElement('td');
|
6867 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
6868 |
+
|
6869 |
+
var edit_main_td3 = document.createElement('td');
|
6870 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
6871 |
+
var edit_main_td3_1 = document.createElement('td');
|
6872 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
6873 |
+
var edit_main_td4 = document.createElement('td');
|
6874 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
6875 |
+
var edit_main_td4_1 = document.createElement('td');
|
6876 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
6877 |
+
|
6878 |
+
var edit_main_td5 = document.createElement('td');
|
6879 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
6880 |
+
var edit_main_td5_1 = document.createElement('td');
|
6881 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
6882 |
+
|
6883 |
+
var edit_main_td6 = document.createElement('td');
|
6884 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
6885 |
+
var edit_main_td6_1 = document.createElement('td');
|
6886 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
6887 |
+
|
6888 |
+
var edit_main_td7 = document.createElement('td');
|
6889 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
6890 |
+
var edit_main_td7_1 = document.createElement('td');
|
6891 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
6892 |
+
|
6893 |
+
var edit_main_td8 = document.createElement('td');
|
6894 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
6895 |
+
var edit_main_td8_1 = document.createElement('td');
|
6896 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
6897 |
+
|
6898 |
+
var edit_main_td9 = document.createElement('td');
|
6899 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
6900 |
+
var edit_main_td9_1 = document.createElement('td');
|
6901 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
6902 |
+
|
6903 |
+
var el_label_label = document.createElement('label');
|
6904 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6905 |
+
el_label_label.innerHTML = "Field label";
|
6906 |
+
|
6907 |
+
var el_label_textarea = document.createElement('textarea');
|
6908 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
6909 |
+
el_label_textarea.setAttribute("rows", "4");
|
6910 |
+
el_label_textarea.style.cssText = "width:200px;";
|
6911 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
6912 |
+
el_label_textarea.innerHTML = w_field_label;
|
6913 |
+
|
6914 |
+
var el_label_position_label = document.createElement('label');
|
6915 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6916 |
+
el_label_position_label.innerHTML = "Field label position";
|
6917 |
+
|
6918 |
+
var el_label_position1 = document.createElement('input');
|
6919 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
6920 |
+
el_label_position1.setAttribute("type", "radio");
|
6921 |
+
el_label_position1.setAttribute("value", "left");
|
6922 |
+
|
6923 |
+
|
6924 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
6925 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
6926 |
+
Left = document.createTextNode("Left");
|
6927 |
+
|
6928 |
+
var el_label_position2 = document.createElement('input');
|
6929 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
6930 |
+
el_label_position2.setAttribute("type", "radio");
|
6931 |
+
el_label_position2.setAttribute("value", "top");
|
6932 |
+
|
6933 |
+
|
6934 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
6935 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
6936 |
+
Top = document.createTextNode("Top");
|
6937 |
+
|
6938 |
+
if(w_field_label_pos=="top")
|
6939 |
+
|
6940 |
+
el_label_position2.setAttribute("checked", "checked");
|
6941 |
+
else
|
6942 |
+
|
6943 |
+
el_label_position1.setAttribute("checked", "checked");
|
6944 |
+
|
6945 |
+
var gic = document.createTextNode("-");
|
6946 |
+
|
6947 |
+
var el_first_value_label = document.createElement('label');
|
6948 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6949 |
+
el_first_value_label.innerHTML = "Value if empty ";
|
6950 |
+
|
6951 |
+
var el_first_value_first = document.createElement('input');
|
6952 |
+
el_first_value_first.setAttribute("id", "el_first_value_first");
|
6953 |
+
el_first_value_first.setAttribute("type", "text");
|
6954 |
+
el_first_value_first.setAttribute("value", w_title[0]);
|
6955 |
+
el_first_value_first.style.cssText = "width:80px; margin-left:4px; margin-right:4px";
|
6956 |
+
el_first_value_first.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_firstform_id_temp')");
|
6957 |
+
|
6958 |
+
var el_first_value_last = document.createElement('input');
|
6959 |
+
el_first_value_last.setAttribute("id", "el_first_value_last");
|
6960 |
+
el_first_value_last.setAttribute("type", "text");
|
6961 |
+
el_first_value_last.setAttribute("value", w_title[1]);
|
6962 |
+
el_first_value_last.style.cssText = "width:80px; margin-left:4px; margin-right:4px";
|
6963 |
+
el_first_value_last.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_element_lastform_id_temp')");
|
6964 |
+
|
6965 |
+
var el_size_label = document.createElement('label');
|
6966 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6967 |
+
el_size_label.innerHTML = "Field size(px) ";
|
6968 |
+
var el_size = document.createElement('input');
|
6969 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
6970 |
+
el_size.setAttribute("type", "text");
|
6971 |
+
el_size.setAttribute("value", w_size);
|
6972 |
+
|
6973 |
+
el_size.setAttribute("name", "edit_for_size");
|
6974 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
6975 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_element_firstform_id_temp', this.value); change_w_style('"+i+"_element_lastform_id_temp', this.value); change_w_style('"+i+"_element_middleform_id_temp', this.value)");
|
6976 |
+
|
6977 |
+
|
6978 |
+
var el_format_label = document.createElement('label');
|
6979 |
+
el_format_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
6980 |
+
el_format_label.innerHTML = "Name Format";
|
6981 |
+
|
6982 |
+
var el_format_normal = document.createElement('input');
|
6983 |
+
el_format_normal.setAttribute("id", "el_format_normal");
|
6984 |
+
el_format_normal.setAttribute("type", "radio");
|
6985 |
+
el_format_normal.setAttribute("value", "normal");
|
6986 |
+
el_format_normal.setAttribute("name", "edit_for_name_format");
|
6987 |
+
el_format_normal.setAttribute("onchange", "format_normal("+i+")");
|
6988 |
+
el_format_normal.setAttribute("checked", "checked");
|
6989 |
+
Normal = document.createTextNode("Normal");
|
6990 |
+
|
6991 |
+
var el_format_extended = document.createElement('input');
|
6992 |
+
el_format_extended.setAttribute("id", "el_format_extended");
|
6993 |
+
el_format_extended.setAttribute("type", "radio");
|
6994 |
+
el_format_extended.setAttribute("value", "extended");
|
6995 |
+
el_format_extended.setAttribute("name", "edit_for_name_format");
|
6996 |
+
el_format_extended.setAttribute("onchange", "format_extended("+i+")");
|
6997 |
+
Extended = document.createTextNode("Extended");
|
6998 |
+
|
6999 |
+
if(w_name_format=="normal")
|
7000 |
+
|
7001 |
+
el_format_normal.setAttribute("checked", "checked");
|
7002 |
+
else
|
7003 |
+
el_format_extended.setAttribute("checked", "checked");
|
7004 |
+
|
7005 |
+
var el_required_label = document.createElement('label');
|
7006 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7007 |
+
el_required_label.innerHTML = "Required";
|
7008 |
+
|
7009 |
+
var el_required = document.createElement('input');
|
7010 |
+
el_required.setAttribute("id", "el_send");
|
7011 |
+
el_required.setAttribute("type", "checkbox");
|
7012 |
+
el_required.setAttribute("value", "yes");
|
7013 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
7014 |
+
if(w_required=="yes")
|
7015 |
+
el_required.setAttribute("checked", "checked");
|
7016 |
+
|
7017 |
+
var el_unique_label = document.createElement('label');
|
7018 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7019 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
7020 |
+
|
7021 |
+
var el_unique = document.createElement('input');
|
7022 |
+
el_unique.setAttribute("id", "el_send");
|
7023 |
+
el_unique.setAttribute("type", "checkbox");
|
7024 |
+
el_unique.setAttribute("value", "yes");
|
7025 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
7026 |
+
if(w_unique=="yes")
|
7027 |
+
el_unique.setAttribute("checked", "checked");
|
7028 |
+
|
7029 |
+
var el_style_label = document.createElement('label');
|
7030 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7031 |
+
el_style_label.innerHTML = "Class name";
|
7032 |
+
|
7033 |
+
var el_style_textarea = document.createElement('input');
|
7034 |
+
el_style_textarea.setAttribute("id", "element_style");
|
7035 |
+
el_style_textarea.setAttribute("type", "text");
|
7036 |
+
el_style_textarea.setAttribute("value", w_class);
|
7037 |
+
el_style_textarea.style.cssText = "width:200px;";
|
7038 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
7039 |
+
|
7040 |
+
var el_attr_label = document.createElement('label');
|
7041 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7042 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
7043 |
+
var el_attr_add = document.createElement('img');
|
7044 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
7045 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
7046 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
7047 |
+
el_attr_add.setAttribute("title", 'add');
|
7048 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_name')");
|
7049 |
+
var el_attr_table = document.createElement('table');
|
7050 |
+
el_attr_table.setAttribute("id", 'attributes');
|
7051 |
+
el_attr_table.setAttribute("border", '0');
|
7052 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
7053 |
+
var el_attr_tr_label = document.createElement('tr');
|
7054 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
7055 |
+
var el_attr_td_name_label = document.createElement('th');
|
7056 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
7057 |
+
var el_attr_td_value_label = document.createElement('th');
|
7058 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
7059 |
+
var el_attr_td_X_label = document.createElement('th');
|
7060 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
7061 |
+
var el_attr_name_label = document.createElement('label');
|
7062 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
7063 |
+
el_attr_name_label.innerHTML = "Name";
|
7064 |
+
|
7065 |
+
var el_attr_value_label = document.createElement('label');
|
7066 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
7067 |
+
el_attr_value_label.innerHTML = "Value";
|
7068 |
+
|
7069 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
7070 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
7071 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
7072 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
7073 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
7074 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
7075 |
+
|
7076 |
+
n=w_attr_name.length;
|
7077 |
+
for(j=1; j<=n; j++)
|
7078 |
+
{
|
7079 |
+
var el_attr_tr = document.createElement('tr');
|
7080 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
7081 |
+
el_attr_tr.setAttribute("idi", j);
|
7082 |
+
var el_attr_td_name = document.createElement('td');
|
7083 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
7084 |
+
var el_attr_td_value = document.createElement('td');
|
7085 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
7086 |
+
|
7087 |
+
var el_attr_td_X = document.createElement('td');
|
7088 |
+
var el_attr_name = document.createElement('input');
|
7089 |
+
|
7090 |
+
el_attr_name.setAttribute("type", "text");
|
7091 |
+
|
7092 |
+
el_attr_name.style.cssText = "width:100px";
|
7093 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
7094 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
7095 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_name')");
|
7096 |
+
|
7097 |
+
var el_attr_value = document.createElement('input');
|
7098 |
+
|
7099 |
+
el_attr_value.setAttribute("type", "text");
|
7100 |
+
|
7101 |
+
el_attr_value.style.cssText = "width:100px";
|
7102 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
7103 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
7104 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_name')");
|
7105 |
+
|
7106 |
+
var el_attr_remove = document.createElement('img');
|
7107 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
7108 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
7109 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
7110 |
+
el_attr_remove.setAttribute("align", 'top');
|
7111 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_name')");
|
7112 |
+
el_attr_table.appendChild(el_attr_tr);
|
7113 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
7114 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
7115 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
7116 |
+
el_attr_td_name.appendChild(el_attr_name);
|
7117 |
+
el_attr_td_value.appendChild(el_attr_value);
|
7118 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
7119 |
+
|
7120 |
+
}
|
7121 |
+
|
7122 |
+
|
7123 |
+
var t = document.getElementById('edit_table');
|
7124 |
+
|
7125 |
+
var br = document.createElement('br');
|
7126 |
+
var br1 = document.createElement('br');
|
7127 |
+
var br2 = document.createElement('br');
|
7128 |
+
var br3 = document.createElement('br');
|
7129 |
+
var br4 = document.createElement('br');
|
7130 |
+
var br5 = document.createElement('br');
|
7131 |
+
var br6 = document.createElement('br');
|
7132 |
+
|
7133 |
+
edit_main_td1.appendChild(el_label_label);
|
7134 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
7135 |
+
|
7136 |
+
edit_main_td2.appendChild(el_label_position_label);
|
7137 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
7138 |
+
edit_main_td2_1.appendChild(Left);
|
7139 |
+
edit_main_td2_1.appendChild(br2);
|
7140 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
7141 |
+
edit_main_td2_1.appendChild(Top);
|
7142 |
+
|
7143 |
+
edit_main_td9.appendChild(el_first_value_label);
|
7144 |
+
edit_main_td9_1.appendChild(el_first_value_first);
|
7145 |
+
edit_main_td9_1.appendChild(gic);
|
7146 |
+
edit_main_td9_1.appendChild(el_first_value_last);
|
7147 |
+
|
7148 |
+
|
7149 |
+
|
7150 |
+
edit_main_td7.appendChild(el_size_label);
|
7151 |
+
edit_main_td7_1.appendChild(el_size);
|
7152 |
+
|
7153 |
+
edit_main_td3.appendChild(el_format_label);
|
7154 |
+
|
7155 |
+
edit_main_td3_1.appendChild(el_format_normal);
|
7156 |
+
edit_main_td3_1.appendChild(Normal);
|
7157 |
+
edit_main_td3_1.appendChild(br6);
|
7158 |
+
edit_main_td3_1.appendChild(el_format_extended);
|
7159 |
+
edit_main_td3_1.appendChild(Extended);
|
7160 |
+
|
7161 |
+
edit_main_td4.appendChild(el_style_label);
|
7162 |
+
edit_main_td4_1.appendChild(el_style_textarea);
|
7163 |
+
|
7164 |
+
edit_main_td5.appendChild(el_required_label);
|
7165 |
+
edit_main_td5_1.appendChild(el_required);
|
7166 |
+
|
7167 |
+
edit_main_td8.appendChild(el_unique_label);
|
7168 |
+
edit_main_td8_1.appendChild(el_unique);
|
7169 |
+
|
7170 |
+
edit_main_td6.appendChild(el_attr_label);
|
7171 |
+
edit_main_td6.appendChild(el_attr_add);
|
7172 |
+
edit_main_td6.appendChild(br3);
|
7173 |
+
edit_main_td6.appendChild(el_attr_table);
|
7174 |
+
edit_main_td6.setAttribute("colspan", "2");
|
7175 |
+
|
7176 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
7177 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
7178 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
7179 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
7180 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
7181 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
7182 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
7183 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
7184 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
7185 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
7186 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
7187 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
7188 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
7189 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
7190 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
7191 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
7192 |
+
edit_main_tr9.appendChild(edit_main_td9);
|
7193 |
+
edit_main_tr9.appendChild(edit_main_td9_1);
|
7194 |
+
edit_main_table.appendChild(edit_main_tr1);
|
7195 |
+
edit_main_table.appendChild(edit_main_tr2);
|
7196 |
+
edit_main_table.appendChild(edit_main_tr9);
|
7197 |
+
edit_main_table.appendChild(edit_main_tr7);
|
7198 |
+
edit_main_table.appendChild(edit_main_tr3);
|
7199 |
+
edit_main_table.appendChild(edit_main_tr4);
|
7200 |
+
edit_main_table.appendChild(edit_main_tr5);
|
7201 |
+
edit_main_table.appendChild(edit_main_tr8);
|
7202 |
+
edit_main_table.appendChild(edit_main_tr6);
|
7203 |
+
edit_div.appendChild(edit_main_table);
|
7204 |
+
|
7205 |
+
t.appendChild(edit_div);
|
7206 |
+
add_id_and_name(i, 'type_name');
|
7207 |
+
|
7208 |
+
//show table
|
7209 |
|
7210 |
+
var adding_type = document.createElement("input");
|
7211 |
+
adding_type.setAttribute("type", "hidden");
|
7212 |
+
adding_type.setAttribute("value", "type_name");
|
7213 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
7214 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
7215 |
+
var adding_required= document.createElement("input");
|
7216 |
+
adding_required.setAttribute("type", "hidden");
|
7217 |
+
adding_required.setAttribute("value", w_required);
|
7218 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
7219 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
7220 |
+
|
7221 |
+
var adding_unique= document.createElement("input");
|
7222 |
+
adding_unique.setAttribute("type", "hidden");
|
7223 |
+
adding_unique.setAttribute("value", w_unique);
|
7224 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
7225 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
7226 |
+
|
7227 |
+
var div = document.createElement('div');
|
7228 |
+
div.setAttribute("id", "main_div");
|
7229 |
+
var div_for_editable_labels = document.createElement('div');
|
7230 |
+
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
7231 |
+
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
7232 |
+
div_for_editable_labels.appendChild(edit_labels);
|
7233 |
+
|
7234 |
+
var table = document.createElement('table');
|
7235 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
7236 |
+
|
7237 |
+
|
7238 |
+
var tr = document.createElement('tr');
|
7239 |
+
|
7240 |
+
var td1 = document.createElement('td');
|
7241 |
+
td1.setAttribute("valign", 'top');
|
7242 |
+
td1.setAttribute("align", 'left');
|
7243 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
7244 |
+
|
7245 |
+
var td2 = document.createElement('td');
|
7246 |
+
td2.setAttribute("valign", 'top');
|
7247 |
+
td2.setAttribute("align", 'left');
|
7248 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
7249 |
+
|
7250 |
+
var table_name = document.createElement('table');
|
7251 |
+
table_name.setAttribute("id", i+"_table_name");
|
7252 |
+
table_name.setAttribute("cellpadding", '0');
|
7253 |
+
table_name.setAttribute("cellspacing", '0');
|
7254 |
+
|
7255 |
+
var tr_name1 = document.createElement('tr');
|
7256 |
+
tr_name1.setAttribute("id", i+"_tr_name1");
|
7257 |
+
|
7258 |
+
var tr_name2 = document.createElement('tr');
|
7259 |
+
tr_name2.setAttribute("id", i+"_tr_name2");
|
7260 |
+
|
7261 |
+
var td_name_input1 = document.createElement('td');
|
7262 |
+
td_name_input1.setAttribute("id", i+"_td_name_input_first");
|
7263 |
+
|
7264 |
+
var td_name_input2 = document.createElement('td');
|
7265 |
+
td_name_input2.setAttribute("id", i+"_td_name_input_last");
|
7266 |
+
|
7267 |
+
var td_name_label1 = document.createElement('td');
|
7268 |
+
td_name_label1.setAttribute("id", i+"_td_name_label_first");
|
7269 |
+
td_name_label1.setAttribute("align", "left");
|
7270 |
+
|
7271 |
+
var td_name_label2 = document.createElement('td');
|
7272 |
+
td_name_label2.setAttribute("id", i+"_td_name_label_last");
|
7273 |
+
td_name_label2.setAttribute("align", "left");
|
7274 |
+
|
7275 |
+
var br1 = document.createElement('br');
|
7276 |
+
var br2 = document.createElement('br');
|
7277 |
+
var br3 = document.createElement('br');
|
7278 |
+
var br4 = document.createElement('br');
|
7279 |
+
|
7280 |
+
|
7281 |
+
var label = document.createElement('span');
|
7282 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
7283 |
+
label.innerHTML = w_field_label;
|
7284 |
+
label.setAttribute("class", "label");
|
7285 |
+
|
7286 |
+
var required = document.createElement('span');
|
7287 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
7288 |
+
required.innerHTML = "";
|
7289 |
+
required.setAttribute("class", "required");
|
7290 |
+
if(w_required=="yes")
|
7291 |
+
required.innerHTML = " *";
|
7292 |
+
var first = document.createElement('input');
|
7293 |
+
first.setAttribute("type", 'text');
|
7294 |
+
if(w_title[0]==w_first_val[0])
|
7295 |
+
first.setAttribute("class", "input_deactive");
|
7296 |
+
else
|
7297 |
+
first.setAttribute("class", "input_active");
|
7298 |
+
|
7299 |
+
first.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
7300 |
+
first.setAttribute("id", i+"_element_firstform_id_temp");
|
7301 |
+
first.setAttribute("name", i+"_element_firstform_id_temp");
|
7302 |
+
first.setAttribute("value", w_first_val[0]);
|
7303 |
+
first.setAttribute("title", w_title[0]);
|
7304 |
+
first.setAttribute("onFocus", 'delete_value("'+i+'_element_firstform_id_temp")');
|
7305 |
+
first.setAttribute("onBlur", 'return_value("'+i+'_element_firstform_id_temp")');
|
7306 |
+
first.setAttribute("onChange", "change_value('"+i+"_element_firstform_id_temp')");
|
7307 |
+
|
7308 |
+
var first_label = document.createElement('label');
|
7309 |
+
first_label.setAttribute("class", "mini_label");
|
7310 |
+
first_label.setAttribute("id", i+"_mini_label_first");
|
7311 |
+
first_label.innerHTML = w_mini_labels[1];
|
7312 |
+
|
7313 |
+
var last = document.createElement('input');
|
7314 |
+
last.setAttribute("type", 'text');
|
7315 |
+
|
7316 |
+
if(w_title[1]==w_first_val[1])
|
7317 |
+
last.setAttribute("class", "input_deactive");
|
7318 |
+
else
|
7319 |
+
last.setAttribute("class", "input_active");
|
7320 |
+
|
7321 |
+
last.style.cssText = "margin-right: 10px; width:"+w_size+"px";
|
7322 |
+
last.setAttribute("id", i+"_element_lastform_id_temp");
|
7323 |
+
last.setAttribute("name", i+"_element_lastform_id_temp");
|
7324 |
+
last.setAttribute("value", w_first_val[1]);
|
7325 |
+
last.setAttribute("title", w_title[1]);
|
7326 |
+
last.setAttribute("onFocus", 'delete_value("'+i+'_element_lastform_id_temp")');
|
7327 |
+
last.setAttribute("onBlur", 'return_value("'+i+'_element_lastform_id_temp")');
|
7328 |
+
last.setAttribute("onChange", "change_value('"+i+"_element_lastform_id_temp')");
|
7329 |
+
|
7330 |
+
|
7331 |
+
var last_label = document.createElement('label');
|
7332 |
+
last_label.setAttribute("class", "mini_label");
|
7333 |
+
last_label.setAttribute("id", i+"_mini_label_last");
|
7334 |
+
last_label.innerHTML= w_mini_labels[2];
|
7335 |
+
|
7336 |
+
var main_td = document.getElementById('show_table');
|
7337 |
+
|
7338 |
+
td1.appendChild(label);
|
7339 |
+
td1.appendChild(required );
|
7340 |
+
|
7341 |
+
td_name_input1.appendChild(first);
|
7342 |
+
td_name_input2.appendChild(last);
|
7343 |
+
tr_name1.appendChild(td_name_input1);
|
7344 |
+
tr_name1.appendChild(td_name_input2);
|
7345 |
+
|
7346 |
+
td_name_label1.appendChild(first_label);
|
7347 |
+
td_name_label2.appendChild(last_label);
|
7348 |
+
tr_name2.appendChild(td_name_label1);
|
7349 |
+
tr_name2.appendChild(td_name_label2);
|
7350 |
+
table_name.appendChild(tr_name1);
|
7351 |
+
table_name.appendChild(tr_name2);
|
7352 |
+
|
7353 |
+
td2.appendChild(adding_type);
|
7354 |
+
td2.appendChild(adding_required);
|
7355 |
+
td2.appendChild(adding_unique);
|
7356 |
+
td2.appendChild(table_name);
|
7357 |
+
tr.appendChild(td1);
|
7358 |
+
tr.appendChild(td2);
|
7359 |
+
table.appendChild(tr);
|
7360 |
+
|
7361 |
+
div.appendChild(table);
|
7362 |
+
div.appendChild(br3);
|
7363 |
+
div.appendChild(div_for_editable_labels);
|
7364 |
+
main_td.appendChild(div);
|
7365 |
+
|
7366 |
+
if(w_field_label_pos=="top")
|
7367 |
+
label_top(i);
|
7368 |
+
|
7369 |
+
if(w_name_format=="extended")
|
7370 |
+
format_extended(i);
|
7371 |
+
change_class(w_class, i);
|
7372 |
+
refresh_attr(i, 'type_name');
|
7373 |
+
jQuery(document).ready(function() {
|
7374 |
+
jQuery("label#"+i+"_mini_label_first").click(function() {
|
7375 |
+
if (jQuery(this).children('input').length == 0) {
|
7376 |
+
var first = "<input type='text' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
7377 |
+
jQuery(this).html(first);
|
7378 |
+
jQuery("input.first").focus();
|
7379 |
+
jQuery("input.first").blur(function() {
|
7380 |
+
var value = jQuery(this).val();
|
7381 |
+
jQuery("#"+i+"_mini_label_first").text(value);
|
7382 |
+
});
|
7383 |
}
|
7384 |
+
});
|
7385 |
+
jQuery("label#"+i+"_mini_label_last").click(function() {
|
7386 |
+
if (jQuery(this).children('input').length == 0) {
|
7387 |
+
var last = "<input type='text' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
7388 |
+
jQuery(this).html(last);
|
7389 |
+
jQuery("input.last").focus();
|
7390 |
+
jQuery("input.last").blur(function() {
|
7391 |
+
var value = jQuery(this).val();
|
7392 |
+
jQuery("#"+i+"_mini_label_last").text(value);
|
7393 |
+
});
|
7394 |
+
}
|
7395 |
+
});
|
7396 |
+
});
|
7397 |
}
|
7398 |
|
7399 |
+
function type_address(i, w_field_label, w_field_label_pos, w_size, w_mini_labels, w_disabled_fields, w_required, w_class, w_attr_name, w_attr_value) {
|
7400 |
+
document.getElementById("element_type").value="type_address";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7401 |
|
7402 |
+
delete_last_child();
|
7403 |
+
// edit table
|
7404 |
+
var edit_div = document.createElement('div');
|
7405 |
+
edit_div.setAttribute("id", "edit_div");
|
7406 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
7407 |
+
|
7408 |
+
var edit_main_table = document.createElement('table');
|
7409 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
7410 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
7411 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
7412 |
+
|
7413 |
+
var edit_main_tr1 = document.createElement('tr');
|
7414 |
+
edit_main_tr1.setAttribute("valing", "top");
|
7415 |
+
|
7416 |
+
var edit_main_tr2 = document.createElement('tr');
|
7417 |
+
edit_main_tr2.setAttribute("valing", "top");
|
7418 |
+
|
7419 |
+
var edit_main_tr3 = document.createElement('tr');
|
7420 |
+
edit_main_tr3.setAttribute("valing", "top");
|
7421 |
+
|
7422 |
+
var edit_main_tr4 = document.createElement('tr');
|
7423 |
+
edit_main_tr4.setAttribute("valing", "top");
|
7424 |
+
|
7425 |
+
var edit_main_tr5 = document.createElement('tr');
|
7426 |
+
edit_main_tr5.setAttribute("valing", "top");
|
7427 |
+
|
7428 |
+
var edit_main_tr6 = document.createElement('tr');
|
7429 |
+
edit_main_tr6.setAttribute("valing", "top");
|
7430 |
+
|
7431 |
+
var edit_main_tr7 = document.createElement('tr');
|
7432 |
+
edit_main_tr7.setAttribute("valing", "top");
|
7433 |
+
|
7434 |
+
var edit_main_tr8 = document.createElement('tr');
|
7435 |
+
edit_main_tr8.setAttribute("valing", "top");
|
7436 |
+
|
7437 |
+
var edit_main_td1 = document.createElement('td');
|
7438 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
7439 |
+
var edit_main_td1_1 = document.createElement('td');
|
7440 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
7441 |
+
var edit_main_td2 = document.createElement('td');
|
7442 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
7443 |
+
var edit_main_td2_1 = document.createElement('td');
|
7444 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
7445 |
+
|
7446 |
+
var edit_main_td3 = document.createElement('td');
|
7447 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
7448 |
+
var edit_main_td3_1 = document.createElement('td');
|
7449 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
7450 |
+
var edit_main_td4 = document.createElement('td');
|
7451 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
7452 |
+
var edit_main_td4_1 = document.createElement('td');
|
7453 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
7454 |
+
|
7455 |
+
var edit_main_td5 = document.createElement('td');
|
7456 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
7457 |
+
var edit_main_td5_1 = document.createElement('td');
|
7458 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
7459 |
+
|
7460 |
+
var edit_main_td6 = document.createElement('td');
|
7461 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
7462 |
+
var edit_main_td6_1 = document.createElement('td');
|
7463 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
7464 |
+
|
7465 |
+
var edit_main_td7 = document.createElement('td');
|
7466 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
7467 |
+
var edit_main_td7_1 = document.createElement('td');
|
7468 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
7469 |
+
|
7470 |
+
var edit_main_td8 = document.createElement('td');
|
7471 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
7472 |
+
var edit_main_td8_1 = document.createElement('td');
|
7473 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
7474 |
+
|
7475 |
+
var el_label_label = document.createElement('label');
|
7476 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7477 |
+
el_label_label.innerHTML = "Field label";
|
7478 |
+
|
7479 |
+
var el_label_textarea = document.createElement('textarea');
|
7480 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
7481 |
+
el_label_textarea.setAttribute("rows", "4");
|
7482 |
+
el_label_textarea.style.cssText = "width:200px;";
|
7483 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
7484 |
+
el_label_textarea.innerHTML = w_field_label;
|
7485 |
+
|
7486 |
+
var el_label_position_label = document.createElement('label');
|
7487 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7488 |
+
el_label_position_label.innerHTML = "Field label position";
|
7489 |
+
|
7490 |
+
var el_label_position1 = document.createElement('input');
|
7491 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
7492 |
+
el_label_position1.setAttribute("type", "radio");
|
7493 |
+
el_label_position1.setAttribute("value", "left");
|
7494 |
+
|
7495 |
+
|
7496 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
7497 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
7498 |
+
Left = document.createTextNode("Left");
|
7499 |
+
|
7500 |
+
var el_label_position2 = document.createElement('input');
|
7501 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
7502 |
+
el_label_position2.setAttribute("type", "radio");
|
7503 |
+
el_label_position2.setAttribute("value", "top");
|
7504 |
+
|
7505 |
+
|
7506 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
7507 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
7508 |
+
Top = document.createTextNode("Top");
|
7509 |
+
|
7510 |
+
if(w_field_label_pos=="top")
|
7511 |
+
|
7512 |
+
el_label_position2.setAttribute("checked", "checked");
|
7513 |
+
else
|
7514 |
+
|
7515 |
+
el_label_position1.setAttribute("checked", "checked");
|
7516 |
+
|
7517 |
+
var el_size_label = document.createElement('label');
|
7518 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7519 |
+
el_size_label.innerHTML = "Overall size(px) ";
|
7520 |
+
var el_size = document.createElement('input');
|
7521 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
7522 |
+
el_size.setAttribute("type", "text");
|
7523 |
+
el_size.setAttribute("value", w_size);
|
7524 |
+
|
7525 |
+
el_size.setAttribute("name", "edit_for_size");
|
7526 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
7527 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_div_address', this.value);");
|
7528 |
+
var el_disable_field_label = document.createElement('label');
|
7529 |
+
el_disable_field_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7530 |
+
el_disable_field_label.innerHTML = "Disable Field(s)";
|
7531 |
+
|
7532 |
+
|
7533 |
+
var el_disable_address1 = document.createElement('input');
|
7534 |
+
el_disable_address1.setAttribute("id", "el_street1");
|
7535 |
+
el_disable_address1.setAttribute("type", "checkbox");
|
7536 |
+
el_disable_address1.setAttribute("value", "no");
|
7537 |
+
el_disable_address1.setAttribute("onclick", "disable_fields('"+i+"','street1')");
|
7538 |
+
if(w_disabled_fields[0]=="yes")
|
7539 |
+
el_disable_address1.setAttribute("checked", "checked");
|
7540 |
+
|
7541 |
+
var el_disable_address2 = document.createElement('input');
|
7542 |
+
el_disable_address2.setAttribute("id", "el_street2");
|
7543 |
+
el_disable_address2.setAttribute("type", "checkbox");
|
7544 |
+
el_disable_address2.setAttribute("value", "no");
|
7545 |
+
el_disable_address2.setAttribute("onclick", "disable_fields('"+i+"','street2')");
|
7546 |
+
if(w_disabled_fields[1]=="yes")
|
7547 |
+
el_disable_address2.setAttribute("checked", "checked");
|
7548 |
+
|
7549 |
+
var el_disable_city = document.createElement('input');
|
7550 |
+
el_disable_city.setAttribute("id", "el_city");
|
7551 |
+
el_disable_city.setAttribute("type", "checkbox");
|
7552 |
+
el_disable_city.setAttribute("value", "no");
|
7553 |
+
el_disable_city.setAttribute("onclick", "disable_fields('"+i+"','city')");
|
7554 |
+
if(w_disabled_fields[2]=="yes")
|
7555 |
+
el_disable_city.setAttribute("checked", "checked");
|
7556 |
+
|
7557 |
+
var el_disable_state = document.createElement('input');
|
7558 |
+
el_disable_state.setAttribute("id", "el_state");
|
7559 |
+
el_disable_state.setAttribute("type", "checkbox");
|
7560 |
+
el_disable_state.setAttribute("value", "no");
|
7561 |
+
el_disable_state.setAttribute("onclick", "disable_fields('"+i+"','state')");
|
7562 |
+
if(w_disabled_fields[3]=="yes")
|
7563 |
+
el_disable_state.setAttribute("checked", "checked");
|
7564 |
+
|
7565 |
+
var el_disable_postal = document.createElement('input');
|
7566 |
+
el_disable_postal.setAttribute("id", "el_postal");
|
7567 |
+
el_disable_postal.setAttribute("type", "checkbox");
|
7568 |
+
el_disable_postal.setAttribute("value", "no");
|
7569 |
+
el_disable_postal.setAttribute("onclick", "disable_fields('"+i+"','postal')");
|
7570 |
+
if(w_disabled_fields[4]=="yes")
|
7571 |
+
el_disable_postal.setAttribute("checked", "checked");
|
7572 |
+
|
7573 |
+
var el_disable_country = document.createElement('input');
|
7574 |
+
el_disable_country.setAttribute("id", "el_country");
|
7575 |
+
el_disable_country.setAttribute("type", "checkbox");
|
7576 |
+
el_disable_country.setAttribute("value", "no");
|
7577 |
+
el_disable_country.setAttribute("onclick", "disable_fields('"+i+"','country')");
|
7578 |
+
if(w_disabled_fields[5]=="yes")
|
7579 |
+
el_disable_country.setAttribute("checked", "checked");
|
7580 |
+
|
7581 |
+
var el_required_label = document.createElement('label');
|
7582 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7583 |
+
el_required_label.innerHTML = "Required";
|
7584 |
+
|
7585 |
+
var el_required = document.createElement('input');
|
7586 |
+
el_required.setAttribute("id", "el_send");
|
7587 |
+
el_required.setAttribute("type", "checkbox");
|
7588 |
+
el_required.setAttribute("value", "yes");
|
7589 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
7590 |
+
if(w_required=="yes")
|
7591 |
+
el_required.setAttribute("checked", "checked");
|
7592 |
+
|
7593 |
+
var el_style_label = document.createElement('label');
|
7594 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7595 |
+
el_style_label.innerHTML = "Class name";
|
7596 |
+
|
7597 |
+
var el_style_textarea = document.createElement('input');
|
7598 |
+
el_style_textarea.setAttribute("id", "element_style");
|
7599 |
+
el_style_textarea.setAttribute("type", "text");
|
7600 |
+
el_style_textarea.setAttribute("value", w_class);
|
7601 |
+
el_style_textarea.style.cssText = "width:200px;";
|
7602 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
7603 |
+
|
7604 |
+
var el_attr_label = document.createElement('label');
|
7605 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
7606 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
7607 |
+
var el_attr_add = document.createElement('img');
|
7608 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
7609 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
7610 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
7611 |
+
el_attr_add.setAttribute("title", 'add');
|
7612 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_address')");
|
7613 |
+
var el_attr_table = document.createElement('table');
|
7614 |
+
el_attr_table.setAttribute("id", 'attributes');
|
7615 |
+
el_attr_table.setAttribute("border", '0');
|
7616 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
7617 |
+
var el_attr_tr_label = document.createElement('tr');
|
7618 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
7619 |
+
var el_attr_td_name_label = document.createElement('th');
|
7620 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
7621 |
+
var el_attr_td_value_label = document.createElement('th');
|
7622 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
7623 |
+
var el_attr_td_X_label = document.createElement('th');
|
7624 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
7625 |
+
var el_attr_name_label = document.createElement('label');
|
7626 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
7627 |
+
el_attr_name_label.innerHTML = "Name";
|
7628 |
+
|
7629 |
+
var el_attr_value_label = document.createElement('label');
|
7630 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
7631 |
+
el_attr_value_label.innerHTML = "Value";
|
7632 |
+
|
7633 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
7634 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
7635 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
7636 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
7637 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
7638 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
7639 |
+
|
7640 |
+
n=w_attr_name.length;
|
7641 |
+
for(j=1; j<=n; j++)
|
7642 |
+
{
|
7643 |
+
var el_attr_tr = document.createElement('tr');
|
7644 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
7645 |
+
el_attr_tr.setAttribute("idi", j);
|
7646 |
+
var el_attr_td_name = document.createElement('td');
|
7647 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
7648 |
+
var el_attr_td_value = document.createElement('td');
|
7649 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
7650 |
+
|
7651 |
+
var el_attr_td_X = document.createElement('td');
|
7652 |
+
var el_attr_name = document.createElement('input');
|
7653 |
+
|
7654 |
+
el_attr_name.setAttribute("type", "text");
|
7655 |
+
|
7656 |
+
el_attr_name.style.cssText = "width:100px";
|
7657 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
7658 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
7659 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_address')");
|
7660 |
+
|
7661 |
+
var el_attr_value = document.createElement('input');
|
7662 |
+
|
7663 |
+
el_attr_value.setAttribute("type", "text");
|
7664 |
+
|
7665 |
+
el_attr_value.style.cssText = "width:100px";
|
7666 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
7667 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
7668 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_address')");
|
7669 |
+
|
7670 |
+
var el_attr_remove = document.createElement('img');
|
7671 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
7672 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
7673 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
7674 |
+
el_attr_remove.setAttribute("align", 'top');
|
7675 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_address')");
|
7676 |
+
el_attr_table.appendChild(el_attr_tr);
|
7677 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
7678 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
7679 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
7680 |
+
el_attr_td_name.appendChild(el_attr_name);
|
7681 |
+
el_attr_td_value.appendChild(el_attr_value);
|
7682 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
7683 |
+
|
7684 |
+
}
|
7685 |
+
var el_street1 = document.createTextNode(w_mini_labels[0]);
|
7686 |
+
var el_street2 = document.createTextNode(w_mini_labels[1]);
|
7687 |
+
var el_city = document.createTextNode(w_mini_labels[2]);
|
7688 |
+
var el_state = document.createTextNode(w_mini_labels[3]);
|
7689 |
+
var el_postal = document.createTextNode(w_mini_labels[4]);
|
7690 |
+
var el_country = document.createTextNode(w_mini_labels[5]);
|
7691 |
+
|
7692 |
+
var el_street1_label = document.createElement('label');
|
7693 |
+
el_street1_label.setAttribute("id", "el_street1_label");
|
7694 |
+
|
7695 |
+
var el_street2_label = document.createElement('label');
|
7696 |
+
el_street2_label.setAttribute("id", "el_street2_label");
|
7697 |
+
|
7698 |
+
var el_city_label = document.createElement('label');
|
7699 |
+
el_city_label.setAttribute("id", "el_city_label");
|
7700 |
+
|
7701 |
+
var el_state_label = document.createElement('label');
|
7702 |
+
el_state_label.setAttribute("id", "el_state_label");
|
7703 |
+
|
7704 |
+
var el_postal_label = document.createElement('label');
|
7705 |
+
el_postal_label.setAttribute("id", "el_postal_label");
|
7706 |
+
|
7707 |
+
var el_country_label = document.createElement('label');
|
7708 |
+
el_country_label.setAttribute("id", "el_country_label");
|
7709 |
+
|
7710 |
+
el_street1_label.appendChild(el_street1);
|
7711 |
+
el_street2_label.appendChild(el_street2);
|
7712 |
+
el_city_label.appendChild(el_city);
|
7713 |
+
el_state_label.appendChild(el_state);
|
7714 |
+
el_postal_label.appendChild(el_postal);
|
7715 |
+
el_country_label.appendChild(el_country);
|
7716 |
+
var br_ = document.createElement('br');
|
7717 |
+
var br1_ = document.createElement('br');
|
7718 |
+
var br2_ = document.createElement('br');
|
7719 |
+
var br3_ = document.createElement('br');
|
7720 |
+
var br4_ = document.createElement('br');
|
7721 |
+
var br5_ = document.createElement('br');
|
7722 |
+
var t = document.getElementById('edit_table');
|
7723 |
+
|
7724 |
+
var br = document.createElement('br');
|
7725 |
+
var br1 = document.createElement('br');
|
7726 |
+
var br2 = document.createElement('br');
|
7727 |
+
var br3 = document.createElement('br');
|
7728 |
+
var br4 = document.createElement('br');
|
7729 |
+
var br5 = document.createElement('br');
|
7730 |
+
var br6 = document.createElement('br');
|
7731 |
+
|
7732 |
+
edit_main_td1.appendChild(el_label_label);
|
7733 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
7734 |
+
|
7735 |
+
edit_main_td2.appendChild(el_label_position_label);
|
7736 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
7737 |
+
edit_main_td2_1.appendChild(Left);
|
7738 |
+
edit_main_td2_1.appendChild(br2);
|
7739 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
7740 |
+
edit_main_td2_1.appendChild(Top);
|
7741 |
+
|
7742 |
+
edit_main_td7.appendChild(el_size_label);
|
7743 |
+
edit_main_td7_1.appendChild(el_size);
|
7744 |
+
|
7745 |
+
/*edit_main_td3.appendChild(el_format_label);
|
7746 |
+
edit_main_td3.appendChild(br5);
|
7747 |
+
edit_main_td3.appendChild(el_format_normal);
|
7748 |
+
edit_main_td3.appendChild(Normal);
|
7749 |
+
edit_main_td3.appendChild(br6);
|
7750 |
+
edit_main_td3.appendChild(el_format_extended);
|
7751 |
+
edit_main_td3.appendChild(Extended);*/
|
7752 |
+
|
7753 |
+
edit_main_td4.appendChild(el_style_label);
|
7754 |
+
edit_main_td4_1.appendChild(el_style_textarea);
|
7755 |
+
|
7756 |
+
edit_main_td5.appendChild(el_required_label);
|
7757 |
+
edit_main_td5_1.appendChild(el_required);
|
7758 |
+
|
7759 |
+
edit_main_td8.appendChild(el_disable_field_label);
|
7760 |
+
edit_main_td8_1.appendChild(el_disable_address1);
|
7761 |
+
edit_main_td8_1.appendChild(el_street1_label);
|
7762 |
+
edit_main_td8_1.appendChild(br_);
|
7763 |
+
edit_main_td8_1.appendChild(el_disable_address2);
|
7764 |
+
edit_main_td8_1.appendChild(el_street2_label);
|
7765 |
+
edit_main_td8_1.appendChild(br1_);
|
7766 |
+
edit_main_td8_1.appendChild(el_disable_city);
|
7767 |
+
edit_main_td8_1.appendChild(el_city_label);
|
7768 |
+
edit_main_td8_1.appendChild(br2_);
|
7769 |
+
edit_main_td8_1.appendChild(el_disable_state);
|
7770 |
+
edit_main_td8_1.appendChild(el_state_label);
|
7771 |
+
edit_main_td8_1.appendChild(br3_);
|
7772 |
+
edit_main_td8_1.appendChild(el_disable_postal);
|
7773 |
+
edit_main_td8_1.appendChild(el_postal_label);
|
7774 |
+
edit_main_td8_1.appendChild(br4_);
|
7775 |
+
edit_main_td8_1.appendChild(el_disable_country);
|
7776 |
+
edit_main_td8_1.appendChild(el_country_label);
|
7777 |
+
edit_main_td8_1.appendChild(br5_);
|
7778 |
+
|
7779 |
+
edit_main_td6.appendChild(el_attr_label);
|
7780 |
+
edit_main_td6.appendChild(el_attr_add);
|
7781 |
+
edit_main_td6.appendChild(br3);
|
7782 |
+
edit_main_td6.appendChild(el_attr_table);
|
7783 |
+
edit_main_td6.setAttribute("colspan", "2");
|
7784 |
+
|
7785 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
7786 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
7787 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
7788 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
7789 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
7790 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
7791 |
+
//edit_main_tr3.appendChild(edit_main_td3);
|
7792 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
7793 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
7794 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
7795 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
7796 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
7797 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
7798 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
7799 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
7800 |
+
edit_main_table.appendChild(edit_main_tr1);
|
7801 |
+
edit_main_table.appendChild(edit_main_tr2);
|
7802 |
+
edit_main_table.appendChild(edit_main_tr7);
|
7803 |
+
//edit_main_table.appendChild(edit_main_tr3);
|
7804 |
+
edit_main_table.appendChild(edit_main_tr4);
|
7805 |
+
edit_main_table.appendChild(edit_main_tr5);
|
7806 |
+
edit_main_table.appendChild(edit_main_tr8);
|
7807 |
+
edit_main_table.appendChild(edit_main_tr5);
|
7808 |
+
edit_main_table.appendChild(edit_main_tr6);
|
7809 |
+
edit_div.appendChild(edit_main_table);
|
7810 |
+
|
7811 |
+
t.appendChild(edit_div);
|
7812 |
+
add_id_and_name(i, 'type_address');
|
7813 |
|
7814 |
+
//show table
|
|
|
7815 |
|
7816 |
+
var adding_type = document.createElement("input");
|
7817 |
+
adding_type.setAttribute("type", "hidden");
|
7818 |
+
adding_type.setAttribute("value", "type_address");
|
7819 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
7820 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
7821 |
+
var adding_required= document.createElement("input");
|
7822 |
+
adding_required.setAttribute("type", "hidden");
|
7823 |
+
adding_required.setAttribute("value", w_required);
|
7824 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
7825 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
7826 |
+
var adding_country= document.createElement("input");
|
7827 |
+
adding_country.setAttribute("type", "hidden");
|
7828 |
+
adding_country.setAttribute("name", i+"_disable_fieldsform_id_temp");
|
7829 |
+
adding_country.setAttribute("id", i+"_disable_fieldsform_id_temp");
|
7830 |
+
adding_country.setAttribute("street1", w_disabled_fields[0]);
|
7831 |
+
adding_country.setAttribute("street2", w_disabled_fields[1]);
|
7832 |
+
adding_country.setAttribute("city", w_disabled_fields[2]);
|
7833 |
+
adding_country.setAttribute("state", w_disabled_fields[3]);
|
7834 |
+
adding_country.setAttribute("postal", w_disabled_fields[4]);
|
7835 |
+
adding_country.setAttribute("country", w_disabled_fields[5]);
|
7836 |
+
|
7837 |
+
var div = document.createElement('div');
|
7838 |
+
div.setAttribute("id", "main_div");
|
7839 |
+
|
7840 |
+
var table = document.createElement('table');
|
7841 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
7842 |
+
var div_for_editable_labels = document.createElement('div');
|
7843 |
+
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
7844 |
+
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
7845 |
+
div_for_editable_labels.appendChild(edit_labels);
|
7846 |
+
|
7847 |
+
var tr = document.createElement('tr');
|
7848 |
+
|
7849 |
+
var td1 = document.createElement('td');
|
7850 |
+
td1.setAttribute("valign", 'top');
|
7851 |
+
td1.setAttribute("align", 'left');
|
7852 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
7853 |
+
|
7854 |
+
var td2 = document.createElement('td');
|
7855 |
+
td2.setAttribute("valign", 'top');
|
7856 |
+
td2.setAttribute("align", 'left');
|
7857 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
7858 |
+
|
7859 |
+
var div_address = document.createElement('div');
|
7860 |
+
div_address.setAttribute("id", i+"_div_address");
|
7861 |
+
div_address.style.cssText = "width:"+w_size+"px";
|
7862 |
+
|
7863 |
+
var span_addres1 = document.createElement('span');
|
7864 |
+
span_addres1.style.cssText = "float:left; width:100%; padding-bottom: 8px; display:block";
|
7865 |
+
|
7866 |
+
var span_addres2 = document.createElement('span');
|
7867 |
+
span_addres2.style.cssText = "float:left; width:100%; padding-bottom: 8px; display:block";
|
7868 |
+
|
7869 |
+
var span_addres3_1 = document.createElement('span');
|
7870 |
+
span_addres3_1.style.cssText = "float:left; width:48%; padding-bottom: 8px;";
|
7871 |
+
|
7872 |
+
var span_addres3_2 = document.createElement('span');
|
7873 |
+
span_addres3_2.style.cssText = "float:right; width:48%; padding-bottom: 8px;";
|
7874 |
+
|
7875 |
+
var span_addres4_1 = document.createElement('span');
|
7876 |
+
span_addres4_1.style.cssText = "float:left; width:48%; padding-bottom: 8px;";
|
7877 |
+
|
7878 |
+
var span_addres4_2 = document.createElement('span');
|
7879 |
+
span_addres4_2.style.cssText = "float:right; width:48%; padding-bottom: 8px;";
|
7880 |
+
|
7881 |
+
|
7882 |
+
var br1 = document.createElement('br');
|
7883 |
+
var br2 = document.createElement('br');
|
7884 |
+
var br3 = document.createElement('br');
|
7885 |
+
var br4 = document.createElement('br');
|
7886 |
+
|
7887 |
+
|
7888 |
+
var label = document.createElement('span');
|
7889 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
7890 |
+
label.innerHTML = w_field_label;
|
7891 |
+
label.setAttribute("class", "label");
|
7892 |
+
|
7893 |
+
var required = document.createElement('span');
|
7894 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
7895 |
+
required.innerHTML = "";
|
7896 |
+
required.setAttribute("class", "required");
|
7897 |
+
if(w_required=="yes")
|
7898 |
+
required.innerHTML = " *";
|
7899 |
+
|
7900 |
+
var street1 = document.createElement('input');
|
7901 |
+
street1.setAttribute("type", 'text');
|
7902 |
+
street1.style.cssText = "width:100%";
|
7903 |
+
street1.setAttribute("id", i+"_street1form_id_temp");
|
7904 |
+
street1.setAttribute("name", i+"_street1form_id_temp");
|
7905 |
+
street1.setAttribute("onChange", "change_value('"+i+"_street1form_id_temp')");
|
7906 |
+
|
7907 |
+
var street1_label = document.createElement('label');
|
7908 |
+
street1_label.setAttribute("class", "mini_label");
|
7909 |
+
street1_label.setAttribute("id", i+"_mini_label_street1");
|
7910 |
+
street1_label.style.cssText = "display:block;";
|
7911 |
+
street1_label.innerHTML=w_mini_labels[0];
|
7912 |
+
|
7913 |
+
var street2 = document.createElement('input');
|
7914 |
+
street2.setAttribute("type", 'text');
|
7915 |
+
street2.style.cssText = "width:100%";
|
7916 |
+
street2.setAttribute("id", i+"_street2form_id_temp");
|
7917 |
+
street2.setAttribute("name", (parseInt(i)+1)+"_street2form_id_temp");
|
7918 |
+
street2.setAttribute("onChange", "change_value('"+i+"_street2form_id_temp')");
|
7919 |
+
|
7920 |
+
var street2_label = document.createElement('label');
|
7921 |
+
street2_label.setAttribute("class", "mini_label");
|
7922 |
+
street2_label.setAttribute("id", i+"_mini_label_street2");
|
7923 |
+
street2_label.style.cssText = "display:block;";
|
7924 |
+
street2_label.innerHTML=w_mini_labels[1];
|
7925 |
+
|
7926 |
+
var city = document.createElement('input');
|
7927 |
+
city.setAttribute("type", 'text');
|
7928 |
+
city.style.cssText = "width:100%";
|
7929 |
+
city.setAttribute("id", i+"_cityform_id_temp");
|
7930 |
+
city.setAttribute("name", (parseInt(i)+2)+"_cityform_id_temp");
|
7931 |
+
city.setAttribute("onChange", "change_value('"+i+"_cityform_id_temp')");
|
7932 |
+
|
7933 |
+
var city_label = document.createElement('label');
|
7934 |
+
city_label.setAttribute("class", "mini_label");
|
7935 |
+
city_label.setAttribute("id", i+"_mini_label_city");
|
7936 |
+
city_label.style.cssText = "display:block;";
|
7937 |
+
city_label.innerHTML= w_mini_labels[2];
|
7938 |
+
|
7939 |
+
var state = document.createElement('input');
|
7940 |
+
state.setAttribute("type", 'text');
|
7941 |
+
state.style.cssText = "width:100%";
|
7942 |
+
state.setAttribute("id", i+"_stateform_id_temp");
|
7943 |
+
state.setAttribute("name", (parseInt(i)+3)+"_stateform_id_temp");
|
7944 |
+
state.setAttribute("onChange", "change_value('"+i+"_stateform_id_temp')");
|
7945 |
+
|
7946 |
+
var state_label = document.createElement('label');
|
7947 |
+
state_label.setAttribute("class", "mini_label");
|
7948 |
+
state_label.setAttribute("id", i+"_mini_label_state");
|
7949 |
+
state_label.style.cssText = "display:block;";
|
7950 |
+
state_label.innerHTML = w_mini_labels[3];
|
7951 |
+
|
7952 |
+
|
7953 |
+
|
7954 |
+
var postal = document.createElement('input');
|
7955 |
+
postal.setAttribute("type", 'text');
|
7956 |
+
postal.style.cssText = "width:100%";
|
7957 |
+
postal.setAttribute("id", i+"_postalform_id_temp");
|
7958 |
+
postal.setAttribute("name", (parseInt(i)+4)+"_postalform_id_temp");
|
7959 |
+
postal.setAttribute("onChange", "change_value('"+i+"_postalform_id_temp')");
|
7960 |
+
|
7961 |
+
var postal_label = document.createElement('label');
|
7962 |
+
postal_label.setAttribute("class", "mini_label");
|
7963 |
+
postal_label.setAttribute("id", i+"_mini_label_postal");
|
7964 |
+
postal_label.style.cssText = "display:block;";
|
7965 |
+
postal_label.innerHTML=w_mini_labels[4];
|
7966 |
+
|
7967 |
+
var country = document.createElement('select');
|
7968 |
+
country.setAttribute("type", 'text');
|
7969 |
+
country.style.cssText = "width:100%";
|
7970 |
+
country.setAttribute("id", i+"_countryform_id_temp");
|
7971 |
+
country.setAttribute("name", (parseInt(i)+5)+"_countryform_id_temp");
|
7972 |
+
country.setAttribute("onChange", "change_value('"+i+"_countryform_id_temp')");
|
7973 |
+
|
7974 |
+
var country_label = document.createElement('label');
|
7975 |
+
country_label.setAttribute("class", "mini_label");
|
7976 |
+
country_label.setAttribute("id", i+"_mini_label_country");
|
7977 |
+
country_label.style.cssText = "display:block;";
|
7978 |
+
country_label.innerHTML=w_mini_labels[5];
|
7979 |
+
|
7980 |
+
|
7981 |
+
var option_ = document.createElement('option');
|
7982 |
+
option_.setAttribute("value", "");
|
7983 |
+
option_.innerHTML="";
|
7984 |
+
country.appendChild(option_);
|
7985 |
+
|
7986 |
+
coutries=["Afghanistan","Albania", "Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombi","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepa","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"];
|
7987 |
+
for(r=0;r<coutries.length;r++)
|
7988 |
+
{
|
7989 |
+
var option_ = document.createElement('option');
|
7990 |
+
option_.setAttribute("value", coutries[r]);
|
7991 |
+
option_.innerHTML=coutries[r];
|
7992 |
+
country.appendChild(option_);
|
7993 |
+
}
|
7994 |
+
|
7995 |
+
|
7996 |
+
|
7997 |
+
|
7998 |
+
|
7999 |
+
|
8000 |
+
|
8001 |
+
|
8002 |
+
|
8003 |
+
var main_td = document.getElementById('show_table');
|
8004 |
+
|
8005 |
+
td1.appendChild(label);
|
8006 |
+
td1.appendChild(required );
|
8007 |
+
|
8008 |
+
|
8009 |
+
span_addres1.appendChild(street1);
|
8010 |
+
span_addres1.appendChild(street1_label);
|
8011 |
+
|
8012 |
+
span_addres2.appendChild(street2);
|
8013 |
+
span_addres2.appendChild(street2_label);
|
8014 |
+
|
8015 |
+
span_addres3_1.appendChild(city);
|
8016 |
+
span_addres3_1.appendChild(city_label);
|
8017 |
+
span_addres3_2.appendChild(state);
|
8018 |
+
span_addres3_2.appendChild(state_label);
|
8019 |
+
|
8020 |
+
|
8021 |
+
span_addres4_1.appendChild(postal);
|
8022 |
+
span_addres4_1.appendChild(postal_label);
|
8023 |
+
span_addres4_2.appendChild(country);
|
8024 |
+
span_addres4_2.appendChild(country_label);
|
8025 |
+
|
8026 |
+
|
8027 |
+
if(w_disabled_fields[0]=="no")
|
8028 |
+
div_address.appendChild(span_addres1);
|
8029 |
+
if(w_disabled_fields[1]=="no")
|
8030 |
+
div_address.appendChild(span_addres2);
|
8031 |
+
if(w_disabled_fields[2]=="no")
|
8032 |
+
div_address.appendChild(span_addres3_1);
|
8033 |
+
if(w_disabled_fields[3]=="no")
|
8034 |
+
div_address.appendChild(span_addres3_2);
|
8035 |
+
if(w_disabled_fields[4]=="no")
|
8036 |
+
div_address.appendChild(span_addres4_1);
|
8037 |
+
if(w_disabled_fields[5]=="no")
|
8038 |
+
div_address.appendChild(span_addres4_2);
|
8039 |
+
|
8040 |
+
|
8041 |
+
td2.appendChild(adding_type);
|
8042 |
+
td2.appendChild(adding_required);
|
8043 |
+
td2.appendChild(adding_country);
|
8044 |
+
td2.appendChild(div_address);
|
8045 |
+
tr.appendChild(td1);
|
8046 |
+
tr.appendChild(td2);
|
8047 |
+
table.appendChild(tr);
|
8048 |
+
|
8049 |
+
div.appendChild(table);
|
8050 |
+
div.appendChild(br3);
|
8051 |
+
div.appendChild(div_for_editable_labels);
|
8052 |
+
main_td.appendChild(div);
|
8053 |
+
|
8054 |
+
if(w_field_label_pos=="top")
|
8055 |
+
label_top(i);
|
8056 |
+
change_class(w_class, i);
|
8057 |
+
refresh_attr(i, 'type_address');
|
8058 |
+
jQuery(document).ready(function() {
|
8059 |
+
jQuery("label#"+i+"_mini_label_street1").click(function() {
|
8060 |
+
if (jQuery(this).children('input').length == 0) {
|
8061 |
+
var street1 = "<input type='text' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8062 |
+
jQuery(this).html(street1);
|
8063 |
+
jQuery("input.street1").focus();
|
8064 |
+
jQuery("input.street1").blur(function() {
|
8065 |
+
var value = jQuery(this).val();
|
8066 |
+
jQuery("#"+i+"_mini_label_street1").text(value);
|
8067 |
+
document.getElementById('el_street1_label').innerHTML = value;
|
8068 |
+
});
|
8069 |
}
|
8070 |
+
});
|
8071 |
+
jQuery("label#"+i+"_mini_label_street2").click(function() {
|
8072 |
+
if (jQuery(this).children('input').length == 0) {
|
8073 |
+
var street2 = "<input type='text' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8074 |
+
jQuery(this).html(street2);
|
8075 |
+
jQuery("input.street2").focus();
|
8076 |
+
jQuery("input.street2").blur(function() {
|
8077 |
+
var value = jQuery(this).val();
|
8078 |
+
jQuery("#"+i+"_mini_label_street2").text(value);
|
8079 |
+
document.getElementById('el_street2_label').innerHTML = value;
|
8080 |
+
});
|
8081 |
+
}
|
8082 |
+
});
|
8083 |
+
jQuery("label#"+i+"_mini_label_city").click(function() {
|
8084 |
+
if (jQuery(this).children('input').length == 0) {
|
8085 |
+
var city = "<input type='text' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8086 |
+
jQuery(this).html(city);
|
8087 |
+
jQuery("input.city").focus();
|
8088 |
+
jQuery("input.city").blur(function() {
|
8089 |
+
var value = jQuery(this).val();
|
8090 |
+
jQuery("#"+i+"_mini_label_city").text(value);
|
8091 |
+
document.getElementById('el_city_label').innerHTML = value;
|
8092 |
+
});
|
8093 |
+
}
|
8094 |
+
});
|
8095 |
+
jQuery("label#"+i+"_mini_label_state").click(function() {
|
8096 |
+
if (jQuery(this).children('input').length == 0) {
|
8097 |
+
var state = "<input type='text' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8098 |
+
jQuery(this).html(state);
|
8099 |
+
jQuery("input.state").focus();
|
8100 |
+
jQuery("input.state").blur(function() {
|
8101 |
+
var value = jQuery(this).val();
|
8102 |
+
jQuery("#"+i+"_mini_label_state").text(value);
|
8103 |
+
document.getElementById('el_state_label').innerHTML = value;
|
8104 |
+
});
|
8105 |
+
}
|
8106 |
+
});
|
8107 |
+
jQuery("label#"+i+"_mini_label_postal").click(function() {
|
8108 |
+
if (jQuery(this).children('input').length == 0) {
|
8109 |
+
var postal = "<input type='text' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8110 |
+
jQuery(this).html(postal);
|
8111 |
+
jQuery("input.postal").focus();
|
8112 |
+
jQuery("input.postal").blur(function() {
|
8113 |
+
var value = jQuery(this).val();
|
8114 |
+
jQuery("#"+i+"_mini_label_postal").text(value);
|
8115 |
+
document.getElementById('el_postal_label').innerHTML = value;
|
8116 |
+
});
|
8117 |
+
}
|
8118 |
+
});
|
8119 |
+
jQuery("label#"+i+"_mini_label_country").click(function() {
|
8120 |
+
if (jQuery(this).children('input').length == 0) {
|
8121 |
+
var country = "<input type='text' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
8122 |
+
jQuery(this).html(country);
|
8123 |
+
jQuery("input.country").focus();
|
8124 |
+
jQuery("input.country").blur(function() {
|
8125 |
+
var value = jQuery(this).val();
|
8126 |
+
jQuery("#"+i+"_mini_label_country").text(value);
|
8127 |
+
document.getElementById('el_country_label').innerHTML = value;
|
8128 |
+
});
|
8129 |
+
}
|
8130 |
+
});
|
8131 |
+
});
|
8132 |
}
|
8133 |
|
8134 |
+
function type_submitter_mail(i, w_field_label, w_field_label_pos, w_size, w_first_val, w_title, w_send, w_required, w_unique, w_class, w_attr_name, w_attr_value){
|
8135 |
+
document.getElementById("element_type").value="type_submitter_mail";
|
|
|
|
|
|
|
|
|
|
|
8136 |
|
8137 |
+
delete_last_child();
|
8138 |
+
// edit table
|
8139 |
+
var edit_div = document.createElement('div');
|
8140 |
+
edit_div.setAttribute("id", "edit_div");
|
8141 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
8142 |
+
|
8143 |
+
var edit_main_table = document.createElement('table');
|
8144 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
8145 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
8146 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
8147 |
+
|
8148 |
+
var edit_main_tr1 = document.createElement('tr');
|
8149 |
+
edit_main_tr1.setAttribute("valing", "top");
|
8150 |
+
|
8151 |
+
var edit_main_tr2 = document.createElement('tr');
|
8152 |
+
edit_main_tr2.setAttribute("valing", "top");
|
8153 |
+
|
8154 |
+
var edit_main_tr3 = document.createElement('tr');
|
8155 |
+
edit_main_tr3.setAttribute("valing", "top");
|
8156 |
+
|
8157 |
+
var edit_main_tr4 = document.createElement('tr');
|
8158 |
+
edit_main_tr4.setAttribute("valing", "top");
|
8159 |
+
|
8160 |
+
var edit_main_tr5 = document.createElement('tr');
|
8161 |
+
edit_main_tr5.setAttribute("valing", "top");
|
8162 |
+
|
8163 |
+
var edit_main_tr6 = document.createElement('tr');
|
8164 |
+
edit_main_tr6.setAttribute("valing", "top");
|
8165 |
+
var edit_main_tr7 = document.createElement('tr');
|
8166 |
+
edit_main_tr7.setAttribute("valing", "top");
|
8167 |
+
|
8168 |
+
var edit_main_tr8 = document.createElement('tr');
|
8169 |
+
edit_main_tr8.setAttribute("valing", "top");
|
8170 |
+
|
8171 |
+
var edit_main_tr9 = document.createElement('tr');
|
8172 |
+
edit_main_tr9.setAttribute("valing", "top");
|
8173 |
+
|
8174 |
+
var edit_main_td1 = document.createElement('td');
|
8175 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
8176 |
+
var edit_main_td1_1 = document.createElement('td');
|
8177 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
8178 |
+
var edit_main_td2 = document.createElement('td');
|
8179 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
8180 |
+
var edit_main_td2_1 = document.createElement('td');
|
8181 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
8182 |
+
|
8183 |
+
var edit_main_td3 = document.createElement('td');
|
8184 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
8185 |
+
var edit_main_td3_1 = document.createElement('td');
|
8186 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
8187 |
+
var edit_main_td4 = document.createElement('td');
|
8188 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
8189 |
+
var edit_main_td4_1 = document.createElement('td');
|
8190 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
8191 |
+
|
8192 |
+
var edit_main_td5 = document.createElement('td');
|
8193 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
8194 |
+
var edit_main_td5_1 = document.createElement('td');
|
8195 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
8196 |
+
|
8197 |
+
var edit_main_td6 = document.createElement('td');
|
8198 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
8199 |
+
var edit_main_td6_1 = document.createElement('td');
|
8200 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
8201 |
+
var edit_main_td7 = document.createElement('td');
|
8202 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
8203 |
+
var edit_main_td7_1 = document.createElement('td');
|
8204 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
8205 |
+
var edit_main_td8 = document.createElement('td');
|
8206 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
8207 |
+
var edit_main_td8_1 = document.createElement('td');
|
8208 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
8209 |
+
|
8210 |
+
var edit_main_td9 = document.createElement('td');
|
8211 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
8212 |
+
var edit_main_td9_1 = document.createElement('td');
|
8213 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
8214 |
+
|
8215 |
+
var el_label_label = document.createElement('label');
|
8216 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8217 |
+
el_label_label.innerHTML = "Field label";
|
8218 |
+
|
8219 |
+
var el_label_textarea = document.createElement('textarea');
|
8220 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
8221 |
+
el_label_textarea.setAttribute("rows", "4");
|
8222 |
+
el_label_textarea.style.cssText = "width:200px";
|
8223 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
8224 |
+
el_label_textarea.innerHTML = w_field_label;
|
8225 |
+
|
8226 |
+
var el_label_position_label = document.createElement('label');
|
8227 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8228 |
+
el_label_position_label.innerHTML = "Field label position";
|
8229 |
+
|
8230 |
+
var el_label_position1 = document.createElement('input');
|
8231 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
8232 |
+
el_label_position1.setAttribute("type", "radio");
|
8233 |
+
el_label_position1.setAttribute("value", "left");
|
8234 |
+
|
8235 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
8236 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
8237 |
+
Left = document.createTextNode("Left");
|
8238 |
+
|
8239 |
+
var el_label_position2 = document.createElement('input');
|
8240 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
8241 |
+
el_label_position2.setAttribute("type", "radio");
|
8242 |
+
el_label_position2.setAttribute("value", "top");
|
8243 |
+
|
8244 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
8245 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
8246 |
+
Top = document.createTextNode("Top");
|
8247 |
+
|
8248 |
+
if(w_field_label_pos=="top")
|
8249 |
+
el_label_position2.setAttribute("checked", "checked");
|
8250 |
+
else
|
8251 |
+
el_label_position1.setAttribute("checked", "checked");
|
8252 |
+
|
8253 |
+
var el_size_label = document.createElement('label');
|
8254 |
+
el_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8255 |
+
el_size_label.innerHTML = "Field size(px) ";
|
8256 |
+
var el_size = document.createElement('input');
|
8257 |
+
el_size.setAttribute("id", "edit_for_input_size");
|
8258 |
+
el_size.setAttribute("type", "text");
|
8259 |
+
el_size.setAttribute("value", w_size);
|
8260 |
+
|
8261 |
+
el_size.setAttribute("name", "edit_for_size");
|
8262 |
+
el_size.setAttribute("onKeyPress", "return check_isnum(event)");
|
8263 |
+
el_size.setAttribute("onKeyUp", "change_w_style('"+i+"_elementform_id_temp', this.value)");
|
8264 |
+
|
8265 |
+
var el_first_value_label = document.createElement('label');
|
8266 |
+
el_first_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8267 |
+
el_first_value_label.innerHTML = "Value if empty";
|
8268 |
+
|
8269 |
+
var el_first_value_input = document.createElement('input');
|
8270 |
+
el_first_value_input.setAttribute("id", "el_first_value_input");
|
8271 |
+
el_first_value_input.setAttribute("type", "text");
|
8272 |
+
el_first_value_input.setAttribute("value", w_title);
|
8273 |
+
el_first_value_input.style.cssText = "width:150px;";
|
8274 |
+
el_first_value_input.setAttribute("onKeyUp", "change_input_value(this.value,'"+i+"_elementform_id_temp')");
|
8275 |
+
|
8276 |
+
var el_style_label = document.createElement('label');
|
8277 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8278 |
+
el_style_label.innerHTML = "Class name";
|
8279 |
+
|
8280 |
+
var el_style_textarea = document.createElement('input');
|
8281 |
+
el_style_textarea.setAttribute("id", "element_style");
|
8282 |
+
el_style_textarea.setAttribute("type", "text");
|
8283 |
+
el_style_textarea.setAttribute("value", w_class);
|
8284 |
+
el_style_textarea.style.cssText = "width:200px;";
|
8285 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
8286 |
+
|
8287 |
+
|
8288 |
+
var el_send_label = document.createElement('label');
|
8289 |
+
el_send_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8290 |
+
el_send_label.innerHTML = "Send mail to submitter ";
|
8291 |
+
|
8292 |
+
var el_send = document.createElement('input');
|
8293 |
+
el_send.setAttribute("id", "el_send");
|
8294 |
+
el_send.setAttribute("type", "checkbox");
|
8295 |
+
el_send.setAttribute("value", "yes");
|
8296 |
+
el_send.setAttribute("onclick", "set_send('"+i+"_sendform_id_temp')");
|
8297 |
+
if(w_send=="yes")
|
8298 |
+
|
8299 |
+
el_send.setAttribute("checked", "checked");
|
8300 |
+
|
8301 |
+
|
8302 |
+
|
8303 |
+
|
8304 |
+
|
8305 |
+
var el_required_label = document.createElement('label');
|
8306 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8307 |
+
el_required_label.innerHTML = "Required";
|
8308 |
+
|
8309 |
+
var el_required = document.createElement('input');
|
8310 |
+
el_required.setAttribute("id", "el_send");
|
8311 |
+
el_required.setAttribute("type", "checkbox");
|
8312 |
+
el_required.setAttribute("value", "yes");
|
8313 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
8314 |
+
if(w_required=="yes")
|
8315 |
+
|
8316 |
+
el_required.setAttribute("checked", "checked");
|
8317 |
+
|
8318 |
+
var el_unique_label = document.createElement('label');
|
8319 |
+
el_unique_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8320 |
+
el_unique_label.innerHTML = "Allow only unique values";
|
8321 |
+
|
8322 |
+
var el_unique = document.createElement('input');
|
8323 |
+
el_unique.setAttribute("id", "el_send");
|
8324 |
+
el_unique.setAttribute("type", "checkbox");
|
8325 |
+
el_unique.setAttribute("value", "yes");
|
8326 |
+
el_unique.setAttribute("onclick", "set_unique('"+i+"_uniqueform_id_temp')");
|
8327 |
+
if(w_unique=="yes")
|
8328 |
+
el_unique.setAttribute("checked", "checked");
|
8329 |
+
|
8330 |
+
var el_attr_label = document.createElement('label');
|
8331 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8332 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
8333 |
+
var el_attr_add = document.createElement('img');
|
8334 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
8335 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
8336 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
8337 |
+
el_attr_add.setAttribute("title", 'add');
|
8338 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_text')");
|
8339 |
+
var el_attr_table = document.createElement('table');
|
8340 |
+
el_attr_table.setAttribute("id", 'attributes');
|
8341 |
+
el_attr_table.setAttribute("border", '0');
|
8342 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
8343 |
+
var el_attr_tr_label = document.createElement('tr');
|
8344 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
8345 |
+
var el_attr_td_name_label = document.createElement('th');
|
8346 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
8347 |
+
var el_attr_td_value_label = document.createElement('th');
|
8348 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
8349 |
+
var el_attr_td_X_label = document.createElement('th');
|
8350 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
8351 |
+
var el_attr_name_label = document.createElement('label');
|
8352 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
8353 |
+
el_attr_name_label.innerHTML = "Name";
|
8354 |
+
|
8355 |
+
var el_attr_value_label = document.createElement('label');
|
8356 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
8357 |
+
el_attr_value_label.innerHTML = "Value";
|
8358 |
+
|
8359 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
8360 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
8361 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
8362 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
8363 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
8364 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
8365 |
+
|
8366 |
+
n=w_attr_name.length;
|
8367 |
+
for(j=1; j<=n; j++)
|
8368 |
+
{
|
8369 |
+
var el_attr_tr = document.createElement('tr');
|
8370 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
8371 |
+
el_attr_tr.setAttribute("idi", j);
|
8372 |
+
var el_attr_td_name = document.createElement('td');
|
8373 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
8374 |
+
var el_attr_td_value = document.createElement('td');
|
8375 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
8376 |
+
|
8377 |
+
var el_attr_td_X = document.createElement('td');
|
8378 |
+
var el_attr_name = document.createElement('input');
|
8379 |
+
|
8380 |
+
el_attr_name.setAttribute("type", "text");
|
8381 |
+
|
8382 |
+
el_attr_name.style.cssText = "width:100px";
|
8383 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
8384 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
8385 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_text')");
|
8386 |
+
|
8387 |
+
var el_attr_value = document.createElement('input');
|
8388 |
+
|
8389 |
+
el_attr_value.setAttribute("type", "text");
|
8390 |
+
|
8391 |
+
el_attr_value.style.cssText = "width:100px";
|
8392 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
8393 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
8394 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_text')");
|
8395 |
+
|
8396 |
+
var el_attr_remove = document.createElement('img');
|
8397 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
8398 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
8399 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
8400 |
+
el_attr_remove.setAttribute("align", 'top');
|
8401 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_text')");
|
8402 |
+
el_attr_table.appendChild(el_attr_tr);
|
8403 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
8404 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
8405 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
8406 |
+
el_attr_td_name.appendChild(el_attr_name);
|
8407 |
+
el_attr_td_value.appendChild(el_attr_value);
|
8408 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
8409 |
+
|
8410 |
+
}
|
8411 |
+
|
8412 |
+
var t = document.getElementById('edit_table');
|
8413 |
+
|
8414 |
+
var br = document.createElement('br');
|
8415 |
+
var br1 = document.createElement('br');
|
8416 |
+
var br2 = document.createElement('br');
|
8417 |
+
var br3 = document.createElement('br');
|
8418 |
+
var br4 = document.createElement('br');
|
8419 |
+
var br5 = document.createElement('br');
|
8420 |
+
var br6 = document.createElement('br');
|
8421 |
+
|
8422 |
+
edit_main_td1.appendChild(el_label_label);
|
8423 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
8424 |
+
|
8425 |
+
edit_main_td2.appendChild(el_label_position_label);
|
8426 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
8427 |
+
edit_main_td2_1.appendChild(Left);
|
8428 |
+
edit_main_td2_1.appendChild(br2);
|
8429 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
8430 |
+
edit_main_td2_1.appendChild(Top);
|
8431 |
+
|
8432 |
+
edit_main_td3.appendChild(el_size_label);
|
8433 |
+
edit_main_td3_1.appendChild(el_size);
|
8434 |
+
|
8435 |
+
edit_main_td4.appendChild(el_first_value_label);
|
8436 |
+
edit_main_td4_1.appendChild(el_first_value_input);
|
8437 |
+
|
8438 |
+
edit_main_td5.appendChild(el_style_label);
|
8439 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
8440 |
+
|
8441 |
+
edit_main_td6.appendChild(el_send_label);
|
8442 |
+
edit_main_td6_1.appendChild(el_send);
|
8443 |
+
|
8444 |
+
edit_main_td7.appendChild(el_required_label);
|
8445 |
+
edit_main_td7_1.appendChild(el_required);
|
8446 |
+
|
8447 |
+
edit_main_td9.appendChild(el_unique_label);
|
8448 |
+
edit_main_td9_1.appendChild(el_unique);
|
8449 |
+
|
8450 |
+
edit_main_td8.appendChild(el_attr_label);
|
8451 |
+
edit_main_td8.appendChild(el_attr_add);
|
8452 |
+
edit_main_td8.appendChild(br4);
|
8453 |
+
edit_main_td8.appendChild(el_attr_table);
|
8454 |
+
edit_main_td8.setAttribute("colspan", "2");
|
8455 |
+
|
8456 |
+
/* edit_main_td5.appendChild(el_guidelines_label);
|
8457 |
+
edit_main_td5.appendChild(br4);
|
8458 |
+
edit_main_td5.appendChild(el_guidelines_textarea);
|
8459 |
+
*/
|
8460 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
8461 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
8462 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
8463 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
8464 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
8465 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
8466 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
8467 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
8468 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
8469 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
8470 |
+
|
8471 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
8472 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
8473 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
8474 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
8475 |
+
edit_main_tr9.appendChild(edit_main_td9);
|
8476 |
+
edit_main_tr9.appendChild(edit_main_td9_1);
|
8477 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
8478 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
8479 |
+
edit_main_table.appendChild(edit_main_tr1);
|
8480 |
+
edit_main_table.appendChild(edit_main_tr2);
|
8481 |
+
edit_main_table.appendChild(edit_main_tr3);
|
8482 |
+
edit_main_table.appendChild(edit_main_tr4);
|
8483 |
+
edit_main_table.appendChild(edit_main_tr5);
|
8484 |
+
|
8485 |
+
edit_main_table.appendChild(edit_main_tr6);
|
8486 |
+
edit_main_table.appendChild(edit_main_tr7);
|
8487 |
+
edit_main_table.appendChild(edit_main_tr9);
|
8488 |
+
edit_main_table.appendChild(edit_main_tr8);
|
8489 |
+
edit_div.appendChild(edit_main_table);
|
8490 |
+
|
8491 |
+
t.appendChild(edit_div);
|
8492 |
+
add_id_and_name(i, 'type_text');
|
8493 |
+
|
8494 |
+
//show table
|
8495 |
|
8496 |
+
element='input'; type='text';
|
8497 |
+
var adding_type = document.createElement("input");
|
8498 |
+
adding_type.setAttribute("type", "hidden");
|
8499 |
+
adding_type.setAttribute("value", "type_submitter_mail");
|
8500 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
8501 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
8502 |
+
|
8503 |
+
var adding_required = document.createElement("input");
|
8504 |
+
adding_required.setAttribute("type", "hidden");
|
8505 |
+
adding_required.setAttribute("value", w_required);
|
8506 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
8507 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
8508 |
+
|
8509 |
+
var adding_send = document.createElement("input");
|
8510 |
+
adding_send.setAttribute("type", "hidden");
|
8511 |
+
adding_send.setAttribute("value", w_send);
|
8512 |
+
adding_send.setAttribute("name", i+"_sendform_id_temp");
|
8513 |
+
adding_send.setAttribute("id", i+"_sendform_id_temp");
|
8514 |
+
|
8515 |
+
var adding_unique= document.createElement("input");
|
8516 |
+
adding_unique.setAttribute("type", "hidden");
|
8517 |
+
adding_unique.setAttribute("value", w_unique);
|
8518 |
+
adding_unique.setAttribute("name", i+"_uniqueform_id_temp");
|
8519 |
+
adding_unique.setAttribute("id", i+"_uniqueform_id_temp");
|
8520 |
+
|
8521 |
+
var adding = document.createElement(element);
|
8522 |
+
adding.setAttribute("type", type);
|
8523 |
+
|
8524 |
+
|
8525 |
+
if(w_title==w_first_val)
|
8526 |
+
{
|
8527 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
8528 |
+
adding.setAttribute("class", "input_deactive");
|
8529 |
+
}
|
8530 |
+
else
|
8531 |
+
{
|
8532 |
+
adding.style.cssText = "width:"+w_size+"px;";
|
8533 |
+
adding.setAttribute("class", "input_active");
|
8534 |
+
}
|
8535 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
8536 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
8537 |
+
adding.setAttribute("value", w_first_val);
|
8538 |
+
adding.setAttribute("title", w_title);
|
8539 |
+
|
8540 |
+
adding.setAttribute("onFocus", "delete_value('"+i+"_elementform_id_temp')");
|
8541 |
+
adding.setAttribute("onBlur", "return_value('"+i+"_elementform_id_temp')");
|
8542 |
+
adding.setAttribute("onChange", "change_value('"+i+"_elementform_id_temp')");
|
8543 |
+
|
8544 |
+
|
8545 |
+
var div = document.createElement('div');
|
8546 |
+
div.setAttribute("id", "main_div");
|
8547 |
+
|
8548 |
+
var table = document.createElement('table');
|
8549 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
8550 |
+
|
8551 |
+
var tr = document.createElement('tr');
|
8552 |
+
|
8553 |
+
var td1 = document.createElement('td');
|
8554 |
+
td1.setAttribute("valign", 'middle');
|
8555 |
+
td1.setAttribute("align", 'left');
|
8556 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
8557 |
+
|
8558 |
+
var td2 = document.createElement('td');
|
8559 |
+
td2.setAttribute("valign", 'middle');
|
8560 |
+
td2.setAttribute("align", 'left');
|
8561 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
8562 |
+
|
8563 |
+
var br1 = document.createElement('br');
|
8564 |
+
var br2 = document.createElement('br');
|
8565 |
+
var br3 = document.createElement('br');
|
8566 |
+
var br4 = document.createElement('br');
|
8567 |
+
|
8568 |
|
8569 |
+
|
8570 |
+
var label = document.createElement('span');
|
8571 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
8572 |
+
label.innerHTML = w_field_label;
|
8573 |
+
label.setAttribute("class", "label");
|
8574 |
+
|
8575 |
+
var required = document.createElement('span');
|
8576 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
8577 |
+
required.innerHTML = "";
|
8578 |
+
required.setAttribute("class", "required");
|
8579 |
+
if(w_required=="yes")
|
8580 |
+
required.innerHTML = " *";
|
8581 |
+
var main_td = document.getElementById('show_table');
|
8582 |
+
|
8583 |
+
td1.appendChild(label);
|
8584 |
+
td1.appendChild(required);
|
8585 |
+
td2.appendChild(adding_type);
|
8586 |
+
td2.appendChild(adding_required);
|
8587 |
+
td2.appendChild(adding_send);
|
8588 |
+
td2.appendChild(adding_unique);
|
8589 |
+
td2.appendChild(adding);
|
8590 |
+
tr.appendChild(td1);
|
8591 |
+
tr.appendChild(td2);
|
8592 |
+
table.appendChild(tr);
|
8593 |
+
|
8594 |
+
div.appendChild(table);
|
8595 |
+
div.appendChild(br3);
|
8596 |
+
main_td.appendChild(div);
|
8597 |
+
if(w_field_label_pos=="top")
|
8598 |
+
label_top(i);
|
8599 |
+
change_class(w_class, i);
|
8600 |
+
refresh_attr(i, 'type_text');
|
8601 |
}
|
8602 |
|
8603 |
+
function type_checkbox(i, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_rowcol, w_required, w_randomize, w_allow_other,w_allow_other_num, w_class, w_attr_name, w_attr_value) {
|
|
|
|
|
|
|
|
|
|
|
8604 |
|
8605 |
+
document.getElementById("element_type").value="type_checkbox";
|
|
|
|
|
|
|
|
|
|
|
8606 |
|
8607 |
+
delete_last_child();
|
8608 |
+
// edit table
|
8609 |
+
var edit_div = document.createElement('div');
|
8610 |
+
edit_div.setAttribute("id", "edit_div");
|
8611 |
+
edit_div.setAttribute("style", "padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
8612 |
+
|
8613 |
+
var edit_main_table = document.createElement('table');
|
8614 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
8615 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
8616 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
8617 |
+
|
8618 |
+
var edit_main_tr1 = document.createElement('tr');
|
8619 |
+
edit_main_tr1.setAttribute("valing", "top");
|
8620 |
+
|
8621 |
+
var edit_main_tr2 = document.createElement('tr');
|
8622 |
+
edit_main_tr2.setAttribute("valing", "top");
|
8623 |
+
|
8624 |
+
var edit_main_tr3 = document.createElement('tr');
|
8625 |
+
edit_main_tr3.setAttribute("valing", "top");
|
8626 |
+
|
8627 |
+
var edit_main_tr4 = document.createElement('tr');
|
8628 |
+
edit_main_tr4.setAttribute("valing", "top");
|
8629 |
+
|
8630 |
+
var edit_main_tr5 = document.createElement('tr');
|
8631 |
+
edit_main_tr5.setAttribute("valing", "top");
|
8632 |
+
|
8633 |
+
var edit_main_tr6 = document.createElement('tr');
|
8634 |
+
edit_main_tr6.setAttribute("valing", "top");
|
8635 |
+
var edit_main_tr7 = document.createElement('tr');
|
8636 |
+
edit_main_tr7.setAttribute("valing", "top");
|
8637 |
+
|
8638 |
+
var edit_main_tr8 = document.createElement('tr');
|
8639 |
+
edit_main_tr8.setAttribute("valing", "top");
|
8640 |
+
|
8641 |
+
var edit_main_tr9 = document.createElement('tr');
|
8642 |
+
edit_main_tr9.setAttribute("valing", "top");
|
8643 |
+
var edit_main_tr10 = document.createElement('tr');
|
8644 |
+
edit_main_tr10.setAttribute("valing", "top");
|
8645 |
+
var edit_main_td1 = document.createElement('td');
|
8646 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
8647 |
+
var edit_main_td1_1 = document.createElement('td');
|
8648 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
8649 |
+
var edit_main_td2 = document.createElement('td');
|
8650 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
8651 |
+
var edit_main_td2_1 = document.createElement('td');
|
8652 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
8653 |
+
|
8654 |
+
var edit_main_td3 = document.createElement('td');
|
8655 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
8656 |
+
var edit_main_td3_1 = document.createElement('td');
|
8657 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
8658 |
+
|
8659 |
+
|
8660 |
+
var edit_main_td4 = document.createElement('td');
|
8661 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
8662 |
+
var edit_main_td4_1 = document.createElement('td');
|
8663 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
8664 |
+
edit_main_td4.setAttribute("id", "choices");
|
8665 |
+
var edit_main_td5 = document.createElement('td');
|
8666 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
8667 |
+
var edit_main_td5_1 = document.createElement('td');
|
8668 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
8669 |
+
|
8670 |
+
var edit_main_td6 = document.createElement('td');
|
8671 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
8672 |
+
var edit_main_td6_1 = document.createElement('td');
|
8673 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
8674 |
+
|
8675 |
+
var edit_main_td7 = document.createElement('td');
|
8676 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
8677 |
+
var edit_main_td7_1 = document.createElement('td');
|
8678 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
8679 |
+
|
8680 |
+
var edit_main_td8 = document.createElement('td');
|
8681 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
8682 |
+
var edit_main_td8_1 = document.createElement('td');
|
8683 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
8684 |
+
|
8685 |
+
var edit_main_td9 = document.createElement('td');
|
8686 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
8687 |
+
var edit_main_td9_1 = document.createElement('td');
|
8688 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
8689 |
+
var edit_main_td10 = document.createElement('td');
|
8690 |
+
edit_main_td10.style.cssText = "padding-top:10px";
|
8691 |
+
var edit_main_td10_1 = document.createElement('td');
|
8692 |
+
edit_main_td10_1.style.cssText = "padding-top:10px";
|
8693 |
+
|
8694 |
+
var el_label_label = document.createElement('label');
|
8695 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8696 |
+
el_label_label.innerHTML = "Field label";
|
8697 |
+
|
8698 |
+
var el_label_textarea = document.createElement('textarea');
|
8699 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
8700 |
+
el_label_textarea.setAttribute("rows", "4");
|
8701 |
+
el_label_textarea.style.cssText = "width:200px;";
|
8702 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
8703 |
+
el_label_textarea.innerHTML = w_field_label;
|
8704 |
+
|
8705 |
+
var el_label_position_label = document.createElement('label');
|
8706 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8707 |
+
el_label_position_label.innerHTML = "Field label position";
|
8708 |
+
|
8709 |
+
var el_label_position1 = document.createElement('input');
|
8710 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
8711 |
+
el_label_position1.setAttribute("type", "radio");
|
8712 |
+
el_label_position1.setAttribute("value", "left");
|
8713 |
+
|
8714 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
8715 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
8716 |
+
Left = document.createTextNode("Left");
|
8717 |
+
|
8718 |
+
var el_label_position2 = document.createElement('input');
|
8719 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
8720 |
+
el_label_position2.setAttribute("type", "radio");
|
8721 |
+
el_label_position2.setAttribute("value", "top");
|
8722 |
+
|
8723 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
8724 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
8725 |
+
Top = document.createTextNode("Top");
|
8726 |
+
|
8727 |
+
if(w_field_label_pos=="top")
|
8728 |
+
|
8729 |
+
el_label_position2.setAttribute("checked", "checked");
|
8730 |
+
else
|
8731 |
+
el_label_position1.setAttribute("checked", "checked");
|
8732 |
+
var el_label_flow = document.createElement('label');
|
8733 |
+
el_label_flow.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8734 |
+
el_label_flow.innerHTML = "Relative Position";
|
8735 |
+
|
8736 |
+
var el_flow_vertical = document.createElement('input');
|
8737 |
+
el_flow_vertical.setAttribute("id", "edit_for_flow_vertical");
|
8738 |
+
el_flow_vertical.setAttribute("type", "radio");
|
8739 |
+
el_flow_vertical.setAttribute("value", "ver");
|
8740 |
+
el_flow_vertical.setAttribute("name", "edit_for_flow");
|
8741 |
+
el_flow_vertical.setAttribute("onchange", "refresh_rowcol("+i+",'checkbox')");
|
8742 |
+
Vertical = document.createTextNode("Vertical");
|
8743 |
+
|
8744 |
+
var el_flow_horizontal = document.createElement('input');
|
8745 |
+
el_flow_horizontal.setAttribute("id", "edit_for_flow_horizontal");
|
8746 |
+
el_flow_horizontal.setAttribute("type", "radio");
|
8747 |
+
el_flow_horizontal.setAttribute("value", "hor");
|
8748 |
+
el_flow_horizontal.setAttribute("name", "edit_for_flow");
|
8749 |
+
el_flow_horizontal.setAttribute("onchange", "refresh_rowcol("+i+",'checkbox')");
|
8750 |
+
Horizontal = document.createTextNode("Horizontal");
|
8751 |
+
|
8752 |
+
if(w_flow=="hor")
|
8753 |
+
el_flow_horizontal.setAttribute("checked", "checked");
|
8754 |
+
else
|
8755 |
+
el_flow_vertical.setAttribute("checked", "checked");
|
8756 |
+
var el_rowcol_label = document.createElement('label');
|
8757 |
+
el_rowcol_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8758 |
+
el_rowcol_label.innerHTML = "Rows/Columns";
|
8759 |
+
|
8760 |
+
var el_rowcol_textarea = document.createElement('input');
|
8761 |
+
el_rowcol_textarea.setAttribute("id", "edit_for_rowcol");
|
8762 |
+
el_rowcol_textarea.setAttribute("type", "text");
|
8763 |
+
el_rowcol_textarea.setAttribute("value", w_rowcol);
|
8764 |
+
el_rowcol_textarea.style.cssText = "width:200px;";
|
8765 |
+
el_rowcol_textarea.setAttribute("onChange", "refresh_rowcol('"+i+"','checkbox')");
|
8766 |
+
|
8767 |
+
var el_style_label = document.createElement('label');
|
8768 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8769 |
+
el_style_label.innerHTML = "Class name";
|
8770 |
+
|
8771 |
+
var el_style_textarea = document.createElement('input');
|
8772 |
+
el_style_textarea.setAttribute("id", "element_style");
|
8773 |
+
el_style_textarea.setAttribute("type", "text");
|
8774 |
+
el_style_textarea.setAttribute("value", w_class);
|
8775 |
+
el_style_textarea.style.cssText = "width:200px;";
|
8776 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
8777 |
+
|
8778 |
+
var el_required_label = document.createElement('label');
|
8779 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8780 |
+
el_required_label.innerHTML = "Required";
|
8781 |
+
|
8782 |
+
var el_required = document.createElement('input');
|
8783 |
+
el_required.setAttribute("id", "el_send");
|
8784 |
+
el_required.setAttribute("type", "checkbox");
|
8785 |
+
el_required.setAttribute("value", "yes");
|
8786 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
8787 |
+
if(w_required=="yes")
|
8788 |
+
|
8789 |
+
el_required.setAttribute("checked", "checked");
|
8790 |
+
|
8791 |
+
|
8792 |
+
|
8793 |
+
var el_randomize_label = document.createElement('label');
|
8794 |
+
el_randomize_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8795 |
+
el_randomize_label.innerHTML = "Randomize in frontend";
|
8796 |
+
|
8797 |
+
var el_randomize = document.createElement('input');
|
8798 |
+
el_randomize.setAttribute("id", "el_randomize");
|
8799 |
+
el_randomize.setAttribute("type", "checkbox");
|
8800 |
+
el_randomize.setAttribute("value", "yes");
|
8801 |
+
el_randomize.setAttribute("onclick", "set_randomize('"+i+"_randomizeform_id_temp')");
|
8802 |
+
if(w_randomize=="yes")
|
8803 |
+
el_randomize.setAttribute("checked", "checked");
|
8804 |
+
|
8805 |
+
var el_allow_other_label = document.createElement('label');
|
8806 |
+
el_allow_other_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8807 |
+
el_allow_other_label.innerHTML = "Allow other";
|
8808 |
+
|
8809 |
+
var el_allow_other = document.createElement('input');
|
8810 |
+
el_allow_other.setAttribute("id", "el_allow_other");
|
8811 |
+
el_allow_other.setAttribute("type", "checkbox");
|
8812 |
+
el_allow_other.setAttribute("value", "yes");
|
8813 |
+
el_allow_other.setAttribute("onclick", "set_allow_other('"+i+"','checkbox')");
|
8814 |
+
if(w_allow_other=="yes")
|
8815 |
+
el_allow_other.setAttribute("checked", "checked");
|
8816 |
+
|
8817 |
+
|
8818 |
+
|
8819 |
+
|
8820 |
+
|
8821 |
+
var el_attr_label = document.createElement('label');
|
8822 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8823 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
8824 |
+
var el_attr_add = document.createElement('img');
|
8825 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
8826 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
8827 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
8828 |
+
el_attr_add.setAttribute("title", 'add');
|
8829 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_checkbox')");
|
8830 |
+
var el_attr_table = document.createElement('table');
|
8831 |
+
el_attr_table.setAttribute("id", 'attributes');
|
8832 |
+
el_attr_table.setAttribute("border", '0');
|
8833 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
8834 |
+
var el_attr_tr_label = document.createElement('tr');
|
8835 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
8836 |
+
var el_attr_td_name_label = document.createElement('th');
|
8837 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
8838 |
+
var el_attr_td_value_label = document.createElement('th');
|
8839 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
8840 |
+
var el_attr_td_X_label = document.createElement('th');
|
8841 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
8842 |
+
var el_attr_name_label = document.createElement('label');
|
8843 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
8844 |
+
el_attr_name_label.innerHTML = "Name";
|
8845 |
+
|
8846 |
+
var el_attr_value_label = document.createElement('label');
|
8847 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
8848 |
+
el_attr_value_label.innerHTML = "Value";
|
8849 |
+
|
8850 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
8851 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
8852 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
8853 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
8854 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
8855 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
8856 |
+
|
8857 |
+
n=w_attr_name.length;
|
8858 |
+
for(j=1; j<=n; j++)
|
8859 |
+
{
|
8860 |
+
var el_attr_tr = document.createElement('tr');
|
8861 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
8862 |
+
el_attr_tr.setAttribute("idi", j);
|
8863 |
+
var el_attr_td_name = document.createElement('td');
|
8864 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
8865 |
+
var el_attr_td_value = document.createElement('td');
|
8866 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
8867 |
+
|
8868 |
+
var el_attr_td_X = document.createElement('td');
|
8869 |
+
var el_attr_name = document.createElement('input');
|
8870 |
+
|
8871 |
+
el_attr_name.setAttribute("type", "text");
|
8872 |
+
|
8873 |
+
el_attr_name.style.cssText = "width:100px";
|
8874 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
8875 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
8876 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_checkbox')");
|
8877 |
+
|
8878 |
+
var el_attr_value = document.createElement('input');
|
8879 |
+
|
8880 |
+
el_attr_value.setAttribute("type", "text");
|
8881 |
+
el_attr_value.style.cssText = "width:100px";
|
8882 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
8883 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
8884 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_checkbox')");
|
8885 |
+
|
8886 |
+
var el_attr_remove = document.createElement('img');
|
8887 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
8888 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
8889 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
8890 |
+
el_attr_remove.setAttribute("align", 'top');
|
8891 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_checkbox')");
|
8892 |
+
el_attr_table.appendChild(el_attr_tr);
|
8893 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
8894 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
8895 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
8896 |
+
el_attr_td_name.appendChild(el_attr_name);
|
8897 |
+
el_attr_td_value.appendChild(el_attr_value);
|
8898 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
8899 |
+
|
8900 |
+
}
|
8901 |
+
|
8902 |
+
var el_choices_label = document.createElement('label');
|
8903 |
+
el_choices_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
8904 |
+
el_choices_label.innerHTML = "Options ";
|
8905 |
+
var el_choices_add = document.createElement('img');
|
8906 |
+
el_choices_add.setAttribute("id", "el_choices_add");
|
8907 |
+
el_choices_add.setAttribute("src", plugin_url+'/images/add.png');
|
8908 |
+
el_choices_add.style.cssText = 'cursor:pointer;';
|
8909 |
+
el_choices_add.setAttribute("title", 'add');
|
8910 |
+
el_choices_add.setAttribute("onClick", "add_choise('checkbox',"+i+")");
|
8911 |
+
|
8912 |
+
var t = document.getElementById('edit_table');
|
8913 |
+
|
8914 |
+
var br = document.createElement('br');
|
8915 |
+
var br1 = document.createElement('br');
|
8916 |
+
var br2 = document.createElement('br');
|
8917 |
+
var br3 = document.createElement('br');
|
8918 |
+
var br4 = document.createElement('br');
|
8919 |
+
var br5 = document.createElement('br');
|
8920 |
+
var br6 = document.createElement('br');
|
8921 |
+
|
8922 |
+
edit_main_td1.appendChild(el_label_label);
|
8923 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
8924 |
+
|
8925 |
+
edit_main_td2.appendChild(el_label_position_label);
|
8926 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
8927 |
+
edit_main_td2_1.appendChild(Left);
|
8928 |
+
edit_main_td2_1.appendChild(br2);
|
8929 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
8930 |
+
edit_main_td2_1.appendChild(Top);
|
8931 |
+
|
8932 |
+
edit_main_td3.appendChild(el_label_flow);
|
8933 |
+
edit_main_td3_1.appendChild(el_flow_vertical);
|
8934 |
+
edit_main_td3_1.appendChild(Vertical);
|
8935 |
+
edit_main_td3_1.appendChild(br4);
|
8936 |
+
edit_main_td3_1.appendChild(el_flow_horizontal);
|
8937 |
+
edit_main_td3_1.appendChild(Horizontal);
|
8938 |
+
|
8939 |
+
edit_main_td5.appendChild(el_required_label);
|
8940 |
+
edit_main_td5_1.appendChild(el_required);
|
8941 |
+
|
8942 |
+
edit_main_td8.appendChild(el_randomize_label);
|
8943 |
+
edit_main_td8_1.appendChild(el_randomize);
|
8944 |
+
|
8945 |
+
edit_main_td9.appendChild(el_allow_other_label);
|
8946 |
+
edit_main_td9_1.appendChild(el_allow_other);
|
8947 |
+
edit_main_td10.appendChild(el_rowcol_label);
|
8948 |
+
edit_main_td10_1.appendChild(el_rowcol_textarea);
|
8949 |
+
|
8950 |
+
edit_main_td6.appendChild(el_style_label);
|
8951 |
+
edit_main_td6_1.appendChild(el_style_textarea);
|
8952 |
+
|
8953 |
+
edit_main_td7.appendChild(el_attr_label);
|
8954 |
+
edit_main_td7.appendChild(el_attr_add);
|
8955 |
+
edit_main_td7.appendChild(br6);
|
8956 |
+
edit_main_td7.appendChild(el_attr_table);
|
8957 |
+
edit_main_td7.setAttribute("colspan", "2");
|
8958 |
+
|
8959 |
+
edit_main_td4.appendChild(el_choices_label);
|
8960 |
+
edit_main_td4_1.appendChild(el_choices_add);
|
8961 |
+
|
8962 |
+
n=w_choices.length;
|
8963 |
+
for(j=0; j<n; j++)
|
8964 |
+
{
|
8965 |
+
var br = document.createElement('br');
|
8966 |
+
br.setAttribute("id", "br"+j);
|
8967 |
+
|
8968 |
+
var el_choices = document.createElement('input');
|
8969 |
+
el_choices.setAttribute("id", "el_choices"+j);
|
8970 |
+
el_choices.setAttribute("type", "text");
|
8971 |
+
if (w_allow_other == "yes" && j == w_allow_other_num) {
|
8972 |
+
el_choices.setAttribute("other", '1');
|
8973 |
+
}
|
8974 |
+
el_choices.setAttribute("value", w_choices[j]);
|
8975 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
8976 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+i+"_label_element"+j+"', this.value); change_in_value('"+i+"_elementform_id_temp"+j+"', this.value)");
|
8977 |
+
|
8978 |
+
var el_choices_remove = document.createElement('img');
|
8979 |
+
el_choices_remove.setAttribute("id", "el_choices"+j+"_remove");
|
8980 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
8981 |
+
if(w_allow_other=="yes" && j==w_allow_other_num)
|
8982 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px; display:none';
|
8983 |
+
else
|
8984 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
8985 |
+
el_choices_remove.setAttribute("align", 'top');
|
8986 |
+
el_choices_remove.setAttribute("onClick", "remove_choise("+j+","+i+",'checkbox')");
|
8987 |
+
|
8988 |
+
edit_main_td4.appendChild(br);
|
8989 |
+
edit_main_td4.appendChild(el_choices);
|
8990 |
+
edit_main_td4.appendChild(el_choices_remove);
|
8991 |
+
|
8992 |
+
}
|
8993 |
+
|
8994 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
8995 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
8996 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
8997 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
8998 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
8999 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
9000 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
9001 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
9002 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
9003 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
9004 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
9005 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
9006 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
9007 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
9008 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
9009 |
+
edit_main_tr9.appendChild(edit_main_td9);
|
9010 |
+
edit_main_tr9.appendChild(edit_main_td9_1);
|
9011 |
+
edit_main_tr10.appendChild(edit_main_td10);
|
9012 |
+
edit_main_tr10.appendChild(edit_main_td10_1);
|
9013 |
+
edit_main_table.appendChild(edit_main_tr1);
|
9014 |
+
edit_main_table.appendChild(edit_main_tr2);
|
9015 |
+
edit_main_table.appendChild(edit_main_tr3);
|
9016 |
+
edit_main_table.appendChild(edit_main_tr10);
|
9017 |
+
edit_main_table.appendChild(edit_main_tr6);
|
9018 |
+
edit_main_table.appendChild(edit_main_tr5);
|
9019 |
+
edit_main_table.appendChild(edit_main_tr8);
|
9020 |
+
edit_main_table.appendChild(edit_main_tr9);
|
9021 |
+
edit_main_table.appendChild(edit_main_tr4);
|
9022 |
+
edit_main_table.appendChild(edit_main_tr7);
|
9023 |
+
edit_div.appendChild(edit_main_table);
|
9024 |
+
|
9025 |
+
t.appendChild(edit_div);
|
9026 |
+
|
9027 |
+
//show table
|
9028 |
|
9029 |
+
element='input'; type='checkbox';
|
9030 |
+
var adding_type = document.createElement("input");
|
9031 |
+
adding_type.setAttribute("type", "hidden");
|
9032 |
+
adding_type.setAttribute("value", "type_checkbox");
|
9033 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
9034 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
9035 |
+
var adding_required = document.createElement("input");
|
9036 |
+
adding_required.setAttribute("type", "hidden");
|
9037 |
+
adding_required.setAttribute("value", w_required);
|
9038 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
9039 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
9040 |
+
|
9041 |
+
var adding_randomize = document.createElement("input");
|
9042 |
+
adding_randomize.setAttribute("type", "hidden");
|
9043 |
+
adding_randomize.setAttribute("value", w_randomize);
|
9044 |
+
adding_randomize.setAttribute("name", i+"_randomizeform_id_temp");
|
9045 |
+
adding_randomize.setAttribute("id", i+"_randomizeform_id_temp");
|
9046 |
+
|
9047 |
+
var adding_allow_other= document.createElement("input");
|
9048 |
+
adding_allow_other.setAttribute("type", "hidden");
|
9049 |
+
adding_allow_other.setAttribute("value", w_allow_other);
|
9050 |
+
adding_allow_other.setAttribute("name", i+"_allow_otherform_id_temp");
|
9051 |
+
adding_allow_other.setAttribute("id", i+"_allow_otherform_id_temp");
|
9052 |
+
|
9053 |
+
var adding_allow_other_id= document.createElement("input");
|
9054 |
+
adding_allow_other_id.setAttribute("type", "hidden");
|
9055 |
+
adding_allow_other_id.setAttribute("value", w_allow_other_num);
|
9056 |
+
adding_allow_other_id.setAttribute("name", i+"_allow_other_numform_id_temp");
|
9057 |
+
adding_allow_other_id.setAttribute("id", i+"_allow_other_numform_id_temp");
|
9058 |
+
var adding_rowcol= document.createElement("input");
|
9059 |
+
adding_rowcol.setAttribute("type", "hidden");
|
9060 |
+
adding_rowcol.setAttribute("value", w_rowcol);
|
9061 |
+
adding_rowcol.setAttribute("name", i+"_rowcol_numform_id_temp");
|
9062 |
+
adding_rowcol.setAttribute("id", i+"_rowcol_numform_id_temp");
|
9063 |
+
var div = document.createElement('div');
|
9064 |
+
div.setAttribute("id", "main_div");
|
9065 |
+
//tbody sarqac
|
9066 |
+
|
9067 |
+
|
9068 |
+
var table = document.createElement('table');
|
9069 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
9070 |
+
|
9071 |
+
var tr = document.createElement('tr');
|
9072 |
+
|
9073 |
+
var td1 = document.createElement('td');
|
9074 |
+
td1.setAttribute("valign", 'top');
|
9075 |
+
td1.setAttribute("align", 'left');
|
9076 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
9077 |
+
|
9078 |
+
var td2 = document.createElement('td');
|
9079 |
+
td2.setAttribute("valign", 'top');
|
9080 |
+
td2.setAttribute("align", 'left');
|
9081 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
9082 |
+
|
9083 |
+
var br1 = document.createElement('br');
|
9084 |
+
var br2 = document.createElement('br');
|
9085 |
+
var br3 = document.createElement('br');
|
9086 |
+
var br4 = document.createElement('br');
|
9087 |
+
// table_little -@ sarqaca tbody table_little darela table_little_t
|
9088 |
+
var table_little_t = document.createElement('table');
|
9089 |
+
|
9090 |
+
var table_little = document.createElement('tbody');
|
9091 |
+
table_little.setAttribute("id", i+"_table_little");
|
9092 |
+
table_little_t.appendChild(table_little);
|
9093 |
+
|
9094 |
+
|
9095 |
+
|
9096 |
+
var label = document.createElement('span');
|
9097 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
9098 |
+
label.innerHTML = w_field_label;
|
9099 |
+
label.setAttribute("class", "label");
|
9100 |
+
|
9101 |
+
|
9102 |
+
var required = document.createElement('span');
|
9103 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
9104 |
+
required.innerHTML = "";
|
9105 |
+
required.setAttribute("class", "required");
|
9106 |
+
if(w_required=="yes")
|
9107 |
+
required.innerHTML = " *";
|
9108 |
+
n = w_choices.length;
|
9109 |
+
aaa = false;
|
9110 |
+
var main_td = document.getElementById('show_table');
|
9111 |
+
|
9112 |
+
|
9113 |
+
td1.appendChild(label);
|
9114 |
+
td1.appendChild(required);
|
9115 |
+
td2.appendChild(adding_type);
|
9116 |
+
|
9117 |
+
td2.appendChild(adding_required);
|
9118 |
+
td2.appendChild(adding_randomize);
|
9119 |
+
td2.appendChild(adding_allow_other);
|
9120 |
+
td2.appendChild(adding_allow_other_id);
|
9121 |
+
td2.appendChild(adding_rowcol);
|
9122 |
+
td2.appendChild(table_little_t);
|
9123 |
+
tr.appendChild(td1);
|
9124 |
+
tr.appendChild(td2);
|
9125 |
+
table.appendChild(tr);
|
9126 |
+
|
9127 |
|
9128 |
+
div.appendChild(table);
|
9129 |
+
div.appendChild(br3);
|
9130 |
+
main_td.appendChild(div);
|
9131 |
+
if (w_field_label_pos == "top") {
|
9132 |
+
label_top(i);
|
9133 |
+
}
|
9134 |
+
change_class(w_class, i);
|
9135 |
+
refresh_attr(i, 'type_checkbox');
|
9136 |
+
if (aaa) {
|
9137 |
+
show_other_input(i);
|
9138 |
+
}
|
9139 |
+
refresh_rowcol(i, 'checkbox');
|
9140 |
+
add_id_and_name(i, 'type_checkbox');
|
9141 |
}
|
9142 |
|
9143 |
+
function type_radio(i, w_field_label, w_field_label_pos, w_flow, w_choices, w_choices_checked, w_rowcol, w_required, w_randomize, w_allow_other, w_allow_other_num, w_class, w_attr_name, w_attr_value ){
|
9144 |
|
9145 |
+
document.getElementById("element_type").value="type_radio";
|
9146 |
|
9147 |
+
delete_last_child();
|
9148 |
+
// edit table
|
9149 |
+
var edit_div = document.createElement('div');
|
9150 |
+
edit_div.setAttribute("id", "edit_div");
|
9151 |
+
edit_div.setAttribute("style", "padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
9152 |
+
|
9153 |
+
var edit_main_table = document.createElement('table');
|
9154 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
9155 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
9156 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
9157 |
+
|
9158 |
+
var edit_main_tr1 = document.createElement('tr');
|
9159 |
+
edit_main_tr1.setAttribute("valing", "top");
|
9160 |
+
|
9161 |
+
var edit_main_tr2 = document.createElement('tr');
|
9162 |
+
edit_main_tr2.setAttribute("valing", "top");
|
9163 |
+
|
9164 |
+
var edit_main_tr3 = document.createElement('tr');
|
9165 |
+
edit_main_tr3.setAttribute("valing", "top");
|
9166 |
+
|
9167 |
+
var edit_main_tr4 = document.createElement('tr');
|
9168 |
+
edit_main_tr4.setAttribute("valing", "top");
|
9169 |
+
|
9170 |
+
var edit_main_tr5 = document.createElement('tr');
|
9171 |
+
edit_main_tr5.setAttribute("valing", "top");
|
9172 |
+
|
9173 |
+
var edit_main_tr6 = document.createElement('tr');
|
9174 |
+
edit_main_tr6.setAttribute("valing", "top");
|
9175 |
+
|
9176 |
+
var edit_main_tr7 = document.createElement('tr');
|
9177 |
+
edit_main_tr7.setAttribute("valing", "top");
|
9178 |
+
|
9179 |
+
var edit_main_tr8 = document.createElement('tr');
|
9180 |
+
edit_main_tr8.setAttribute("valing", "top");
|
9181 |
+
|
9182 |
+
var edit_main_tr9 = document.createElement('tr');
|
9183 |
+
edit_main_tr9.setAttribute("valing", "top");
|
9184 |
+
var edit_main_tr10 = document.createElement('tr');
|
9185 |
+
edit_main_tr10.setAttribute("valing", "top");
|
9186 |
+
var edit_main_td1 = document.createElement('td');
|
9187 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
9188 |
+
var edit_main_td1_1 = document.createElement('td');
|
9189 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
9190 |
+
var edit_main_td2 = document.createElement('td');
|
9191 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
9192 |
+
var edit_main_td2_1 = document.createElement('td');
|
9193 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
9194 |
+
|
9195 |
+
var edit_main_td3 = document.createElement('td');
|
9196 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
9197 |
+
var edit_main_td3_1 = document.createElement('td');
|
9198 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
9199 |
+
|
9200 |
+
var edit_main_td4 = document.createElement('td');
|
9201 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
9202 |
+
var edit_main_td4_1 = document.createElement('td');
|
9203 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
9204 |
+
|
9205 |
+
edit_main_td4.setAttribute("id", "choices");
|
9206 |
+
|
9207 |
+
var edit_main_td5 = document.createElement('td');
|
9208 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
9209 |
+
var edit_main_td5_1 = document.createElement('td');
|
9210 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
9211 |
+
|
9212 |
+
var edit_main_td6 = document.createElement('td');
|
9213 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
9214 |
+
var edit_main_td6_1 = document.createElement('td');
|
9215 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
9216 |
+
|
9217 |
+
var edit_main_td7 = document.createElement('td');
|
9218 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
9219 |
+
var edit_main_td7_1 = document.createElement('td');
|
9220 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
9221 |
+
|
9222 |
+
var edit_main_td8 = document.createElement('td');
|
9223 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
9224 |
+
var edit_main_td8_1 = document.createElement('td');
|
9225 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
9226 |
+
|
9227 |
+
var edit_main_td9 = document.createElement('td');
|
9228 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
9229 |
+
var edit_main_td9_1 = document.createElement('td');
|
9230 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
9231 |
+
var edit_main_td10 = document.createElement('td');
|
9232 |
+
edit_main_td10.style.cssText = "padding-top:10px";
|
9233 |
+
var edit_main_td10_1 = document.createElement('td');
|
9234 |
+
edit_main_td10_1.style.cssText = "padding-top:10px";
|
9235 |
+
|
9236 |
+
var el_label_label = document.createElement('label');
|
9237 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9238 |
+
el_label_label.innerHTML = "Field label";
|
9239 |
+
|
9240 |
+
var el_label_textarea = document.createElement('textarea');
|
9241 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
9242 |
+
el_label_textarea.setAttribute("rows", "4");
|
9243 |
+
el_label_textarea.style.cssText = "width:200px;";
|
9244 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
9245 |
+
el_label_textarea.innerHTML = w_field_label;
|
9246 |
+
|
9247 |
+
var el_label_position_label = document.createElement('label');
|
9248 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9249 |
+
el_label_position_label.innerHTML = "Field label position";
|
9250 |
+
|
9251 |
+
var el_label_position1 = document.createElement('input');
|
9252 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
9253 |
+
el_label_position1.setAttribute("type", "radio");
|
9254 |
+
el_label_position1.setAttribute("value", "left");
|
9255 |
+
|
9256 |
+
|
9257 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
9258 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
9259 |
+
el_label_position1.setAttribute("checked", "checked");
|
9260 |
+
Left = document.createTextNode("Left");
|
9261 |
+
|
9262 |
+
var el_label_position2 = document.createElement('input');
|
9263 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
9264 |
+
el_label_position2.setAttribute("type", "radio");
|
9265 |
+
|
9266 |
+
el_label_position2.setAttribute("value", "top");
|
9267 |
+
|
9268 |
+
|
9269 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
9270 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
9271 |
+
Top = document.createTextNode("Top");
|
9272 |
+
|
9273 |
+
if(w_field_label_pos=="top")
|
9274 |
+
|
9275 |
+
el_label_position2.setAttribute("checked", "checked");
|
9276 |
+
else
|
9277 |
+
el_label_position1.setAttribute("checked", "checked");
|
9278 |
+
|
9279 |
+
var el_label_flow = document.createElement('label');
|
9280 |
+
el_label_flow.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9281 |
+
el_label_flow.innerHTML = "Relative Position";
|
9282 |
+
|
9283 |
+
var el_flow_vertical = document.createElement('input');
|
9284 |
+
el_flow_vertical.setAttribute("id", "edit_for_flow_vertical");
|
9285 |
+
el_flow_vertical.setAttribute("type", "radio");
|
9286 |
+
el_flow_vertical.setAttribute("value", "ver");
|
9287 |
+
el_flow_vertical.setAttribute("name", "edit_for_flow");
|
9288 |
+
el_flow_vertical.setAttribute("onchange", "refresh_rowcol("+i+",'radio')");
|
9289 |
+
Vertical = document.createTextNode("Vertical");
|
9290 |
+
|
9291 |
+
var el_flow_horizontal = document.createElement('input');
|
9292 |
+
el_flow_horizontal.setAttribute("id", "edit_for_flow_horizontal");
|
9293 |
+
el_flow_horizontal.setAttribute("type", "radio");
|
9294 |
+
el_flow_horizontal.setAttribute("value", "hor");
|
9295 |
+
el_flow_horizontal.setAttribute("name", "edit_for_flow");
|
9296 |
+
el_flow_horizontal.setAttribute("onchange", "refresh_rowcol("+i+",'radio')");
|
9297 |
+
Horizontal = document.createTextNode("Horizontal");
|
9298 |
+
|
9299 |
+
if(w_flow=="hor")
|
9300 |
+
el_flow_horizontal.setAttribute("checked", "checked");
|
9301 |
+
else
|
9302 |
+
el_flow_vertical.setAttribute("checked", "checked");
|
9303 |
+
var el_rowcol_label = document.createElement('label');
|
9304 |
+
el_rowcol_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9305 |
+
el_rowcol_label.innerHTML = "Rows/Columns";
|
9306 |
+
|
9307 |
+
var el_rowcol_textarea = document.createElement('input');
|
9308 |
+
el_rowcol_textarea.setAttribute("id", "edit_for_rowcol");
|
9309 |
+
el_rowcol_textarea.setAttribute("type", "text");
|
9310 |
+
el_rowcol_textarea.setAttribute("value", w_rowcol);
|
9311 |
+
el_rowcol_textarea.style.cssText = "width:200px;";
|
9312 |
+
el_rowcol_textarea.setAttribute("onChange", "refresh_rowcol('"+i+"','radio')");
|
9313 |
+
var el_style_label = document.createElement('label');
|
9314 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9315 |
+
el_style_label.innerHTML = "Class name";
|
9316 |
+
|
9317 |
+
var el_style_textarea = document.createElement('input');
|
9318 |
+
el_style_textarea.setAttribute("id", "element_style");
|
9319 |
+
el_style_textarea.setAttribute("type", "text");
|
9320 |
+
el_style_textarea.setAttribute("value", w_class);
|
9321 |
+
el_style_textarea.style.cssText = "width:200px;";
|
9322 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
9323 |
+
|
9324 |
+
var el_required_label = document.createElement('label');
|
9325 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9326 |
+
el_required_label.innerHTML = "Required";
|
9327 |
+
|
9328 |
+
var el_required = document.createElement('input');
|
9329 |
+
el_required.setAttribute("id", "el_send");
|
9330 |
+
el_required.setAttribute("type", "checkbox");
|
9331 |
+
el_required.setAttribute("value", "yes");
|
9332 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
9333 |
+
if(w_required=="yes")
|
9334 |
+
|
9335 |
+
el_required.setAttribute("checked", "checked");
|
9336 |
+
|
9337 |
+
|
9338 |
+
var el_randomize_label = document.createElement('label');
|
9339 |
+
el_randomize_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9340 |
+
el_randomize_label.innerHTML = "Randomize in frontend";
|
9341 |
+
|
9342 |
+
var el_randomize = document.createElement('input');
|
9343 |
+
el_randomize.setAttribute("id", "el_randomize");
|
9344 |
+
el_randomize.setAttribute("type", "checkbox");
|
9345 |
+
el_randomize.setAttribute("value", "yes");
|
9346 |
+
el_randomize.setAttribute("onclick", "set_randomize('"+i+"_randomizeform_id_temp')");
|
9347 |
+
if(w_randomize=="yes")
|
9348 |
+
el_randomize.setAttribute("checked", "checked");
|
9349 |
+
|
9350 |
+
var el_allow_other_label = document.createElement('label');
|
9351 |
+
el_allow_other_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9352 |
+
el_allow_other_label.innerHTML = "Allow other";
|
9353 |
+
|
9354 |
+
var el_allow_other = document.createElement('input');
|
9355 |
+
el_allow_other.setAttribute("id", "el_allow_other");
|
9356 |
+
el_allow_other.setAttribute("type", "checkbox");
|
9357 |
+
el_allow_other.setAttribute("value", "yes");
|
9358 |
+
el_allow_other.setAttribute("onclick", "set_allow_other('"+i+"','radio')");
|
9359 |
+
if(w_allow_other=="yes")
|
9360 |
+
el_allow_other.setAttribute("checked", "checked");
|
9361 |
+
|
9362 |
+
|
9363 |
+
|
9364 |
+
|
9365 |
+
var el_attr_label = document.createElement('label');
|
9366 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9367 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
9368 |
+
var el_attr_add = document.createElement('img');
|
9369 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
9370 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
9371 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
9372 |
+
el_attr_add.setAttribute("title", 'add');
|
9373 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_checkbox')");
|
9374 |
+
var el_attr_table = document.createElement('table');
|
9375 |
+
el_attr_table.setAttribute("id", 'attributes');
|
9376 |
+
el_attr_table.setAttribute("border", '0');
|
9377 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
9378 |
+
var el_attr_tr_label = document.createElement('tr');
|
9379 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
9380 |
+
var el_attr_td_name_label = document.createElement('th');
|
9381 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
9382 |
+
var el_attr_td_value_label = document.createElement('th');
|
9383 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
9384 |
+
var el_attr_td_X_label = document.createElement('th');
|
9385 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
9386 |
+
var el_attr_name_label = document.createElement('label');
|
9387 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9388 |
+
el_attr_name_label.innerHTML = "Name";
|
9389 |
+
|
9390 |
+
var el_attr_value_label = document.createElement('label');
|
9391 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9392 |
+
el_attr_value_label.innerHTML = "Value";
|
9393 |
+
|
9394 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
9395 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
9396 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
9397 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
9398 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
9399 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
9400 |
+
|
9401 |
+
n=w_attr_name.length;
|
9402 |
+
for(j=1; j<=n; j++)
|
9403 |
+
{
|
9404 |
+
var el_attr_tr = document.createElement('tr');
|
9405 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
9406 |
+
el_attr_tr.setAttribute("idi", j);
|
9407 |
+
var el_attr_td_name = document.createElement('td');
|
9408 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
9409 |
+
var el_attr_td_value = document.createElement('td');
|
9410 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
9411 |
+
|
9412 |
+
var el_attr_td_X = document.createElement('td');
|
9413 |
+
var el_attr_name = document.createElement('input');
|
9414 |
+
|
9415 |
+
el_attr_name.setAttribute("type", "text");
|
9416 |
+
|
9417 |
+
el_attr_name.style.cssText = "width:100px";
|
9418 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
9419 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
9420 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_checkbox')");
|
9421 |
+
|
9422 |
+
var el_attr_value = document.createElement('input');
|
9423 |
+
|
9424 |
+
el_attr_value.setAttribute("type", "text");
|
9425 |
+
el_attr_value.style.cssText = "width:100px";
|
9426 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
9427 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
9428 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_checkbox')");
|
9429 |
+
|
9430 |
+
var el_attr_remove = document.createElement('img');
|
9431 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
9432 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
9433 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
9434 |
+
el_attr_remove.setAttribute("align", 'top');
|
9435 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_checkbox')");
|
9436 |
+
el_attr_table.appendChild(el_attr_tr);
|
9437 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
9438 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
9439 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
9440 |
+
el_attr_td_name.appendChild(el_attr_name);
|
9441 |
+
el_attr_td_value.appendChild(el_attr_value);
|
9442 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
9443 |
+
|
9444 |
+
}
|
9445 |
+
|
9446 |
+
var el_choices_label = document.createElement('label');
|
9447 |
+
el_choices_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9448 |
+
el_choices_label.innerHTML = "Options ";
|
9449 |
+
|
9450 |
+
|
9451 |
+
var el_choices_add = document.createElement('img');
|
9452 |
+
el_choices_add.setAttribute("id", "el_choices_add");
|
9453 |
+
el_choices_add.setAttribute("src", plugin_url+'/images/add.png');
|
9454 |
+
el_choices_add.style.cssText = 'cursor:pointer;';
|
9455 |
+
el_choices_add.setAttribute("title", 'add');
|
9456 |
+
el_choices_add.setAttribute("onClick", "add_choise('radio',"+i+")");
|
9457 |
+
|
9458 |
+
var t = document.getElementById('edit_table');
|
9459 |
+
|
9460 |
+
var br = document.createElement('br');
|
9461 |
+
var br1 = document.createElement('br');
|
9462 |
+
var br2 = document.createElement('br');
|
9463 |
+
var br3 = document.createElement('br');
|
9464 |
+
var br4 = document.createElement('br');
|
9465 |
+
var br5 = document.createElement('br');
|
9466 |
+
var br6 = document.createElement('br');
|
9467 |
+
|
9468 |
+
|
9469 |
+
edit_main_td1.appendChild(el_label_label);
|
9470 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
9471 |
+
|
9472 |
+
edit_main_td2.appendChild(el_label_position_label);
|
9473 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
9474 |
+
edit_main_td2_1.appendChild(Left);
|
9475 |
+
edit_main_td2_1.appendChild(br2);
|
9476 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
9477 |
+
edit_main_td2_1.appendChild(Top);
|
9478 |
+
|
9479 |
+
edit_main_td3.appendChild(el_label_flow);
|
9480 |
+
edit_main_td3_1.appendChild(el_flow_vertical);
|
9481 |
+
edit_main_td3_1.appendChild(Vertical);
|
9482 |
+
edit_main_td3_1.appendChild(br4);
|
9483 |
+
edit_main_td3_1.appendChild(el_flow_horizontal);
|
9484 |
+
edit_main_td3_1.appendChild(Horizontal);
|
9485 |
+
|
9486 |
+
edit_main_td6.appendChild(el_style_label);
|
9487 |
+
edit_main_td6_1.appendChild(el_style_textarea);
|
9488 |
+
|
9489 |
+
edit_main_td5.appendChild(el_required_label);
|
9490 |
+
edit_main_td5_1.appendChild(el_required);
|
9491 |
+
|
9492 |
+
edit_main_td8.appendChild(el_randomize_label);
|
9493 |
+
edit_main_td8_1.appendChild(el_randomize);
|
9494 |
+
|
9495 |
+
edit_main_td9.appendChild(el_allow_other_label);
|
9496 |
+
edit_main_td9_1.appendChild(el_allow_other);
|
9497 |
+
edit_main_td10.appendChild(el_rowcol_label);
|
9498 |
+
edit_main_td10_1.appendChild(el_rowcol_textarea);
|
9499 |
+
edit_main_td7.appendChild(el_attr_label);
|
9500 |
+
edit_main_td7.appendChild(el_attr_add);
|
9501 |
+
edit_main_td7.appendChild(br6);
|
9502 |
+
edit_main_td7.appendChild(el_attr_table);
|
9503 |
+
edit_main_td7.setAttribute("colspan", "2");
|
9504 |
+
|
9505 |
+
edit_main_td4.appendChild(el_choices_label);
|
9506 |
+
edit_main_td4_1.appendChild(el_choices_add);
|
9507 |
+
|
9508 |
+
|
9509 |
+
n=w_choices.length;
|
9510 |
+
for(j=0; j<n; j++)
|
9511 |
+
{
|
9512 |
+
var br = document.createElement('br');
|
9513 |
+
br.setAttribute("id", "br"+j);
|
9514 |
+
|
9515 |
+
var el_choices = document.createElement('input');
|
9516 |
+
el_choices.setAttribute("id", "el_choices"+j);
|
9517 |
+
el_choices.setAttribute("type", "text");
|
9518 |
+
if (w_allow_other == "yes" && j == w_allow_other_num) {
|
9519 |
+
el_choices.setAttribute("other", '1');
|
9520 |
+
}
|
9521 |
+
el_choices.setAttribute("value", w_choices[j]);
|
9522 |
+
el_choices.style.cssText = "width:100px; margin:0; padding:0; border-width: 1px";
|
9523 |
+
el_choices.setAttribute("onKeyUp", "change_label('"+i+"_label_element"+j+"', this.value); change_in_value('"+i+"_elementform_id_temp"+j+"', this.value)");
|
9524 |
+
|
9525 |
+
var el_choices_remove = document.createElement('img');
|
9526 |
+
el_choices_remove.setAttribute("id", "el_choices"+j+"_remove");
|
9527 |
+
el_choices_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
9528 |
+
if(w_allow_other=="yes" && j==w_allow_other_num)
|
9529 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px; display:none';
|
9530 |
+
else
|
9531 |
+
el_choices_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
9532 |
+
el_choices_remove.setAttribute("align", 'top');
|
9533 |
+
el_choices_remove.setAttribute("onClick", "remove_choise("+j+","+i+",'radio')");
|
9534 |
+
|
9535 |
+
edit_main_td4.appendChild(br);
|
9536 |
+
edit_main_td4.appendChild(el_choices);
|
9537 |
+
edit_main_td4.appendChild(el_choices_remove);
|
9538 |
+
|
9539 |
+
}
|
9540 |
+
|
9541 |
+
|
9542 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
9543 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
9544 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
9545 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
9546 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
9547 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
9548 |
+
|
9549 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
9550 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
9551 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
9552 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
9553 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
9554 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
9555 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
9556 |
+
edit_main_tr8.appendChild(edit_main_td8);
|
9557 |
+
edit_main_tr8.appendChild(edit_main_td8_1);
|
9558 |
+
edit_main_tr9.appendChild(edit_main_td9);
|
9559 |
+
edit_main_tr9.appendChild(edit_main_td9_1);
|
9560 |
+
edit_main_tr10.appendChild(edit_main_td10);
|
9561 |
+
edit_main_tr10.appendChild(edit_main_td10_1);
|
9562 |
+
edit_main_table.appendChild(edit_main_tr1);
|
9563 |
+
edit_main_table.appendChild(edit_main_tr2);
|
9564 |
+
edit_main_table.appendChild(edit_main_tr3);
|
9565 |
+
edit_main_table.appendChild(edit_main_tr10);
|
9566 |
+
edit_main_table.appendChild(edit_main_tr6);
|
9567 |
+
edit_main_table.appendChild(edit_main_tr5);
|
9568 |
+
edit_main_table.appendChild(edit_main_tr8);
|
9569 |
+
edit_main_table.appendChild(edit_main_tr9);
|
9570 |
+
edit_main_table.appendChild(edit_main_tr4);
|
9571 |
+
edit_main_table.appendChild(edit_main_tr7);
|
9572 |
+
edit_div.appendChild(edit_main_table);
|
9573 |
+
|
9574 |
+
t.appendChild(edit_div);
|
9575 |
+
|
9576 |
+
//show table
|
9577 |
+
|
9578 |
+
element='input'; type='radio';
|
9579 |
+
var adding_type = document.createElement("input");
|
9580 |
+
adding_type.setAttribute("type", "hidden");
|
9581 |
+
adding_type.setAttribute("value", "type_radio");
|
9582 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
9583 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
9584 |
+
var adding_required = document.createElement("input");
|
9585 |
+
adding_required.setAttribute("type", "hidden");
|
9586 |
+
adding_required.setAttribute("value", w_required);
|
9587 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
9588 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
9589 |
+
|
9590 |
+
var adding_randomize = document.createElement("input");
|
9591 |
+
adding_randomize.setAttribute("type", "hidden");
|
9592 |
+
adding_randomize.setAttribute("value", w_randomize);
|
9593 |
+
adding_randomize.setAttribute("name", i+"_randomizeform_id_temp");
|
9594 |
+
adding_randomize.setAttribute("id", i+"_randomizeform_id_temp");
|
9595 |
+
|
9596 |
+
var adding_allow_other= document.createElement("input");
|
9597 |
+
adding_allow_other.setAttribute("type", "hidden");
|
9598 |
+
adding_allow_other.setAttribute("value", w_allow_other);
|
9599 |
+
adding_allow_other.setAttribute("name", i+"_allow_otherform_id_temp");
|
9600 |
+
adding_allow_other.setAttribute("id", i+"_allow_otherform_id_temp");
|
9601 |
+
var adding_rowcol= document.createElement("input");
|
9602 |
+
adding_rowcol.setAttribute("type", "hidden");
|
9603 |
+
adding_rowcol.setAttribute("value", w_rowcol);
|
9604 |
+
adding_rowcol.setAttribute("name", i+"_rowcol_numform_id_temp");
|
9605 |
+
adding_rowcol.setAttribute("id", i+"_rowcol_numform_id_temp");
|
9606 |
+
var div = document.createElement('div');
|
9607 |
+
div.setAttribute("id", "main_div");
|
9608 |
+
|
9609 |
+
var table = document.createElement('table');
|
9610 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
9611 |
+
|
9612 |
+
var tr = document.createElement('tr');
|
9613 |
+
|
9614 |
+
var td1 = document.createElement('td');
|
9615 |
+
td1.setAttribute("valign", 'top');
|
9616 |
+
td1.setAttribute("align", 'left');
|
9617 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
9618 |
+
|
9619 |
+
var td2 = document.createElement('td');
|
9620 |
+
td2.setAttribute("valign", 'top');
|
9621 |
+
td2.setAttribute("align", 'left');
|
9622 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
9623 |
+
|
9624 |
+
var br1 = document.createElement('br');
|
9625 |
+
var br2 = document.createElement('br');
|
9626 |
+
var br3 = document.createElement('br');
|
9627 |
+
var br4 = document.createElement('br');
|
9628 |
+
//tbody sarqac
|
9629 |
+
var table_little_t = document.createElement('table');
|
9630 |
+
|
9631 |
+
var table_little = document.createElement('tbody');
|
9632 |
+
table_little.setAttribute("id", i+"_table_little");
|
9633 |
+
|
9634 |
+
table_little_t.appendChild(table_little);
|
9635 |
+
|
9636 |
+
var tr_little1 = document.createElement('tr');
|
9637 |
+
tr_little1.setAttribute("id", i+"_element_tr1");
|
9638 |
+
|
9639 |
+
var tr_little2 = document.createElement('tr');
|
9640 |
+
tr_little2.setAttribute("id", i+"_element_tr2");
|
9641 |
+
|
9642 |
+
var td_little1 = document.createElement('td');
|
9643 |
+
td_little1.setAttribute("valign", 'top');
|
9644 |
+
td_little1.setAttribute("id", i+"_td_little1");
|
9645 |
+
|
9646 |
+
var td_little2 = document.createElement('td');
|
9647 |
+
td_little2.setAttribute("valign", 'top');
|
9648 |
+
td_little2.setAttribute("id", i+"_td_little2");
|
9649 |
+
|
9650 |
+
|
9651 |
+
|
9652 |
+
var label = document.createElement('span');
|
9653 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
9654 |
+
label.innerHTML = w_field_label;
|
9655 |
+
label.setAttribute("class", "label");
|
9656 |
+
|
9657 |
+
var required = document.createElement('span');
|
9658 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
9659 |
+
required.innerHTML = "";
|
9660 |
+
required.setAttribute("class", "required");
|
9661 |
+
if(w_required=="yes")
|
9662 |
+
required.innerHTML = " *";
|
9663 |
+
n=w_choices.length;
|
9664 |
+
aaa=false;
|
9665 |
+
|
9666 |
+
|
9667 |
+
var main_td = document.getElementById('show_table');
|
9668 |
+
|
9669 |
+
|
9670 |
+
td1.appendChild(label);
|
9671 |
+
td1.appendChild(required);
|
9672 |
+
td2.appendChild(adding_type);
|
9673 |
+
|
9674 |
+
td2.appendChild(adding_required);
|
9675 |
+
td2.appendChild(adding_randomize);
|
9676 |
+
td2.appendChild(adding_allow_other);
|
9677 |
+
td2.appendChild(adding_rowcol);
|
9678 |
+
td2.appendChild(table_little_t);
|
9679 |
+
tr.appendChild(td1);
|
9680 |
+
tr.appendChild(td2);
|
9681 |
+
table.appendChild(tr);
|
9682 |
+
|
9683 |
+
div.appendChild(table);
|
9684 |
+
div.appendChild(br3);
|
9685 |
+
main_td.appendChild(div);
|
9686 |
+
if (w_field_label_pos == "top") {
|
9687 |
+
label_top(i);
|
9688 |
+
}
|
9689 |
+
change_class(w_class, i);
|
9690 |
+
refresh_attr(i, 'type_checkbox');
|
9691 |
+
if (aaa) {
|
9692 |
+
show_other_input(i);
|
9693 |
+
}
|
9694 |
+
refresh_rowcol(i, 'radio');
|
9695 |
+
add_id_and_name(i, 'type_radio');
|
9696 |
|
|
|
|
|
|
|
|
|
9697 |
}
|
9698 |
|
9699 |
+
function type_time(i, w_field_label, w_field_label_pos, w_time_type, w_am_pm, w_sec, w_hh, w_mm, w_ss, w_mini_labels, w_required, w_class, w_attr_name, w_attr_value) {
|
9700 |
+
|
9701 |
+
document.getElementById("element_type").value="type_time";
|
9702 |
|
9703 |
+
delete_last_child();
|
9704 |
+
// edit table
|
9705 |
+
var edit_div = document.createElement('div');
|
9706 |
+
edit_div.setAttribute("id", "edit_div");
|
9707 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
9708 |
+
|
9709 |
+
var edit_main_table = document.createElement('table');
|
9710 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
9711 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
9712 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
9713 |
+
|
9714 |
+
var edit_main_tr1 = document.createElement('tr');
|
9715 |
+
edit_main_tr1.setAttribute("valing", "top");
|
9716 |
+
|
9717 |
+
var edit_main_tr2 = document.createElement('tr');
|
9718 |
+
edit_main_tr2.setAttribute("valing", "top");
|
9719 |
+
|
9720 |
+
var edit_main_tr3 = document.createElement('tr');
|
9721 |
+
edit_main_tr3.setAttribute("valing", "top");
|
9722 |
+
|
9723 |
+
var edit_main_tr4 = document.createElement('tr');
|
9724 |
+
edit_main_tr4.setAttribute("valing", "top");
|
9725 |
+
|
9726 |
+
var edit_main_tr5 = document.createElement('tr');
|
9727 |
+
edit_main_tr5.setAttribute("valing", "top");
|
9728 |
+
|
9729 |
+
var edit_main_tr6 = document.createElement('tr');
|
9730 |
+
edit_main_tr6.setAttribute("valing", "top");
|
9731 |
+
var edit_main_tr7 = document.createElement('tr');
|
9732 |
+
edit_main_tr7.setAttribute("valing", "top");
|
9733 |
+
|
9734 |
+
var edit_main_td1 = document.createElement('td');
|
9735 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
9736 |
+
var edit_main_td1_1 = document.createElement('td');
|
9737 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
9738 |
+
var edit_main_td2 = document.createElement('td');
|
9739 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
9740 |
+
var edit_main_td2_1 = document.createElement('td');
|
9741 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
9742 |
+
|
9743 |
+
var edit_main_td3 = document.createElement('td');
|
9744 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
9745 |
+
var edit_main_td3_1 = document.createElement('td');
|
9746 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
9747 |
+
var edit_main_td4 = document.createElement('td');
|
9748 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
9749 |
+
var edit_main_td4_1 = document.createElement('td');
|
9750 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
9751 |
+
|
9752 |
+
var edit_main_td5 = document.createElement('td');
|
9753 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
9754 |
+
var edit_main_td5_1 = document.createElement('td');
|
9755 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
9756 |
+
|
9757 |
+
var edit_main_td6 = document.createElement('td');
|
9758 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
9759 |
+
var edit_main_td6_1 = document.createElement('td');
|
9760 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
9761 |
+
var edit_main_td7 = document.createElement('td');
|
9762 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
9763 |
+
var edit_main_td7_1 = document.createElement('td');
|
9764 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
9765 |
+
|
9766 |
+
var el_label_label = document.createElement('label');
|
9767 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9768 |
+
el_label_label.innerHTML = "Field label";
|
9769 |
+
|
9770 |
+
var el_label_textarea = document.createElement('textarea');
|
9771 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
9772 |
+
el_label_textarea.setAttribute("rows", "4");
|
9773 |
+
el_label_textarea.style.cssText = "width:200px;";
|
9774 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
9775 |
+
el_label_textarea.innerHTML = w_field_label;
|
9776 |
+
|
9777 |
+
var el_label_position_label = document.createElement('label');
|
9778 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9779 |
+
el_label_position_label.innerHTML = "Field label position";
|
9780 |
+
|
9781 |
+
var el_label_position1 = document.createElement('input');
|
9782 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
9783 |
+
el_label_position1.setAttribute("type", "radio");
|
9784 |
+
el_label_position1.setAttribute("value", "left");
|
9785 |
+
|
9786 |
+
|
9787 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
9788 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
9789 |
+
el_label_position1.setAttribute("checked", "checked");
|
9790 |
+
Left = document.createTextNode("Left");
|
9791 |
+
|
9792 |
+
var el_label_position2 = document.createElement('input');
|
9793 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
9794 |
+
el_label_position2.setAttribute("type", "radio");
|
9795 |
+
el_label_position2.setAttribute("value", "top");
|
9796 |
+
|
9797 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
9798 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
9799 |
+
Top = document.createTextNode("Top");
|
9800 |
+
|
9801 |
+
if(w_field_label_pos=="top")
|
9802 |
+
|
9803 |
+
el_label_position2.setAttribute("checked", "checked");
|
9804 |
+
else
|
9805 |
+
el_label_position1.setAttribute("checked", "checked");
|
9806 |
+
|
9807 |
+
var el_label_time_type_label = document.createElement('label');
|
9808 |
+
el_label_time_type_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9809 |
+
el_label_time_type_label.innerHTML = "Time Format";
|
9810 |
+
|
9811 |
+
var el_label_time_type1 = document.createElement('input');
|
9812 |
+
el_label_time_type1.setAttribute("id", "el_label_time_type1");
|
9813 |
+
el_label_time_type1.setAttribute("type", "radio");
|
9814 |
+
el_label_time_type1.setAttribute("value", "format_24");
|
9815 |
+
el_label_time_type1.setAttribute("name", "edit_for_time_type");
|
9816 |
+
el_label_time_type1.setAttribute("onchange", "format_24("+i+")");
|
9817 |
+
el_label_time_type1.setAttribute("checked", "checked");
|
9818 |
+
hour_24 = document.createTextNode("24 hour");
|
9819 |
+
|
9820 |
+
var el_label_time_type2 = document.createElement('input');
|
9821 |
+
el_label_time_type2.setAttribute("id", "el_label_time_type2");
|
9822 |
+
el_label_time_type2.setAttribute("type", "radio");
|
9823 |
+
el_label_time_type2.setAttribute("value", "format_12");
|
9824 |
+
el_label_time_type2.setAttribute("name", "edit_for_time_type");
|
9825 |
+
el_label_time_type2.setAttribute("onchange", "format_12("+i+", 'am','', '','')");
|
9826 |
+
am_pm = document.createTextNode("12 hour");
|
9827 |
+
|
9828 |
+
if(w_time_type=="24")
|
9829 |
+
|
9830 |
+
el_label_time_type1.setAttribute("checked", "checked");
|
9831 |
+
else
|
9832 |
+
el_label_time_type2.setAttribute("checked", "checked");
|
9833 |
+
|
9834 |
+
var el_label_second_label = document.createElement('label');
|
9835 |
+
el_label_second_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9836 |
+
el_label_second_label.innerHTML = "Display Seconds";
|
9837 |
+
|
9838 |
+
var el_second_yes = document.createElement('input');
|
9839 |
+
el_second_yes.setAttribute("id", "el_second_yes");
|
9840 |
+
el_second_yes.setAttribute("type", "radio");
|
9841 |
+
el_second_yes.setAttribute("value", "yes");
|
9842 |
+
el_second_yes.setAttribute("name", "edit_for_time_second");
|
9843 |
+
el_second_yes.setAttribute("onchange", "second_yes("+i+",'"+w_ss+"')");
|
9844 |
+
el_second_yes.setAttribute("checked", "checked");
|
9845 |
+
display_seconds = document.createTextNode("Yes");
|
9846 |
+
|
9847 |
+
var el_second_no = document.createElement('input');
|
9848 |
+
el_second_no.setAttribute("id", "el_second_no");
|
9849 |
+
el_second_no.setAttribute("type", "radio");
|
9850 |
+
el_second_no.setAttribute("value", "no");
|
9851 |
+
el_second_no.setAttribute("name", "edit_for_time_second");
|
9852 |
+
el_second_no.setAttribute("onchange", "second_no("+i+")");
|
9853 |
+
dont_display_seconds = document.createTextNode("No");
|
9854 |
+
|
9855 |
+
if(w_sec=="1")
|
9856 |
+
|
9857 |
+
el_second_yes.setAttribute("checked", "checked");
|
9858 |
+
else
|
9859 |
+
el_second_no.setAttribute("checked", "checked");
|
9860 |
+
var el_style_label = document.createElement('label');
|
9861 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9862 |
+
el_style_label.innerHTML = "Class name";
|
9863 |
+
|
9864 |
+
var el_style_textarea = document.createElement('input');
|
9865 |
+
el_style_textarea.setAttribute("id", "element_style");
|
9866 |
+
el_style_textarea.setAttribute("type", "text");
|
9867 |
+
el_style_textarea.setAttribute("value", w_class);
|
9868 |
+
el_style_textarea.style.cssText = "width:200px;";
|
9869 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
9870 |
+
|
9871 |
+
var el_required_label = document.createElement('label');
|
9872 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9873 |
+
el_required_label.innerHTML = "Required";
|
9874 |
+
|
9875 |
+
var el_required = document.createElement('input');
|
9876 |
+
el_required.setAttribute("id", "el_send");
|
9877 |
+
el_required.setAttribute("type", "checkbox");
|
9878 |
+
el_required.setAttribute("value", "yes");
|
9879 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
9880 |
+
if(w_required=="yes")
|
9881 |
+
|
9882 |
+
el_required.setAttribute("checked", "checked");
|
9883 |
+
var el_attr_label = document.createElement('label');
|
9884 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
9885 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
9886 |
+
|
9887 |
+
var el_attr_add = document.createElement('img');
|
9888 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
9889 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
9890 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
9891 |
+
el_attr_add.setAttribute("title", 'add');
|
9892 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_time')");
|
9893 |
+
var el_attr_table = document.createElement('table');
|
9894 |
+
el_attr_table.setAttribute("id", 'attributes');
|
9895 |
+
el_attr_table.setAttribute("border", '0');
|
9896 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
9897 |
+
var el_attr_tr_label = document.createElement('tr');
|
9898 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
9899 |
+
var el_attr_td_name_label = document.createElement('th');
|
9900 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
9901 |
+
var el_attr_td_value_label = document.createElement('th');
|
9902 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
9903 |
+
var el_attr_td_X_label = document.createElement('th');
|
9904 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
9905 |
+
var el_attr_name_label = document.createElement('label');
|
9906 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9907 |
+
el_attr_name_label.innerHTML = "Name";
|
9908 |
+
|
9909 |
+
var el_attr_value_label = document.createElement('label');
|
9910 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
9911 |
+
el_attr_value_label.innerHTML = "Value";
|
9912 |
+
|
9913 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
9914 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
9915 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
9916 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
9917 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
9918 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
9919 |
+
|
9920 |
+
n=w_attr_name.length;
|
9921 |
+
for(j=1; j<=n; j++)
|
9922 |
+
{
|
9923 |
+
var el_attr_tr = document.createElement('tr');
|
9924 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
9925 |
+
el_attr_tr.setAttribute("idi", j);
|
9926 |
+
var el_attr_td_name = document.createElement('td');
|
9927 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
9928 |
+
var el_attr_td_value = document.createElement('td');
|
9929 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
9930 |
+
|
9931 |
+
var el_attr_td_X = document.createElement('td');
|
9932 |
+
var el_attr_name = document.createElement('input');
|
9933 |
+
|
9934 |
+
el_attr_name.setAttribute("type", "text");
|
9935 |
+
|
9936 |
+
el_attr_name.style.cssText = "width:100px";
|
9937 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
9938 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
9939 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_time')");
|
9940 |
+
|
9941 |
+
var el_attr_value = document.createElement('input');
|
9942 |
+
|
9943 |
+
el_attr_value.setAttribute("type", "text");
|
9944 |
+
|
9945 |
+
el_attr_value.style.cssText = "width:100px";
|
9946 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
9947 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
9948 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_time')");
|
9949 |
+
|
9950 |
+
var el_attr_remove = document.createElement('img');
|
9951 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
9952 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
9953 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
9954 |
+
el_attr_remove.setAttribute("align", 'top');
|
9955 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_time')");
|
9956 |
+
el_attr_table.appendChild(el_attr_tr);
|
9957 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
9958 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
9959 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
9960 |
+
el_attr_td_name.appendChild(el_attr_name);
|
9961 |
+
el_attr_td_value.appendChild(el_attr_value);
|
9962 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
9963 |
+
|
9964 |
+
}
|
9965 |
+
|
9966 |
+
var t = document.getElementById('edit_table');
|
9967 |
+
|
9968 |
+
var br = document.createElement('br');
|
9969 |
+
var br1 = document.createElement('br');
|
9970 |
+
var br2 = document.createElement('br');
|
9971 |
+
var br3 = document.createElement('br');
|
9972 |
+
var br4 = document.createElement('br');
|
9973 |
+
var br5 = document.createElement('br');
|
9974 |
+
var br6 = document.createElement('br');
|
9975 |
+
|
9976 |
+
edit_main_td1.appendChild(el_label_label);
|
9977 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
9978 |
+
|
9979 |
+
edit_main_td2.appendChild(el_label_position_label);
|
9980 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
9981 |
+
edit_main_td2_1.appendChild(Left);
|
9982 |
+
edit_main_td2_1.appendChild(br2);
|
9983 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
9984 |
+
edit_main_td2_1.appendChild(Top);
|
9985 |
+
|
9986 |
+
edit_main_td3.appendChild(el_label_time_type_label);
|
9987 |
+
edit_main_td3_1.appendChild(el_label_time_type1);
|
9988 |
+
edit_main_td3_1.appendChild(hour_24);
|
9989 |
+
edit_main_td3_1.appendChild(br6);
|
9990 |
+
edit_main_td3_1.appendChild(el_label_time_type2);
|
9991 |
+
edit_main_td3_1.appendChild(am_pm);
|
9992 |
+
|
9993 |
+
edit_main_td4.appendChild(el_label_second_label);
|
9994 |
+
edit_main_td4_1.appendChild(el_second_yes);
|
9995 |
+
edit_main_td4_1.appendChild(display_seconds);
|
9996 |
+
edit_main_td4_1.appendChild(br4);
|
9997 |
+
edit_main_td4_1.appendChild(el_second_no);
|
9998 |
+
edit_main_td4_1.appendChild(dont_display_seconds);
|
9999 |
+
|
10000 |
+
edit_main_td5.appendChild(el_style_label);
|
10001 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
10002 |
+
|
10003 |
+
edit_main_td6.appendChild(el_required_label);
|
10004 |
+
edit_main_td6_1.appendChild(el_required);
|
10005 |
+
|
10006 |
+
|
10007 |
+
edit_main_td7.appendChild(el_attr_label);
|
10008 |
+
edit_main_td7.appendChild(el_attr_add);
|
10009 |
+
edit_main_td7.appendChild(br6);
|
10010 |
+
edit_main_td7.appendChild(el_attr_table);
|
10011 |
+
edit_main_td7.setAttribute("colspan", "2");
|
10012 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
10013 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
10014 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
10015 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
10016 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
10017 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
10018 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
10019 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
10020 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
10021 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
10022 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
10023 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
10024 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
10025 |
+
edit_main_table.appendChild(edit_main_tr1);
|
10026 |
+
edit_main_table.appendChild(edit_main_tr2);
|
10027 |
+
edit_main_table.appendChild(edit_main_tr3);
|
10028 |
+
edit_main_table.appendChild(edit_main_tr4);
|
10029 |
+
edit_main_table.appendChild(edit_main_tr5);
|
10030 |
+
edit_main_table.appendChild(edit_main_tr6);
|
10031 |
+
edit_main_table.appendChild(edit_main_tr7);
|
10032 |
+
edit_div.appendChild(edit_main_table);
|
10033 |
+
|
10034 |
+
t.appendChild(edit_div);
|
10035 |
+
add_id_and_name(i, 'type_time');
|
10036 |
+
|
10037 |
+
//show table
|
10038 |
+
var adding_type = document.createElement("input");
|
10039 |
+
adding_type.setAttribute("type", "hidden");
|
10040 |
+
adding_type.setAttribute("value", "type_time");
|
10041 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
10042 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
10043 |
+
var adding_required = document.createElement("input");
|
10044 |
+
adding_required.setAttribute("type", "hidden");
|
10045 |
+
adding_required.setAttribute("value", w_required);
|
10046 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
10047 |
+
|
10048 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
10049 |
+
var div = document.createElement('div');
|
10050 |
+
div.setAttribute("id", "main_div");
|
10051 |
+
var div_for_editable_labels = document.createElement('div');
|
10052 |
+
div_for_editable_labels.setAttribute("style", "margin-left:4px; color:red;");
|
10053 |
+
|
10054 |
+
edit_labels = document.createTextNode("The labels of the fields are editable. Please, click the label to edit.");
|
10055 |
+
|
10056 |
+
div_for_editable_labels.appendChild(edit_labels);
|
10057 |
+
|
10058 |
+
var table = document.createElement('table');
|
10059 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
10060 |
+
|
10061 |
+
var tr = document.createElement('tr');
|
10062 |
+
|
10063 |
+
var td1 = document.createElement('td');
|
10064 |
+
td1.setAttribute("valign", 'top');
|
10065 |
+
td1.setAttribute("align", 'left');
|
10066 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
10067 |
+
|
10068 |
+
var td2 = document.createElement('td');
|
10069 |
+
td2.setAttribute("valign", 'middle');
|
10070 |
+
td2.setAttribute("align", 'left');
|
10071 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
10072 |
+
|
10073 |
+
var table_time = document.createElement('table');
|
10074 |
+
table_time.setAttribute("id", i+"_table_time");
|
10075 |
+
table_time.setAttribute("cellpadding", '0');
|
10076 |
+
table_time.setAttribute("cellspacing", '0');
|
10077 |
+
var tr_time1 = document.createElement('tr');
|
10078 |
+
tr_time1.setAttribute("id", i+"_tr_time1");
|
10079 |
+
|
10080 |
+
var tr_time2 = document.createElement('tr');
|
10081 |
+
tr_time2.setAttribute("id", i+"_tr_time2");
|
10082 |
+
|
10083 |
+
var td_time_input1 = document.createElement('td');
|
10084 |
+
td_time_input1.setAttribute("id", i+"_td_time_input1");
|
10085 |
+
td_time_input1.style.cssText ="width:32px";
|
10086 |
+
|
10087 |
+
var td_time_input1_ket = document.createElement('td');
|
10088 |
+
td_time_input1_ket.setAttribute("align", "center");
|
10089 |
+
|
10090 |
+
|
10091 |
+
|
10092 |
+
var td_time_input2 = document.createElement('td');
|
10093 |
+
td_time_input2.setAttribute("id", i+"_td_time_input2");
|
10094 |
+
td_time_input2.style.cssText ="width:32px";
|
10095 |
+
var td_time_input2_ket = document.createElement('td');
|
10096 |
+
td_time_input2_ket.setAttribute("align", "center");
|
10097 |
+
|
10098 |
+
var td_time_input3 = document.createElement('td');
|
10099 |
+
td_time_input3.setAttribute("id", i+"_td_time_input3");
|
10100 |
+
td_time_input3.style.cssText ="width:32px";
|
10101 |
+
|
10102 |
+
var td_time_label1 = document.createElement('td');
|
10103 |
+
td_time_label1.setAttribute("id", i+"_td_time_label1");
|
10104 |
+
var td_time_label1_ket = document.createElement('td');
|
10105 |
+
var td_time_label2 = document.createElement('td');
|
10106 |
+
td_time_label2.setAttribute("id", i+"_td_time_label2");
|
10107 |
+
var td_time_label2_ket = document.createElement('td');
|
10108 |
+
var td_time_label3 = document.createElement('td');
|
10109 |
+
td_time_label3.setAttribute("id", i+"_td_time_label3");
|
10110 |
+
|
10111 |
+
var br1 = document.createElement('br');
|
10112 |
+
var br2 = document.createElement('br');
|
10113 |
+
var br3 = document.createElement('br');
|
10114 |
+
var br4 = document.createElement('br');
|
10115 |
+
|
10116 |
|
10117 |
+
var label = document.createElement('span');
|
10118 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
10119 |
+
label.innerHTML = w_field_label;
|
10120 |
+
label.setAttribute("class", "label");
|
10121 |
+
|
10122 |
+
var required = document.createElement('span');
|
10123 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
10124 |
+
required.innerHTML = "";
|
10125 |
+
required.setAttribute("class", "required");
|
10126 |
+
if(w_required=="yes")
|
10127 |
+
required.innerHTML = " *";
|
10128 |
+
|
10129 |
+
var hh = document.createElement('input');
|
10130 |
+
hh.setAttribute("type", 'text');
|
10131 |
+
hh.setAttribute("value", w_hh);
|
10132 |
+
hh.setAttribute("class", "time_box");
|
10133 |
+
hh.setAttribute("id", i+"_hhform_id_temp");
|
10134 |
+
hh.setAttribute("name", i+"_hhform_id_temp");
|
10135 |
+
hh.setAttribute("onKeyPress", "return check_hour(event, '"+i+"_hhform_id_temp', '23')");
|
10136 |
+
hh.setAttribute("onKeyUp", "change_hour(event, '"+i+"_hhform_id_temp','23')");
|
10137 |
+
hh.setAttribute("onBlur", "add_0('"+i+"_hhform_id_temp')");
|
10138 |
+
|
10139 |
+
var hh_label = document.createElement('label');
|
10140 |
+
hh_label.setAttribute("class", "mini_label");
|
10141 |
+
hh_label.setAttribute("id", i+"_mini_label_hh");
|
10142 |
+
hh_label.innerHTML = w_mini_labels[0];
|
10143 |
+
|
10144 |
+
var hh_ = document.createElement('span');
|
10145 |
+
hh_.setAttribute("class", 'wdform_colon');
|
10146 |
+
hh_.style.cssText = "font-style:bold; vertical-align:middle";
|
10147 |
+
hh_.innerHTML=" : ";
|
10148 |
+
|
10149 |
+
var mm = document.createElement('input');
|
10150 |
+
mm.setAttribute("type", 'text');
|
10151 |
+
mm.setAttribute("value", w_mm);
|
10152 |
+
mm.setAttribute("class", "time_box");
|
10153 |
+
|
10154 |
+
mm.setAttribute("id", i+"_mmform_id_temp");
|
10155 |
+
mm.setAttribute("name", i+"_mmform_id_temp");
|
10156 |
+
mm.setAttribute("onKeyPress", "return check_minute(event, '"+i+"_mmform_id_temp')");
|
10157 |
+
mm.setAttribute("onKeyUp", "change_minute(event, '"+i+"_mmform_id_temp')");
|
10158 |
+
mm.setAttribute("onBlur", "add_0('"+i+"_mmform_id_temp')");
|
10159 |
+
|
10160 |
+
var mm_label = document.createElement('label');
|
10161 |
+
mm_label.setAttribute("class", "mini_label");
|
10162 |
+
mm_label.setAttribute("id", i+"_mini_label_mm");
|
10163 |
+
mm_label.innerHTML = w_mini_labels[1];
|
10164 |
+
|
10165 |
+
var mm_ = document.createElement('span');
|
10166 |
+
mm_.style.cssText = "font-style:bold; vertical-align:middle";
|
10167 |
+
mm_.innerHTML=" : ";
|
10168 |
+
mm_.setAttribute("class", 'wdform_colon');
|
10169 |
+
|
10170 |
+
var ss = document.createElement('input');
|
10171 |
+
ss.setAttribute("type", 'text');
|
10172 |
+
ss.setAttribute("value", w_ss);
|
10173 |
+
ss.setAttribute("class", "time_box");
|
10174 |
+
|
10175 |
+
ss.setAttribute("id", i+"_ssform_id_temp");
|
10176 |
+
ss.setAttribute("name", i+"_ssform_id_temp");
|
10177 |
+
ss.setAttribute("onKeyPress", "return check_second(event, '"+i+"_ssform_id_temp')");
|
10178 |
+
ss.setAttribute("onKeyUp", "change_second(event, '"+i+"_ssform_id_temp')");
|
10179 |
+
ss.setAttribute("onBlur", "add_0('"+i+"_ssform_id_temp')");
|
10180 |
+
|
10181 |
+
var ss_label = document.createElement('label');
|
10182 |
+
ss_label.setAttribute("class", "mini_label");
|
10183 |
+
ss_label.setAttribute("id", i+"_mini_label_ss");
|
10184 |
+
ss_label.innerHTML = w_mini_labels[2];
|
10185 |
+
|
10186 |
+
var main_td = document.getElementById('show_table');
|
10187 |
+
|
10188 |
+
|
10189 |
+
td1.appendChild(label);
|
10190 |
+
td1.appendChild(required);
|
10191 |
+
|
10192 |
+
td_time_input1.appendChild(hh);
|
10193 |
+
td_time_input1_ket.appendChild(hh_);
|
10194 |
+
td_time_input2.appendChild(mm);
|
10195 |
+
td_time_input2_ket.appendChild(mm_);
|
10196 |
+
td_time_input3.appendChild(ss);
|
10197 |
+
tr_time1.appendChild(td_time_input1);
|
10198 |
+
tr_time1.appendChild(td_time_input1_ket);
|
10199 |
+
tr_time1.appendChild(td_time_input2);
|
10200 |
+
tr_time1.appendChild(td_time_input2_ket);
|
10201 |
+
tr_time1.appendChild(td_time_input3);
|
10202 |
+
|
10203 |
+
td_time_label1.appendChild(hh_label);
|
10204 |
+
td_time_label2.appendChild(mm_label);
|
10205 |
+
td_time_label3.appendChild(ss_label);
|
10206 |
+
tr_time2.appendChild(td_time_label1);
|
10207 |
+
tr_time2.appendChild(td_time_label1_ket);
|
10208 |
+
tr_time2.appendChild(td_time_label2);
|
10209 |
+
tr_time2.appendChild(td_time_label2_ket);
|
10210 |
+
tr_time2.appendChild(td_time_label3);
|
10211 |
+
table_time.appendChild(tr_time1);
|
10212 |
+
table_time.appendChild(tr_time2);
|
10213 |
+
|
10214 |
+
td2.appendChild(adding_type);
|
10215 |
+
|
10216 |
+
td2.appendChild(adding_required);
|
10217 |
+
td2.appendChild(table_time);
|
10218 |
+
tr.appendChild(td1);
|
10219 |
+
tr.appendChild(td2);
|
10220 |
+
table.appendChild(tr);
|
10221 |
+
|
10222 |
+
div.appendChild(table);
|
10223 |
+
div.appendChild(br3);
|
10224 |
+
div.appendChild(div_for_editable_labels);
|
10225 |
+
main_td.appendChild(div);
|
10226 |
|
10227 |
+
if(w_field_label_pos=="top")
|
10228 |
+
label_top(i);
|
10229 |
+
if(w_time_type=="12")
|
10230 |
+
format_12(i, w_am_pm,w_hh, w_mm,w_ss);
|
|
|
10231 |
|
10232 |
+
if (w_sec == "0") {
|
10233 |
+
second_no(i);
|
|
|
|
|
10234 |
}
|
10235 |
+
change_class(w_class, i);
|
10236 |
+
refresh_attr(i, 'type_time');
|
10237 |
+
jQuery(document).ready(function() {
|
10238 |
+
jQuery("label#"+i+"_mini_label_hh").click(function() {
|
10239 |
+
if (jQuery(this).children('input').length == 0) {
|
10240 |
+
var hh = "<input type='text' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
10241 |
+
jQuery(this).html(hh);
|
10242 |
+
jQuery("input.hh").focus();
|
10243 |
+
jQuery("input.hh").blur(function() {
|
10244 |
+
var value = jQuery(this).val();
|
10245 |
+
jQuery("#"+i+"_mini_label_hh").text(value);
|
10246 |
+
});
|
10247 |
+
}
|
10248 |
+
});
|
10249 |
+
jQuery("label#"+i+"_mini_label_mm").click(function() {
|
10250 |
+
if (jQuery(this).children('input').length == 0) {
|
10251 |
+
var mm = "<input type='text' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
10252 |
+
jQuery(this).html(mm);
|
10253 |
+
jQuery("input.mm").focus();
|
10254 |
+
jQuery("input.mm").blur(function() {
|
10255 |
+
var value = jQuery(this).val();
|
10256 |
+
jQuery("#"+i+"_mini_label_mm").text(value);
|
10257 |
+
});
|
10258 |
+
}
|
10259 |
+
});
|
10260 |
+
jQuery("label#"+i+"_mini_label_ss").click(function() {
|
10261 |
+
if (jQuery(this).children('input').length == 0) {
|
10262 |
+
var ss = "<input type='text' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
|
10263 |
+
jQuery(this).html(ss);
|
10264 |
+
jQuery("input.ss").focus();
|
10265 |
+
jQuery("input.ss").blur(function() {
|
10266 |
+
var value = jQuery(this).val();
|
10267 |
+
jQuery("#"+i+"_mini_label_ss").text(value);
|
10268 |
+
});
|
10269 |
+
}
|
10270 |
+
});
|
10271 |
+
});
|
10272 |
}
|
10273 |
|
10274 |
+
function type_date(i, w_field_label, w_field_label_pos, w_date, w_required, w_class, w_format, w_but_val, w_attr_name, w_attr_value) {
|
10275 |
+
|
10276 |
+
document.getElementById("element_type").value="type_date";
|
|
|
|
|
|
|
10277 |
|
10278 |
+
delete_last_child();
|
10279 |
+
// edit table
|
10280 |
+
var edit_div = document.createElement('div');
|
10281 |
+
edit_div.setAttribute("id", "edit_div");
|
10282 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
10283 |
+
|
10284 |
+
var edit_main_table = document.createElement('table');
|
10285 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
10286 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
10287 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
10288 |
+
|
10289 |
+
var edit_main_tr1 = document.createElement('tr');
|
10290 |
+
edit_main_tr1.setAttribute("valing", "top");
|
10291 |
+
|
10292 |
+
var edit_main_tr2 = document.createElement('tr');
|
10293 |
+
edit_main_tr2.setAttribute("valing", "top");
|
10294 |
+
|
10295 |
+
var edit_main_tr3 = document.createElement('tr');
|
10296 |
+
edit_main_tr3.setAttribute("valing", "top");
|
10297 |
+
|
10298 |
+
var edit_main_tr4 = document.createElement('tr');
|
10299 |
+
edit_main_tr4.setAttribute("valing", "top");
|
10300 |
+
|
10301 |
+
var edit_main_tr5 = document.createElement('tr');
|
10302 |
+
edit_main_tr5.setAttribute("valing", "top");
|
10303 |
+
|
10304 |
+
var edit_main_tr6 = document.createElement('tr');
|
10305 |
+
edit_main_tr6.setAttribute("valing", "top");
|
10306 |
+
|
10307 |
+
var edit_main_tr7 = document.createElement('tr');
|
10308 |
+
edit_main_tr7.setAttribute("valing", "top");
|
10309 |
+
|
10310 |
+
var edit_main_td1 = document.createElement('td');
|
10311 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
10312 |
+
var edit_main_td1_1 = document.createElement('td');
|
10313 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
10314 |
+
var edit_main_td2 = document.createElement('td');
|
10315 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
10316 |
+
var edit_main_td2_1 = document.createElement('td');
|
10317 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
10318 |
+
|
10319 |
+
var edit_main_td3 = document.createElement('td');
|
10320 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
10321 |
+
var edit_main_td3_1 = document.createElement('td');
|
10322 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
10323 |
+
var edit_main_td4 = document.createElement('td');
|
10324 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
10325 |
+
var edit_main_td4_1 = document.createElement('td');
|
10326 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
10327 |
+
|
10328 |
+
var edit_main_td5 = document.createElement('td');
|
10329 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
10330 |
+
var edit_main_td5_1 = document.createElement('td');
|
10331 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
10332 |
+
|
10333 |
+
var edit_main_td6 = document.createElement('td');
|
10334 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
10335 |
+
var edit_main_td6_1 = document.createElement('td');
|
10336 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
10337 |
+
var edit_main_td7 = document.createElement('td');
|
10338 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
10339 |
+
var edit_main_td7_1 = document.createElement('td');
|
10340 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
10341 |
+
|
10342 |
+
var el_label_label = document.createElement('label');
|
10343 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10344 |
+
el_label_label.innerHTML = "Field label";
|
10345 |
+
|
10346 |
+
var el_label_textarea = document.createElement('textarea');
|
10347 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
10348 |
+
el_label_textarea.setAttribute("rows", "4");
|
10349 |
+
el_label_textarea.style.cssText = "width:200px;";
|
10350 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
10351 |
+
el_label_textarea.innerHTML = w_field_label;
|
10352 |
+
|
10353 |
+
var el_label_position_label = document.createElement('label');
|
10354 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10355 |
+
el_label_position_label.innerHTML = "Field label position";
|
10356 |
+
|
10357 |
+
var el_label_position1 = document.createElement('input');
|
10358 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
10359 |
+
el_label_position1.setAttribute("type", "radio");
|
10360 |
+
el_label_position1.setAttribute("value", "left");
|
10361 |
+
|
10362 |
+
|
10363 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
10364 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
10365 |
+
el_label_position1.setAttribute("checked", "checked");
|
10366 |
+
Left = document.createTextNode("Left");
|
10367 |
+
|
10368 |
+
var el_label_position2 = document.createElement('input');
|
10369 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
10370 |
+
el_label_position2.setAttribute("type", "radio");
|
10371 |
+
el_label_position2.setAttribute("value", "top");
|
10372 |
+
|
10373 |
+
|
10374 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
10375 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
10376 |
+
Top = document.createTextNode("Top");
|
10377 |
+
|
10378 |
+
if(w_field_label_pos=="top")
|
10379 |
+
|
10380 |
+
el_label_position2.setAttribute("checked", "checked");
|
10381 |
+
else
|
10382 |
+
el_label_position1.setAttribute("checked", "checked");
|
10383 |
+
|
10384 |
+
var el_format_label = document.createElement('label');
|
10385 |
+
el_format_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10386 |
+
el_format_label.innerHTML = "Date format";
|
10387 |
+
|
10388 |
+
var el_format_textarea = document.createElement('input');
|
10389 |
+
el_format_textarea.setAttribute("id", "date_format");
|
10390 |
+
el_format_textarea.setAttribute("type", "text");
|
10391 |
+
el_format_textarea.setAttribute("value", w_format);
|
10392 |
+
el_format_textarea.style.cssText = "width:200px;";
|
10393 |
+
el_format_textarea.setAttribute("onChange", "change_date_format(this.value,'"+i+"')");
|
10394 |
+
|
10395 |
+
var el_button_value_label = document.createElement('label');
|
10396 |
+
el_button_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10397 |
+
el_button_value_label.innerHTML = "Date Picker label";
|
10398 |
+
|
10399 |
+
var el_button_value_textarea = document.createElement('input');
|
10400 |
+
el_button_value_textarea.setAttribute("id", "button_value");
|
10401 |
+
el_button_value_textarea.setAttribute("type", "text");
|
10402 |
+
el_button_value_textarea.setAttribute("value", w_but_val);
|
10403 |
+
el_button_value_textarea.style.cssText = "width:150px;";
|
10404 |
+
el_button_value_textarea.setAttribute("onKeyUp", "change_file_value(this.value,'"+i+"_buttonform_id_temp')");
|
10405 |
+
|
10406 |
+
var el_style_label = document.createElement('label');
|
10407 |
+
el_style_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10408 |
+
el_style_label.innerHTML = "Class name";
|
10409 |
+
|
10410 |
+
var el_style_textarea = document.createElement('input');
|
10411 |
+
el_style_textarea.setAttribute("id", "element_style");
|
10412 |
+
el_style_textarea.setAttribute("type", "text");
|
10413 |
+
el_style_textarea.setAttribute("value", w_class);
|
10414 |
+
el_style_textarea.style.cssText = "width:200px;";
|
10415 |
+
el_style_textarea.setAttribute("onChange", "change_class(this.value,'"+i+"')");
|
10416 |
+
|
10417 |
+
var el_required_label = document.createElement('label');
|
10418 |
+
el_required_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10419 |
+
el_required_label.innerHTML = "Required";
|
10420 |
+
|
10421 |
+
var el_required = document.createElement('input');
|
10422 |
+
el_required.setAttribute("id", "el_send");
|
10423 |
+
el_required.setAttribute("type", "checkbox");
|
10424 |
+
el_required.setAttribute("value", "yes");
|
10425 |
+
el_required.setAttribute("onclick", "set_required('"+i+"_required')");
|
10426 |
+
if(w_required=="yes")
|
10427 |
+
|
10428 |
+
el_required.setAttribute("checked", "checked");
|
10429 |
+
|
10430 |
+
var el_attr_label = document.createElement('label');
|
10431 |
+
el_attr_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
10432 |
+
el_attr_label.innerHTML = "Additional Attributes";
|
10433 |
+
var el_attr_add = document.createElement('img');
|
10434 |
+
el_attr_add.setAttribute("id", "el_choices_add");
|
10435 |
+
el_attr_add.setAttribute("src", plugin_url+'/images/add.png');
|
10436 |
+
el_attr_add.style.cssText = 'cursor:pointer; margin-left:68px';
|
10437 |
+
el_attr_add.setAttribute("title", 'add');
|
10438 |
+
el_attr_add.setAttribute("onClick", "add_attr("+i+", 'type_date')");
|
10439 |
+
var el_attr_table = document.createElement('table');
|
10440 |
+
el_attr_table.setAttribute("id", 'attributes');
|
10441 |
+
el_attr_table.setAttribute("border", '0');
|
10442 |
+
el_attr_table.style.cssText = 'margin-left:0px';
|
10443 |
+
var el_attr_tr_label = document.createElement('tr');
|
10444 |
+
el_attr_tr_label.setAttribute("idi", '0');
|
10445 |
+
var el_attr_td_name_label = document.createElement('th');
|
10446 |
+
el_attr_td_name_label.style.cssText = 'width:100px';
|
10447 |
+
var el_attr_td_value_label = document.createElement('th');
|
10448 |
+
el_attr_td_value_label.style.cssText = 'width:100px';
|
10449 |
+
var el_attr_td_X_label = document.createElement('th');
|
10450 |
+
el_attr_td_X_label.style.cssText = 'width:10px';
|
10451 |
+
var el_attr_name_label = document.createElement('label');
|
10452 |
+
el_attr_name_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
10453 |
+
el_attr_name_label.innerHTML = "Name";
|
10454 |
+
|
10455 |
+
var el_attr_value_label = document.createElement('label');
|
10456 |
+
el_attr_value_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 11px";
|
10457 |
+
el_attr_value_label.innerHTML = "Value";
|
10458 |
+
|
10459 |
+
el_attr_table.appendChild(el_attr_tr_label);
|
10460 |
+
el_attr_tr_label.appendChild(el_attr_td_name_label);
|
10461 |
+
el_attr_tr_label.appendChild(el_attr_td_value_label);
|
10462 |
+
el_attr_tr_label.appendChild(el_attr_td_X_label);
|
10463 |
+
el_attr_td_name_label.appendChild(el_attr_name_label);
|
10464 |
+
el_attr_td_value_label.appendChild(el_attr_value_label);
|
10465 |
+
|
10466 |
+
n=w_attr_name.length;
|
10467 |
+
for(j=1; j<=n; j++)
|
10468 |
+
{
|
10469 |
+
var el_attr_tr = document.createElement('tr');
|
10470 |
+
el_attr_tr.setAttribute("id", "attr_row_"+j);
|
10471 |
+
el_attr_tr.setAttribute("idi", j);
|
10472 |
+
var el_attr_td_name = document.createElement('td');
|
10473 |
+
el_attr_td_name.style.cssText = 'width:100px';
|
10474 |
+
var el_attr_td_value = document.createElement('td');
|
10475 |
+
el_attr_td_value.style.cssText = 'width:100px';
|
10476 |
+
|
10477 |
+
var el_attr_td_X = document.createElement('td');
|
10478 |
+
var el_attr_name = document.createElement('input');
|
10479 |
+
|
10480 |
+
el_attr_name.setAttribute("type", "text");
|
10481 |
+
|
10482 |
+
el_attr_name.style.cssText = "width:100px";
|
10483 |
+
el_attr_name.setAttribute("value", w_attr_name[j-1]);
|
10484 |
+
el_attr_name.setAttribute("id", "attr_name"+j);
|
10485 |
+
el_attr_name.setAttribute("onChange", "change_attribute_name("+i+", this, 'type_date')");
|
10486 |
+
|
10487 |
+
var el_attr_value = document.createElement('input');
|
10488 |
+
|
10489 |
+
el_attr_value.setAttribute("type", "text");
|
10490 |
+
|
10491 |
+
el_attr_value.style.cssText = "width:100px";
|
10492 |
+
el_attr_value.setAttribute("value", w_attr_value[j-1]);
|
10493 |
+
el_attr_value.setAttribute("id", "attr_value"+j);
|
10494 |
+
el_attr_value.setAttribute("onChange", "change_attribute_value("+i+", "+j+", 'type_date')");
|
10495 |
+
|
10496 |
+
var el_attr_remove = document.createElement('img');
|
10497 |
+
el_attr_remove.setAttribute("id", "el_choices"+j+"_remove");
|
10498 |
+
el_attr_remove.setAttribute("src", plugin_url+'/images/delete.png');
|
10499 |
+
el_attr_remove.style.cssText = 'cursor:pointer; vertical-align:middle; margin:3px';
|
10500 |
+
el_attr_remove.setAttribute("align", 'top');
|
10501 |
+
el_attr_remove.setAttribute("onClick", "remove_attr("+j+", "+i+", 'type_date')");
|
10502 |
+
el_attr_table.appendChild(el_attr_tr);
|
10503 |
+
el_attr_tr.appendChild(el_attr_td_name);
|
10504 |
+
el_attr_tr.appendChild(el_attr_td_value);
|
10505 |
+
el_attr_tr.appendChild(el_attr_td_X);
|
10506 |
+
el_attr_td_name.appendChild(el_attr_name);
|
10507 |
+
el_attr_td_value.appendChild(el_attr_value);
|
10508 |
+
el_attr_td_X.appendChild(el_attr_remove);
|
10509 |
+
|
10510 |
+
}
|
10511 |
+
|
10512 |
+
var t = document.getElementById('edit_table');
|
10513 |
+
|
10514 |
+
var br = document.createElement('br');
|
10515 |
+
var br1 = document.createElement('br');
|
10516 |
+
var br2 = document.createElement('br');
|
10517 |
+
var br3 = document.createElement('br');
|
10518 |
+
var br4 = document.createElement('br');
|
10519 |
+
var br5 = document.createElement('br');
|
10520 |
+
var br6 = document.createElement('br');
|
10521 |
+
|
10522 |
+
edit_main_td1.appendChild(el_label_label);
|
10523 |
+
edit_main_td1_1.appendChild(el_label_textarea);
|
10524 |
+
|
10525 |
+
edit_main_td2.appendChild(el_label_position_label);
|
10526 |
+
edit_main_td2_1.appendChild(el_label_position1);
|
10527 |
+
edit_main_td2_1.appendChild(Left);
|
10528 |
+
edit_main_td2_1.appendChild(br2);
|
10529 |
+
edit_main_td2_1.appendChild(el_label_position2);
|
10530 |
+
edit_main_td2_1.appendChild(Top);
|
10531 |
+
|
10532 |
+
edit_main_td3.appendChild(el_format_label);
|
10533 |
+
edit_main_td3_1.appendChild(el_format_textarea);
|
10534 |
+
|
10535 |
+
edit_main_td4.appendChild(el_button_value_label);
|
10536 |
+
edit_main_td4_1.appendChild(el_button_value_textarea);
|
10537 |
+
|
10538 |
+
edit_main_td5.appendChild(el_style_label);
|
10539 |
+
edit_main_td5_1.appendChild(el_style_textarea);
|
10540 |
+
|
10541 |
+
edit_main_td6.appendChild(el_required_label);
|
10542 |
+
edit_main_td6_1.appendChild(el_required);
|
10543 |
+
|
10544 |
+
edit_main_td7.appendChild(el_attr_label);
|
10545 |
+
edit_main_td7.appendChild(el_attr_add);
|
10546 |
+
edit_main_td7.appendChild(br3);
|
10547 |
+
edit_main_td7.appendChild(el_attr_table);
|
10548 |
+
edit_main_td7.setAttribute("colspan", "2");
|
10549 |
+
|
10550 |
+
edit_main_tr1.appendChild(edit_main_td1);
|
10551 |
+
edit_main_tr1.appendChild(edit_main_td1_1);
|
10552 |
+
edit_main_tr2.appendChild(edit_main_td2);
|
10553 |
+
edit_main_tr2.appendChild(edit_main_td2_1);
|
10554 |
+
edit_main_tr3.appendChild(edit_main_td3);
|
10555 |
+
edit_main_tr3.appendChild(edit_main_td3_1);
|
10556 |
+
edit_main_tr4.appendChild(edit_main_td4);
|
10557 |
+
edit_main_tr4.appendChild(edit_main_td4_1);
|
10558 |
+
edit_main_tr5.appendChild(edit_main_td5);
|
10559 |
+
edit_main_tr5.appendChild(edit_main_td5_1);
|
10560 |
+
edit_main_tr6.appendChild(edit_main_td6);
|
10561 |
+
edit_main_tr6.appendChild(edit_main_td6_1);
|
10562 |
+
edit_main_tr7.appendChild(edit_main_td7);
|
10563 |
+
edit_main_tr7.appendChild(edit_main_td7_1);
|
10564 |
+
edit_main_table.appendChild(edit_main_tr1);
|
10565 |
+
edit_main_table.appendChild(edit_main_tr2);
|
10566 |
+
edit_main_table.appendChild(edit_main_tr3);
|
10567 |
+
edit_main_table.appendChild(edit_main_tr4);
|
10568 |
+
edit_main_table.appendChild(edit_main_tr5);
|
10569 |
+
edit_main_table.appendChild(edit_main_tr6);
|
10570 |
+
edit_main_table.appendChild(edit_main_tr7);
|
10571 |
+
edit_div.appendChild(edit_main_table);
|
10572 |
+
|
10573 |
+
t.appendChild(edit_div);
|
10574 |
+
add_id_and_name(i, 'type_text');
|
10575 |
+
|
10576 |
+
//show table
|
10577 |
+
var adding_type = document.createElement("input");
|
10578 |
+
adding_type.setAttribute("type", "hidden");
|
10579 |
+
adding_type.setAttribute("value", "type_date");
|
10580 |
+
adding_type.setAttribute("name", i+"_typeform_id_temp");
|
10581 |
+
adding_type.setAttribute("id", i+"_typeform_id_temp");
|
10582 |
+
var adding_required = document.createElement("input");
|
10583 |
+
adding_required.setAttribute("type", "hidden");
|
10584 |
+
adding_required.setAttribute("value", w_required);
|
10585 |
+
adding_required.setAttribute("name", i+"_requiredform_id_temp");
|
10586 |
+
|
10587 |
+
adding_required.setAttribute("id", i+"_requiredform_id_temp");
|
10588 |
+
|
10589 |
+
var div = document.createElement('div');
|
10590 |
+
div.setAttribute("id", "main_div");
|
10591 |
+
|
10592 |
+
var table = document.createElement('table');
|
10593 |
+
table.setAttribute("id", i+"_elemet_tableform_id_temp");
|
10594 |
+
|
10595 |
+
var tr = document.createElement('tr');
|
10596 |
+
|
10597 |
+
var td1 = document.createElement('td');
|
10598 |
+
td1.setAttribute("valign", 'middle');
|
10599 |
+
td1.setAttribute("align", 'left');
|
10600 |
+
td1.setAttribute("id", i+"_label_sectionform_id_temp");
|
10601 |
+
|
10602 |
+
var td2 = document.createElement('td');
|
10603 |
+
td2.setAttribute("valign", 'middle');
|
10604 |
+
td2.setAttribute("align", 'left');
|
10605 |
+
td2.setAttribute("id", i+"_element_sectionform_id_temp");
|
10606 |
+
|
10607 |
+
var table_date = document.createElement('table');
|
10608 |
+
table_date.setAttribute("id", i+"_table_date");
|
10609 |
+
table_date.setAttribute("cellpadding", '0');
|
10610 |
+
table_date.setAttribute("cellspacing", '0');
|
10611 |
+
|
10612 |
+
var tr_date1 = document.createElement('tr');
|
10613 |
+
tr_date1.setAttribute("id", i+"_tr_date1");
|
10614 |
+
|
10615 |
+
var tr_date2 = document.createElement('tr');
|
10616 |
+
tr_date2.setAttribute("id", i+"_tr_date2");
|
10617 |
+
|
10618 |
+
var td_date_input1 = document.createElement('td');
|
10619 |
+
td_date_input1.setAttribute("id", i+"_td_date_input1");
|
10620 |
+
|
10621 |
+
var td_date_input2 = document.createElement('td');
|
10622 |
+
td_date_input2.setAttribute("id", i+"_td_date_input2");
|
10623 |
+
|
10624 |
+
var td_date_input3 = document.createElement('td');
|
10625 |
+
td_date_input3.setAttribute("id", i+"_td_date_input3");
|
10626 |
+
|
10627 |
+
var td_date_label1 = document.createElement('td');
|
10628 |
+
td_date_label1.setAttribute("id", i+"_td_date_label1");
|
10629 |
+
|
10630 |
+
var td_date_label2 = document.createElement('td');
|
10631 |
+
td_date_label2.setAttribute("id", i+"_td_date_label2");
|
10632 |
+
|
10633 |
+
var td_date_label3 = document.createElement('td');
|
10634 |
+
td_date_label3.setAttribute("id", i+"_td_date_label3");
|
10635 |
+
|
10636 |
+
var br1 = document.createElement('br');
|
10637 |
+
var br2 = document.createElement('br');
|
10638 |
+
var br3 = document.createElement('br');
|
10639 |
+
var br4 = document.createElement('br');
|
10640 |
+
|
10641 |
|
10642 |
+
var label = document.createElement('span');
|
10643 |
+
label.setAttribute("id", i+"_element_labelform_id_temp");
|
10644 |
+
label.innerHTML = w_field_label;
|
10645 |
+
label.setAttribute("class", "label");
|
10646 |
+
var required = document.createElement('span');
|
10647 |
+
required.setAttribute("id", i+"_required_elementform_id_temp");
|
10648 |
+
required.innerHTML = "";
|
10649 |
+
required.setAttribute("class", "required");
|
10650 |
+
if(w_required=="yes")
|
10651 |
+
required.innerHTML = " *";
|
10652 |
+
|
10653 |
+
var adding = document.createElement('input');
|
10654 |
+
adding.setAttribute("type", 'text');
|
10655 |
+
adding.setAttribute("value", w_date);
|
10656 |
+
adding.setAttribute("class", 'wdform_date');
|
10657 |
+
adding.setAttribute("id", i+"_elementform_id_temp");
|
10658 |
+
adding.setAttribute("name", i+"_elementform_id_temp");
|
10659 |
+
adding.setAttribute("maxlength", "10");
|
10660 |
+
adding.setAttribute("size", "10");
|
10661 |
+
adding.setAttribute("onChange", "change_value('"+i+"_elementform_id_temp')");
|
10662 |
+
|
10663 |
+
var adding_button = document.createElement('input');
|
10664 |
+
adding_button.setAttribute("id", i+"_buttonform_id_temp");
|
10665 |
+
adding_button.setAttribute("type", 'reset');
|
10666 |
+
adding_button.setAttribute("value", w_but_val);
|
10667 |
+
adding_button.setAttribute("format", w_format);
|
10668 |
+
adding_button.setAttribute("onclick", "return showCalendar('"+i+"_elementform_id_temp' ,'"+w_format+"')");
|
10669 |
+
adding_button.setAttribute("class", 'button');
|
10670 |
+
|
10671 |
+
var main_td = document.getElementById('show_table');
|
10672 |
+
|
10673 |
+
td1.appendChild(label);
|
10674 |
+
td1.appendChild(required);
|
10675 |
+
|
10676 |
+
td2.appendChild(adding_type);
|
10677 |
+
|
10678 |
+
td2.appendChild(adding_required);
|
10679 |
+
td2.appendChild(adding);
|
10680 |
+
td2.appendChild(adding_button);
|
10681 |
+
tr.appendChild(td1);
|
10682 |
+
tr.appendChild(td2);
|
10683 |
+
table.appendChild(tr);
|
10684 |
+
|
10685 |
+
div.appendChild(table);
|
10686 |
+
div.appendChild(br3);
|
10687 |
+
main_td.appendChild(div);
|
10688 |
+
|
10689 |
+
if(w_field_label_pos=="top")
|
10690 |
+
label_top(i);
|
10691 |
+
change_class(w_class, i);
|
10692 |
+
refresh_attr(i, 'type_date');
|
10693 |
+
}
|
10694 |
|
10695 |
+
function field_to_select(id, type)
|
10696 |
+
{
|
10697 |
+
|
10698 |
+
switch(type)
|
10699 |
+
{
|
10700 |
+
case 'day':
|
10701 |
+
{
|
10702 |
+
w_width=document.getElementById('edit_for_day_size').value!=''?document.getElementById('edit_for_day_size').value:30;
|
10703 |
+
w_day=document.getElementById(id+"_dayform_id_temp").value;
|
10704 |
+
document.getElementById(id+"_td_date_input1").innerHTML='';
|
10705 |
+
|
10706 |
+
var select_day = document.createElement('select');
|
10707 |
+
select_day.setAttribute("id", id+'_dayform_id_temp');
|
10708 |
+
select_day.setAttribute("name", id+'_dayform_id_temp');
|
10709 |
+
select_day.setAttribute("onChange", 'set_select(this)');
|
10710 |
+
select_day.style.width=w_width+'px';
|
10711 |
+
|
10712 |
+
var options = document.createElement('option');
|
10713 |
+
options.setAttribute("value",'');
|
10714 |
+
options.innerHTML= '';
|
10715 |
+
select_day.appendChild(options);
|
10716 |
+
|
10717 |
+
for(k=1; k<=31;k++)
|
10718 |
+
{
|
10719 |
+
if(k<10)
|
10720 |
+
k='0'+k;
|
10721 |
+
var options = document.createElement('option');
|
10722 |
+
options.setAttribute("value", k);
|
10723 |
+
options.innerHTML= k;
|
10724 |
+
if (k==w_day)
|
10725 |
+
options.setAttribute("selected", "selected");
|
10726 |
+
|
10727 |
+
select_day.appendChild(options);
|
10728 |
+
|
10729 |
+
}
|
10730 |
+
|
10731 |
+
document.getElementById(id+"_td_date_input1").appendChild(select_day);
|
10732 |
+
|
10733 |
+
break;
|
10734 |
+
}
|
10735 |
+
case 'month':
|
10736 |
+
{
|
10737 |
+
w_width=document.getElementById('edit_for_month_size').value!=''?document.getElementById('edit_for_month_size').value:60;
|
10738 |
+
w_month=document.getElementById(id+"_monthform_id_temp").value;
|
10739 |
+
|
10740 |
+
document.getElementById(id+"_td_date_input2").innerHTML='';
|
10741 |
+
|
10742 |
+
var select_month = document.createElement('select');
|
10743 |
+
select_month.setAttribute("id", id+'_monthform_id_temp');
|
10744 |
+
select_month.setAttribute("name", id+'_monthform_id_temp');
|
10745 |
+
select_month.setAttribute("onChange", 'set_select(this)');
|
10746 |
+
select_month.style.width=w_width+'px';
|
10747 |
+
|
10748 |
+
var options = document.createElement('option');
|
10749 |
+
options.setAttribute("value",'');
|
10750 |
+
options.innerHTML= '';
|
10751 |
+
select_month.appendChild(options);
|
10752 |
+
|
10753 |
+
var myMonths=new Array("<!--repstart-->January<!--repend-->","<!--repstart-->February<!--repend-->","<!--repstart-->March<!--repend-->","<!--repstart-->April<!--repend-->","<!--repstart-->May<!--repend-->","<!--repstart-->June<!--repend-->","<!--repstart-->July<!--repend-->","<!--repstart-->August<!--repend-->","<!--repstart-->September<!--repend-->","<!--repstart-->October<!--repend-->","<!--repstart-->November<!--repend-->","<!--repstart-->December<!--repend-->");
|
10754 |
+
for(k=1; k<=12;k++)
|
10755 |
+
{
|
10756 |
+
if(k<10)
|
10757 |
+
k='0'+k;
|
10758 |
+
var options = document.createElement('option');
|
10759 |
+
options.setAttribute("value", k);
|
10760 |
+
options.innerHTML= myMonths[k-1];
|
10761 |
+
if (k==w_month)
|
10762 |
+
options.setAttribute("selected", "selected");
|
10763 |
+
|
10764 |
+
select_month.appendChild(options);
|
10765 |
+
|
10766 |
+
}
|
10767 |
+
document.getElementById(id+"_td_date_input2").appendChild(select_month);
|
10768 |
+
break;
|
10769 |
+
}
|
10770 |
+
case 'year':
|
10771 |
+
{
|
10772 |
+
w_width=document.getElementById('edit_for_year_size').value!=''?document.getElementById('edit_for_year_size').value:60;
|
10773 |
+
w_year=document.getElementById(id+"_yearform_id_temp").value;
|
10774 |
+
|
10775 |
+
document.getElementById(id+"_td_date_input3").innerHTML='';
|
10776 |
+
var select_year = document.createElement('select');
|
10777 |
+
select_year.setAttribute("id", id+'_yearform_id_temp');
|
10778 |
+
select_year.setAttribute("name", id+'_yearform_id_temp');
|
10779 |
+
select_year.setAttribute("onChange", 'set_select(this)');
|
10780 |
+
select_year.style.width=w_width+'px';
|
10781 |
+
|
10782 |
+
var options = document.createElement('option');
|
10783 |
+
options.setAttribute("value",'');
|
10784 |
+
options.innerHTML= '';
|
10785 |
+
select_year.appendChild(options);
|
10786 |
+
|
10787 |
+
from= parseInt(document.getElementById("edit_for_year_interval_from").value);
|
10788 |
+
to= parseInt(document.getElementById("edit_for_year_interval_to").value);
|
10789 |
+
for(k=to; k>=from;k--)
|
10790 |
+
{
|
10791 |
+
var options = document.createElement('option');
|
10792 |
+
options.setAttribute("value", k);
|
10793 |
+
options.innerHTML= k;
|
10794 |
+
if (k==w_year)
|
10795 |
+
options.setAttribute("selected", "selected");
|
10796 |
+
|
10797 |
+
select_year.appendChild(options);
|
10798 |
+
}
|
10799 |
+
select_year.value=w_year;
|
10800 |
+
select_year.setAttribute('from',from);
|
10801 |
+
select_year.setAttribute('to',to);
|
10802 |
+
document.getElementById(id+"_td_date_input3").appendChild(select_year);
|
10803 |
+
|
10804 |
+
break;
|
10805 |
+
}
|
10806 |
+
}
|
10807 |
+
|
10808 |
+
refresh_attr(id, 'type_date_fields');
|
10809 |
|
|
|
|
|
|
|
|
|
10810 |
}
|
10811 |
|
10812 |
+
function field_to_text(id, type)
|
10813 |
+
{
|
10814 |
+
|
10815 |
+
switch(type)
|
10816 |
+
{
|
10817 |
+
case 'day':
|
10818 |
+
{
|
10819 |
+
w_width=document.getElementById('edit_for_day_size').value!=''?document.getElementById('edit_for_day_size').value:30;
|
10820 |
+
w_day=document.getElementById(id+"_dayform_id_temp").value;
|
10821 |
+
document.getElementById(id+"_td_date_input1").innerHTML='';
|
10822 |
+
|
10823 |
+
var day = document.createElement('input');
|
10824 |
+
day.setAttribute("type", 'text');
|
10825 |
+
day.setAttribute("value", w_day);
|
10826 |
+
//day.setAttribute("class", "time_box");
|
10827 |
+
day.setAttribute("id", id+"_dayform_id_temp");
|
10828 |
+
day.setAttribute("name", id+"_dayform_id_temp");
|
10829 |
+
day.setAttribute("onChange", "change_value('"+ id+"_dayform_id_temp')");
|
10830 |
+
day.setAttribute("onKeyPress", "return check_day(event, '"+id+"_dayform_id_temp')");
|
10831 |
+
day.setAttribute("onBlur", "if (this.value=='0') this.value=''; else add_0('"+id+"_dayform_id_temp')");
|
10832 |
+
|
10833 |
+
day.style.width=w_width+'px';
|
10834 |
+
|
10835 |
+
document.getElementById(id+"_td_date_input1").appendChild(day);
|
10836 |
+
break;
|
10837 |
+
}
|
10838 |
+
case 'month':
|
10839 |
+
{
|
10840 |
+
w_width=document.getElementById('edit_for_month_size').value!=''?document.getElementById('edit_for_month_size').value:60;
|
10841 |
+
w_month=document.getElementById(id+"_monthform_id_temp").value;
|
10842 |
+
|
10843 |
+
document.getElementById(id+"_td_date_input2").innerHTML='';
|
10844 |
+
|
10845 |
+
var month = document.createElement('input');
|
10846 |
+
month.setAttribute("type", 'text');
|
10847 |
+
month.setAttribute("value", w_month);
|
10848 |
+
//month.setAttribute("class", "time_box");
|
10849 |
+
month.setAttribute("id", id+"_monthform_id_temp");
|
10850 |
+
month.setAttribute("name", id+"_monthform_id_temp");
|
10851 |
+
month.style.width=w_width+'px';
|
10852 |
+
month.setAttribute("onKeyPress", "return check_month(event, '"+id+"_monthform_id_temp')");
|
10853 |
+
month.setAttribute("onChange", "change_value('"+id+"_monthform_id_temp')");
|
10854 |
+
month.setAttribute("onBlur", "if (this.value=='0') this.value=''; else add_0('"+id+"_monthform_id_temp')");
|
10855 |
+
/*month.setAttribute("onKeyPress", "return check_minute(event, '"+i+"_mmform_id_temp')");
|
10856 |
+
month.setAttribute("onKeyUp", "change_minute(event, '"+i+"_mmform_id_temp')");
|
10857 |
+
month.setAttribute("onBlur", "add_0('"+i+"_mmform_id_temp')");*/
|
10858 |
+
|
10859 |
+
document.getElementById(id+"_td_date_input2").appendChild(month);
|
10860 |
+
break;
|
10861 |
+
}
|
10862 |
+
case 'year':
|
10863 |
+
{
|
10864 |
+
w_width=document.getElementById('edit_for_year_size').value!=''?document.getElementById('edit_for_year_size').value:60;
|
10865 |
+
w_year=document.getElementById(id+"_yearform_id_temp").value;
|
10866 |
+
|
10867 |
+
document.getElementById(id+"_td_date_input3").innerHTML='';
|
10868 |
+
|
10869 |
+
from= parseInt(document.getElementById("edit_for_year_interval_from").value);
|
10870 |
+
to= parseInt(document.getElementById("edit_for_year_interval_to").value);
|
10871 |
+
if((parseInt(w_year)<from) || (parseInt(w_year)>to))
|
10872 |
+
w_year='';
|
10873 |
+
var year = document.createElement('input');
|
10874 |
+
year.setAttribute("type", 'text');
|
10875 |
+
year.setAttribute("value", w_year);
|
10876 |
+
//year.setAttribute("class", "time_box");
|
10877 |
+
year.setAttribute("id", id+"_yearform_id_temp");
|
10878 |
+
year.setAttribute("name", id+"_yearform_id_temp");
|
10879 |
+
year.setAttribute("onChange", "change_year('"+id+"_yearform_id_temp')");
|
10880 |
+
year.setAttribute("onKeyPress", "return check_year1(event, '"+id+"_yearform_id_temp')");
|
10881 |
+
year.setAttribute("onBlur", "check_year2('"+id+"_yearform_id_temp')");
|
10882 |
+
year.style.width=w_width+'px';
|
10883 |
+
year.setAttribute('from',from);
|
10884 |
+
year.setAttribute('to',to);
|
10885 |
+
|
10886 |
+
document.getElementById(id+"_td_date_input3").appendChild(year);
|
10887 |
+
|
10888 |
+
break;
|
10889 |
+
}
|
10890 |
+
}
|
10891 |
+
refresh_attr(id, 'type_date_fields');
|
10892 |
|
|
|
|
|
10893 |
|
10894 |
+
}
|
|
|
10895 |
|
10896 |
+
function set_divider(id, divider)
|
10897 |
+
{
|
10898 |
+
document.getElementById(id+"_separator1").innerHTML=divider;
|
10899 |
+
document.getElementById(id+"_separator2").innerHTML=divider;
|
10900 |
}
|
10901 |
|
10902 |
+
function year_interval(id)
|
10903 |
+
{
|
10904 |
+
from= parseInt(document.getElementById("edit_for_year_interval_from").value);
|
10905 |
+
to= parseInt(document.getElementById("edit_for_year_interval_to").value);
|
10906 |
+
if(to-from<0)
|
10907 |
+
{
|
10908 |
+
alert('Invalid interval of years.');
|
10909 |
+
document.getElementById("edit_for_year_interval_from").value=to;
|
10910 |
+
}
|
10911 |
+
else
|
10912 |
+
{
|
10913 |
+
if(document.getElementById(id+"_yearform_id_temp").tagName=='SELECT')
|
10914 |
+
field_to_select(id, 'year');
|
10915 |
+
else
|
10916 |
+
field_to_text(id, 'year');
|
10917 |
+
}
|
10918 |
+
}
|
10919 |
|
10920 |
+
function type_date_fields(i, w_field_label, w_field_label_pos, w_day, w_month, w_year, w_day_type, w_month_type, w_year_type, w_day_label, w_month_label, w_year_label, w_day_size, w_month_size, w_year_size, w_required, w_class, w_from, w_to, w_divider, w_attr_name, w_attr_value) {
|
10921 |
|
10922 |
+
document.getElementById("element_type").value="type_date_fields";
|
|
|
|
|
|
|
10923 |
|
10924 |
+
delete_last_child();
|
10925 |
+
// edit table
|
10926 |
+
var edit_div = document.createElement('div');
|
10927 |
+
edit_div.setAttribute("id", "edit_div");
|
10928 |
+
edit_div.setAttribute("style", "border-top:1px dotted black;padding:10px; padding-top:0px; padding-bottom:0px; margin-top:10px;");
|
10929 |
+
|
10930 |
+
var edit_main_table = document.createElement('table');
|
10931 |
+
edit_main_table.setAttribute("id", "edit_main_table");
|
10932 |
+
edit_main_table.setAttribute("cellpadding", "0");
|
10933 |
+
edit_main_table.setAttribute("cellspacing", "0");
|
10934 |
+
|
10935 |
+
var edit_main_tr1 = document.createElement('tr');
|
10936 |
+
edit_main_tr1.setAttribute("valing", "top");
|
10937 |
+
|
10938 |
+
var edit_main_tr2 = document.createElement('tr');
|
10939 |
+
edit_main_tr2.setAttribute("valing", "top");
|
10940 |
+
|
10941 |
+
var edit_main_tr3 = document.createElement('tr');
|
10942 |
+
edit_main_tr3.setAttribute("valing", "top");
|
10943 |
+
|
10944 |
+
var edit_main_tr4 = document.createElement('tr');
|
10945 |
+
edit_main_tr4.setAttribute("valing", "top");
|
10946 |
+
|
10947 |
+
var edit_main_tr8 = document.createElement('tr');
|
10948 |
+
edit_main_tr8.setAttribute("valing", "top");
|
10949 |
+
|
10950 |
+
var edit_main_tr9 = document.createElement('tr');
|
10951 |
+
edit_main_tr9.setAttribute("valing", "top");
|
10952 |
+
|
10953 |
+
var edit_main_tr5 = document.createElement('tr');
|
10954 |
+
edit_main_tr5.setAttribute("valing", "top");
|
10955 |
+
|
10956 |
+
var edit_main_tr6 = document.createElement('tr');
|
10957 |
+
edit_main_tr6.setAttribute("valing", "top");
|
10958 |
+
|
10959 |
+
var edit_main_tr7 = document.createElement('tr');
|
10960 |
+
edit_main_tr7.setAttribute("valing", "top");
|
10961 |
+
|
10962 |
+
var edit_main_td1 = document.createElement('td');
|
10963 |
+
edit_main_td1.style.cssText = "padding-top:10px";
|
10964 |
+
var edit_main_td1_1 = document.createElement('td');
|
10965 |
+
edit_main_td1_1.style.cssText = "padding-top:10px";
|
10966 |
+
var edit_main_td2 = document.createElement('td');
|
10967 |
+
edit_main_td2.style.cssText = "padding-top:10px";
|
10968 |
+
var edit_main_td2_1 = document.createElement('td');
|
10969 |
+
edit_main_td2_1.style.cssText = "padding-top:10px";
|
10970 |
+
|
10971 |
+
var edit_main_td3 = document.createElement('td');
|
10972 |
+
edit_main_td3.style.cssText = "padding-top:10px";
|
10973 |
+
var edit_main_td3_1 = document.createElement('td');
|
10974 |
+
edit_main_td3_1.style.cssText = "padding-top:10px";
|
10975 |
+
|
10976 |
+
var edit_main_td4 = document.createElement('td');
|
10977 |
+
edit_main_td4.style.cssText = "padding-top:10px";
|
10978 |
+
var edit_main_td4_1 = document.createElement('td');
|
10979 |
+
edit_main_td4_1.style.cssText = "padding-top:10px";
|
10980 |
+
|
10981 |
+
var edit_main_td8 = document.createElement('td');
|
10982 |
+
edit_main_td8.style.cssText = "padding-top:10px";
|
10983 |
+
var edit_main_td8_1 = document.createElement('td');
|
10984 |
+
edit_main_td8_1.style.cssText = "padding-top:10px";
|
10985 |
+
|
10986 |
+
var edit_main_td9 = document.createElement('td');
|
10987 |
+
edit_main_td9.style.cssText = "padding-top:10px";
|
10988 |
+
var edit_main_td9_1 = document.createElement('td');
|
10989 |
+
edit_main_td9_1.style.cssText = "padding-top:10px";
|
10990 |
+
|
10991 |
+
var edit_main_td5 = document.createElement('td');
|
10992 |
+
edit_main_td5.style.cssText = "padding-top:10px";
|
10993 |
+
var edit_main_td5_1 = document.createElement('td');
|
10994 |
+
edit_main_td5_1.style.cssText = "padding-top:10px";
|
10995 |
+
|
10996 |
+
var edit_main_td6 = document.createElement('td');
|
10997 |
+
edit_main_td6.style.cssText = "padding-top:10px";
|
10998 |
+
var edit_main_td6_1 = document.createElement('td');
|
10999 |
+
edit_main_td6_1.style.cssText = "padding-top:10px";
|
11000 |
+
|
11001 |
+
var edit_main_td7 = document.createElement('td');
|
11002 |
+
edit_main_td7.style.cssText = "padding-top:10px";
|
11003 |
+
var edit_main_td7_1 = document.createElement('td');
|
11004 |
+
edit_main_td7_1.style.cssText = "padding-top:10px";
|
11005 |
+
|
11006 |
+
var el_label_label = document.createElement('label');
|
11007 |
+
el_label_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
11008 |
+
el_label_label.innerHTML = "Field label";
|
11009 |
+
|
11010 |
+
var el_label_textarea = document.createElement('textarea');
|
11011 |
+
el_label_textarea.setAttribute("id", "edit_for_label");
|
11012 |
+
el_label_textarea.setAttribute("rows", "4");
|
11013 |
+
el_label_textarea.style.cssText = "width:200px;";
|
11014 |
+
el_label_textarea.setAttribute("onKeyUp", "change_label('"+i+"_element_labelform_id_temp', this.value)");
|
11015 |
+
el_label_textarea.innerHTML = w_field_label;
|
11016 |
+
|
11017 |
+
var el_label_position_label = document.createElement('label');
|
11018 |
+
el_label_position_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
11019 |
+
el_label_position_label.innerHTML = "Field label position";
|
11020 |
+
|
11021 |
+
var el_label_position1 = document.createElement('input');
|
11022 |
+
el_label_position1.setAttribute("id", "edit_for_label_position_top");
|
11023 |
+
el_label_position1.setAttribute("type", "radio");
|
11024 |
+
el_label_position1.setAttribute("value", "left");
|
11025 |
+
|
11026 |
+
|
11027 |
+
el_label_position1.setAttribute("name", "edit_for_label_position");
|
11028 |
+
el_label_position1.setAttribute("onchange", "label_left("+i+")");
|
11029 |
+
el_label_position1.setAttribute("checked", "checked");
|
11030 |
+
Left = document.createTextNode("Left");
|
11031 |
+
|
11032 |
+
var el_label_position2 = document.createElement('input');
|
11033 |
+
el_label_position2.setAttribute("id", "edit_for_label_position_left");
|
11034 |
+
el_label_position2.setAttribute("type", "radio");
|
11035 |
+
el_label_position2.setAttribute("value", "top");
|
11036 |
+
|
11037 |
+
el_label_position2.setAttribute("name", "edit_for_label_position");
|
11038 |
+
el_label_position2.setAttribute("onchange", "label_top("+i+")");
|
11039 |
+
Top = document.createTextNode("Top");
|
11040 |
+
|
11041 |
+
if(w_field_label_pos=="top")
|
11042 |
+
|
11043 |
+
el_label_position2.setAttribute("checked", "checked");
|
11044 |
+
else
|
11045 |
+
el_label_position1.setAttribute("checked", "checked");
|
11046 |
+
|
11047 |
+
|
11048 |
+
var el_fields_divider_label = document.createElement('label');
|
11049 |
+
el_fields_divider_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
11050 |
+
el_fields_divider_label.innerHTML = "Fields separator";
|
11051 |
+
|
11052 |
+
var el_fields_divider = document.createElement('input');
|
11053 |
+
el_fields_divider.setAttribute("id", "edit_for_fields_divider");
|
11054 |
+
el_fields_divider.setAttribute("type", "text");
|
11055 |
+
el_fields_divider.setAttribute("value", w_divider);
|
11056 |
+
el_fields_divider.style.cssText = "margin-left:15px; width:80px";
|
11057 |
+
el_fields_divider.setAttribute("onKeyUp", "set_divider('"+i+"', this.value)");
|
11058 |
+
|
11059 |
+
/////////////////////////////////////////////////////////////////////////////////
|
11060 |
+
//////////////////////////////// D A Y //////////////////////////////////////////
|
11061 |
+
/////////////////////////////////////////////////////////////////////////////////
|
11062 |
+
|
11063 |
+
var el_day_field_type_label = document.createElement('label');
|
11064 |
+
el_day_field_type_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
11065 |
+
el_day_field_type_label.innerHTML = "Day field type";
|
11066 |
+
|
11067 |
+
var el_day_field_type_input1 = document.createElement('input');
|
11068 |
+
el_day_field_type_input1.setAttribute("id", "el_day_field_type_text");
|
11069 |
+
el_day_field_type_input1.setAttribute("type", "radio");
|
11070 |
+
el_day_field_type_input1.setAttribute("value", "text");
|
11071 |
+
el_day_field_type_input1.setAttribute("name", "edit_for_day_field_type");
|
11072 |
+
el_day_field_type_input1.setAttribute("onchange", "field_to_text("+i+", 'day')");
|
11073 |
+
Text_1 = document.createTextNode("Input");
|
11074 |
+
|
11075 |
+
var el_day_field_type_input2 = document.createElement('input');
|
11076 |
+
el_day_field_type_input2.setAttribute("id", "el_day_field_type_select");
|
11077 |
+
el_day_field_type_input2.setAttribute("type", "radio");
|
11078 |
+
el_day_field_type_input2.setAttribute("value", "select");
|
11079 |
+
el_day_field_type_input2.setAttribute("name", "edit_for_day_field_type");
|
11080 |
+
el_day_field_type_input2.setAttribute("onchange", "field_to_select("+i+", 'day')");
|
11081 |
+
Select_1= document.createTextNode("Select");
|
11082 |
+
|
11083 |
+
if(w_day_type=="SELECT")
|
11084 |
+
el_day_field_type_input2.setAttribute("checked", "checked");
|
11085 |
+
else
|
11086 |
+
el_day_field_type_input1.setAttribute("checked", "checked");
|
11087 |
+
|
11088 |
+
var el_day_field_size_label = document.createElement('label');
|
11089 |
+
el_day_field_size_label.style.cssText ="color:#00aeef; font-weight:bold; font-size: 13px";
|
11090 |
+
el_day_field_size_label.innerHTML = "Day field size(px)";
|
11091 |
+
|
11092 |
+
var el_day_field_size_input = document.createElement('input');
|
11093 |
+
el_day_field_size_input.setAttribute("id", "edit_for_day_size");
|
11094 |
+
el_day_field_size_input.setAttribute("type", "text");
|
11095 |
+
el_day_field_size_input.setAttribute("value", w_day_size);
|
11096 |
+
el_day_field_size_input.setAttribute("onKeyPress", "return check_
|