Plugin Directory

Changeset 3006114


Ignore:
Timestamp:
12/06/2023 10:11:09 AM (2 years ago)
Author:
devsoftbaltic
Message:

updated to v1.9.120

Location:
surveyjs
Files:
15 added
7 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • surveyjs/trunk/ajax_handlers/get_survey_json.php

    r2097896 r3006114  
    1616            $query = "SELECT * FROM " . $table_name . " WHERE id=" . $surveyId;
    1717            $json =  $wpdb->get_row($query)->json;
     18            $theme =  $wpdb->get_row($query)->theme;
    1819
    19             wp_send_json( array('json' => $json) );
     20            wp_send_json( array('json' => $json, 'theme' => $theme) );
    2021        }
    2122    }
  • surveyjs/trunk/ajax_handlers/save_survey.php

    r2454557 r3006114  
    1313            $id = sanitize_key($_POST['Id']);
    1414            $json = current_user_can( 'unfiltered_html' ) ? $_POST['Json'] : wp_kses_post( $_POST['Json'] );
     15            $theme = current_user_can( 'unfiltered_html' ) ? $_POST['Theme'] : wp_kses_post( $_POST['Theme'] );
    1516
    1617            if(!!$json) {
     
    2122                    $table_name,
    2223                    array(
    23                         'json' => $json
     24                        'json' => $json,
     25                        'theme' => $theme
    2426                    ),
    2527                    array(
  • surveyjs/trunk/initializer.php

    r2506505 r3006114  
    8181            $_GET['page'] == "surveyjs_results")
    8282        ) {
     83            wp_enqueue_style('wps-adm-bootstrap-css', plugins_url('libs/bootstrap.min.css', __FILE__) );
     84           
     85            wp_enqueue_style('wps-adm-normalize-css', plugins_url('/normalize.css', __FILE__) );
    8386            wp_enqueue_style('wps-adm-index-css', plugins_url('/index.css', __FILE__) );
    8487
    85             wp_enqueue_script('wps-adm-knockout-js', plugins_url('libs/knockout.min.js', __FILE__));
    86             wp_enqueue_style('wps-adm-bootstrap-css', plugins_url('libs/bootstrap.min.css', __FILE__) );
    87 
    88             wp_enqueue_style('wps-adm-survey-css', plugins_url('libs/modern.css', __FILE__) );
    89             wp_enqueue_script('wps-adm-survey-ko-js', plugins_url('libs/survey.ko.min.js', __FILE__), array('wps-adm-knockout-js'));
    90             wp_enqueue_style('wps-adm-surveyjseditor-css', plugins_url('libs/survey-creator.css', __FILE__) );
    91             wp_enqueue_script('wps-adm-surveyjseditor-js', plugins_url('libs/survey-creator.min.js', __FILE__), array('wps-adm-survey-ko-js'));
     88            wp_enqueue_script('wps-adm--babel.min.js', plugins_url('libs/babel.min.js', __FILE__));
     89
     90            wp_enqueue_script('wps-adm--survey.core.min.js', plugins_url('libs/library/survey.core.min.js', __FILE__));
     91            wp_enqueue_script('wps-adm--survey.i18n.min.js', plugins_url('libs/library/survey.i18n.min.js', __FILE__));
     92            wp_enqueue_script('wps-adm--themes-index.min.js', plugins_url('libs/library/themes/index.min.js', __FILE__));
     93            wp_enqueue_script('wps-adm--survey-react-ui.min.js', plugins_url('libs/library/survey-react-ui.min.js', __FILE__));
     94
     95            wp_enqueue_script('wps-adm--survey-creator-core.min.js', plugins_url('libs/creator/survey-creator-core.min.js', __FILE__));
     96            wp_enqueue_script('wps-adm--survey-creator-core.i18n.min.js', plugins_url('libs/creator/survey-creator-core.i18n.min.js', __FILE__));
     97            wp_enqueue_script('wps-adm--survey-creator-react.min.js', plugins_url('libs/creator/survey-creator-react.min.js', __FILE__));
     98
     99            wp_enqueue_style('wps-adm--defaultV2.min.css', plugins_url('libs/library/defaultV2.min.css', __FILE__));
     100
     101            wp_enqueue_style('wps-adm--survey-creator-core.min.css', plugins_url('libs/creator/survey-creator-core.min.css', __FILE__));
     102
     103
     104            // wp_enqueue_script('wps-adm-knockout-js', plugins_url('libs/knockout.min.js', __FILE__));
     105
     106            // wp_enqueue_style('wps-adm-survey-css', plugins_url('libs/modern.css', __FILE__) );
     107            // wp_enqueue_script('wps-adm-survey-ko-js', plugins_url('libs/survey.ko.min.js', __FILE__), array('wps-adm-knockout-js'));
     108            // wp_enqueue_style('wps-adm-surveyjseditor-css', plugins_url('libs/survey-creator.css', __FILE__) );
     109            // wp_enqueue_script('wps-adm-surveyjseditor-js', plugins_url('libs/survey-creator.min.js', __FILE__), array('wps-adm-survey-ko-js'));
    92110
    93111            wp_enqueue_style('wps-adm-datatables-css', plugins_url('libs/datatables/dataTables.min.css', __FILE__) );
     
    108126
    109127    public function enqueue_frontend_scripts() {
    110         $theme = sanitize_text_field(SurveyJS_SettingsPage::get_theme());
    111         if ($theme == "modern") {
    112             wp_enqueue_style('wps-survey-modern-css', plugins_url('libs/modern.css', __FILE__) );
    113         } else {
    114             wp_enqueue_style('wps-survey-css', plugins_url('libs/survey.css', __FILE__) );
    115         }
     128        // $theme = sanitize_text_field(SurveyJS_SettingsPage::get_theme());
     129        // if ($theme == "modern") {
     130        //     wp_enqueue_style('wps-survey-modern-css', plugins_url('libs/modern.css', __FILE__) );
     131        // } else {
     132        //     wp_enqueue_style('wps-survey-css', plugins_url('libs/survey.css', __FILE__) );
     133        // }
    116134        wp_enqueue_style('wps-survey-override-css', plugins_url('/survey.css', __FILE__) );
    117         wp_enqueue_script('wps-survey-jquery-js', plugins_url('libs/survey.jquery.min.js', __FILE__), array('jquery'));
     135        wp_enqueue_script('wps-front-jquery-js', plugins_url('libs/library/survey.jquery.min.js', __FILE__), array('jquery'));
     136        wp_enqueue_script('wps-front--themes-index.min.js', plugins_url('libs/library/themes/index.min.js', __FILE__));
     137        wp_enqueue_style('wps-front--defaultV2.min.css', plugins_url('libs/library/defaultV2.min.css', __FILE__));       
    118138    }
    119139 
     
    125145        //                 __CLASS__, 'wps_mysurveys_page'
    126146        //                 ));
    127         add_submenu_page( 'sjs-main-menu', __( 'Settings', 'sjs-main-menu' ), __( 'Settings', 'sjs-main-menu' ), 'manage_options', 'sjs-settings', array( 'SurveyJS_SettingsPage', 'sjs_render_settings' ) );
     147        //add_submenu_page( 'sjs-main-menu', __( 'Settings', 'sjs-main-menu' ), __( 'Settings', 'sjs-main-menu' ), 'manage_options', 'sjs-settings', array( 'SurveyJS_SettingsPage', 'sjs_render_settings' ) );
    128148        add_submenu_page('', '', '', 'manage_options', 'surveyjs_editor', array('SurveyJS_Editor', 'render'));
    129149        add_submenu_page('', '', '', 'manage_options', 'surveyjs_results', array('SurveyJS_Results', 'render'));
     
    163183                        json = JSON.parse(data.json.replace(/\\\"/g, "\"").replace(/\\\\/g, "\\").replace(/\\'/g, "'"));
    164184                    }
    165                     initSurvey<?php echo $id ?>(json);
     185                    if (data.theme) {
     186                        theme = JSON.parse(data.theme.replace(/\\\"/g, "\"").replace(/\\\\/g, "\\").replace(/\\'/g, "'"));
     187                    }
     188                    initSurvey<?php echo $id ?>(json, theme);
    166189                }
    167190            });
    168191
    169             function initSurvey<?php echo $id ?>(json) {
    170                 Survey.StylesManager.applyTheme('<?php echo sanitize_text_field(SurveyJS_SettingsPage::get_theme()) ?>');
    171 
    172                 var customCss = {
    173                     <?php
    174                         if (SurveyJS_SettingsPage::get_allow_paddings() == 0) {
    175                             echo '"root": "sv_main sv_default_css"';
    176                         }
    177                     ?>
    178                 }
    179 
    180                 window.survey<?php echo $id ?> = new Survey.Model(json);
    181 
     192            function initSurvey<?php echo $id ?>(json, theme) {
     193                // Survey.StylesManager.applyTheme('<?php echo sanitize_text_field(SurveyJS_SettingsPage::get_theme()) ?>');
     194
     195                // var customCss = {
     196                //     <?php
     197                //         if (SurveyJS_SettingsPage::get_allow_paddings() == 0) {
     198                //             echo '"root": "sv_main sv_default_css"';
     199                //         }
     200                //     ?>
     201                // }
     202
     203                const survey<?php echo $id ?> = new Survey.Model(json);
     204                survey<?php echo $id ?>.applyTheme(theme);
     205                window.survey<?php echo $id ?> = survey<?php echo $id ?>;
    182206                survey<?php echo $id ?>
    183207                    .onComplete
     
    194218                    });
    195219
    196                 jQuery("#surveyElement-<?php echo $id ?>").Survey({model: survey<?php echo $id ?>, css: customCss});
     220                jQuery("#surveyElement-<?php echo $id ?>").Survey({model: survey<?php echo $id ?>/*, css: customCss*/});
    197221            }
    198222        </script>       
  • surveyjs/trunk/readme.txt

    r2849163 r3006114  
    1 === SurveyJS ===
     1=== SurveyJS: Drag & Drop WordPress Form Builder to create, style and embed multiple forms of any complexity. ===
    22Contributors: devsoftbaltic
    33Tags: survey, quiz, form builder, survey creator, survey maker, quiz creator
    4 Requires at least: 4.6
    5 Tested up to: 6.1.1
     4Requires at least: 6.4.1
     5Tested up to: 6.4.1
    66Stable tag: trunk
    7 Requires PHP: 5.2.4
     7Requires PHP: php8.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 SurveyJS for WordPress - Survey, Quiz, Survey Creator and Form Builder plug-in.
    12 
    1311== Description ==
    1412
    15 Easy to use, drag & drop Survey Creator with myriad options. It is based on popular in JavaScript developer community [SurveyJS Library](https://surveyjs.io/Overview/Library/) and [Survey Creator](https://surveyjs.io/Survey/Survey-Creator/).
     13=Drag & Drop WordPress Form Builder for your Enterprise=
     14SurveyJS is **the most advanced yet easy-to-use form builder**, perfect for enterprises of any size. You can use it to build something as simple as a Contact or Feedback form, or to handle more complex use cases, such as an Application form with dynamic fields whose values are calculated and set based on the user's input and pre-defined conditions.
    1615
    17 *Main features:*
    18 * It has 15 elements (questions and panels) from simple inputs like text and dropdown to Panel containers and dynamic matrix (table), that allows to build you complex forms.
    19 * Multi pages support
    20 * It is localized on many languages and supporting multi language surveys/forms (one survey for several languages).
    21 * Control survey flow by setting visibility expression for pages, panels, questions and even individual items in checkboxes, radio groups and dropdowns.
    22 * Fill data for checkboxes, radio groups and dropdowns from web services.
    23 * Validate user inputs with several built-in validators.
    24 * Show results in a read only survey.
    25 * Several good-looking themes and much more
     16=Flexible Configuration Options=
     17**Every single element of your form is fully customizable**, starting from titles and helper texts, to placeholder texts and error messages - all to make sure you can provide your respondents with tailored guides and instructions and ensure high-quality user experience.
    2618
    27 The plugin supports the Gutenberg editor and old the editor as well.
     19=Diverse Question types=
     20Unlike the vast majority of form builders, SurveyJS goes far beyond common question types such as Single line input (date, email, name, surname etc.), Long text, Rating and Radio button group. Among some more advanced form elements that you can use are:
     21- [**Single-Select Dropdown**](https://surveyjs.io/form-library/examples/create-dropdown-menu-in-javascript/reactjs)
     22- [**Multi-Select Dropdown**](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/reactjs) **(Tag Box)**
     23- [**Image Picker**](https://surveyjs.io/form-library/examples/image-picker-question/reactjs)
     24- [**Multiple Textboxes**](https://surveyjs.io/form-library/examples/multiple-text-box-question/reactjs)
     25- [**Ranking**](https://surveyjs.io/form-library/examples/add-ranking-question-to-form/reactjs)
     26- [**Select Items to Rank**](https://surveyjs.io/form-library/examples/select-items-to-rank/reactjs)
     27- [**HTML**](https://surveyjs.io/form-library/examples/questiontype-html/reactjs)
     28- [**Image Capture**](https://surveyjs.io/form-library/examples/photo-capture/reactjs)
     29- [**Single-Select Matrix**](https://surveyjs.io/form-library/examples/single-selection-matrix-table-question/reactjs)
     30- [**Multi-Select Matrix**](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/reactjs)
     31- [**Dynamic Matrix**](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/reactjs)
    2832
    29 To find out more and review SurveyJS Examples please go to [https://surveyjs.io/Examples/Library/](https://surveyjs.io/Examples/Library/).
     33=Features=
     34Besides offering a wide variety of question elements, SurveyJS enables you to implement some advanced features, including:
    3035
    31 == Installation and usage ==
     36- [**Calculations**](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic-totals/reactjs) - to dynamically calculate values based on user input or predefined variables and display the calculated values in your form or survey.
     37- [**Carry Forward Responses**](https://surveyjs.io/form-library/examples/survey-carry-forward/reactjs#content-docs) - to copy choices from one question (the source) to another (the target).
     38- [**Side Navigation**](https://surveyjs.io/form-library/examples/table-of-contents/reactjs) **(Table of Contents)** - to help users to quickly navigate through longer surveys.
     39- [**Progress bar**](https://surveyjs.io/form-library/examples/configure-form-navigation-with-progress-indicators/reactjs)  - to show users how many completed pages, answered questions, or valid answers have been given.
     40- [**Input validation**](https://surveyjs.io/form-library/examples/javascript-form-validation/reactjs) - to ensure that respondents fill out all required form fields and the format of values is correct before they are submitted.
     41- [**Panels**](https://surveyjs.io/form-library/examples/set-properties-on-multiple-questions-using-panel/reactjs) - to group questions and configure settings for several questions at once.
     42- [**Duplicate group option**](https://surveyjs.io/form-library/examples/dynamic-matrix-table-question-with-dropdown-cell-type/reactjs) - to save time and effort by allowing users to quickly clone a set of questions or elements without having to recreate them manually.
     43- [**Multi-file upload**](https://surveyjs.io/form-library/examples/file-upload/reactjs) - to enable respondents to upload multiple files of a required format within one file upload field. Once uploaded, files can be managed in the preview mode.
     44- [**Join identifier**](https://surveyjs.io/form-library/examples/merge-question-values/reactjs) - to link several questions within a form together and sync their values.
    3245
    33 1. Upload SurveyJS plugin files to the `/wp-content/plugins/surveyjs` directory, or install the plugin through the WordPress plugins screen directly.
    34 2. Activate the plugin through the 'Plugins' screen in WordPress
    35 3. Navigate to the SurveyJS page of wordpress admin menu and click the “Add Survey”.
    36 4. Use the SurveyJS->Setting page to choose a theme.
    37 5. Go to the Posts page and click the “Add Survey” button. Then choose a survey and click the “Insert” button to add a SurveyJS shortcut.
    38 6. For the Gutenberg Editor, please add "SurveyJS" block in the "Common Blocks" section. Then choose a survey in the block's settings to add a SurveyJS shortcut.
    39 7. Go to the preview and check your survey.
    40 8. Check your wordpress database for *wp_sjs_my_surveys* and *wp_sjs_results* tables.
     46=Display and Skip Logic=
     47To simplify the process of setting up conditional rules, SurveyJS ships with a **dedicated GUI for conditional rules** that makes the process simple for everyone. For example, you can set a rule that defines the [visibility of the next question](https://surveyjs.io/form-library/examples/conditional-logic-and-branching-in-surveys/reactjs) based on a given answer, or you can [customize the text of the Thank you page](https://surveyjs.io/form-library/examples/nps-question/reactjs#) based on how the respondent answered your questions.
    4148
    42 == Hooks ==
    43 1. surveyjs_save_result :
    44     add_action( 'surveyjs_save_result', function ( ) {
    45         // do something with $_POST
    46     } );
     49=Styling=
     50But this is not all! **SurveyJS Theme Editor gives you the power to effortlessly customize survey UI themes and create unique survey looks** tailored to your application. And here's the exciting part: we've included a [collection of predefined themes](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles#add-surveyjs-themes-to-your-application) to help you get started. Just pick a theme as your base, refine it further to align with your brand's aesthetic, and witness real-time changes - from colors to layouts. Notably, our predefined themes prioritize accessibility. Dark mode and a specially designed contrast theme are particularly suited for individuals with visual impairments.
     51
     52Please also refer to the collection of demos specially designed for various real-life use cases.
     53[View Featured Demos](https://surveyjs.io/form-library/examples/overview)
     54
     55=E-signature capture field=
     56SurveyJS offers a simple way to add digital signatures to your e-forms with a build-it input field. This [signature field](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/reactjs) enables respondents to sign a form with their mouse pointer or even a finger by simply drawing a signature within the signature pad area.
    4757
    4858== Screenshots ==
    4959
    50 1. My surveys page
    51 2. Survey Creator
    52 3. Results page
    53 4. Settings
    54 5. Choose Gutenberg block
    55 6. Choose the survey
    56 7. Gutenberg block with the shortcode
     601. Admin UI wiht your SurveyJS forms
     612. Form builder UI for drag-and-drop form creation
     623. GUI for setting up conditional rules
     634. Theme editor
     645. Add a block with your SurveyJS form
     656. Embed and publish your form
     667. View the result
    5767
    5868== Changelog ==
     
    6070= 0.5 =
    6171* first public release
    62 = 1.0.26 =
     72= v1.9.120 =
    6373* synchronized version with SurveyJS project
    64 * fixed the bug https://surveyjs.answerdesk.io/internal/ticket/details/T332
     74* added Survey Creator V2
    6575
    6676== Support ==
  • surveyjs/trunk/surveyjs.php

    r2849163 r3006114  
    2727            name text NOT NULL,
    2828            json LONGTEXT,
     29            theme LONGTEXT,
    2930            UNIQUE KEY id (id)
    3031        ) $charset_collate;";
  • surveyjs/trunk/views/editor.php

    r2506505 r3006114  
    1919        ?>
    2020            <style>
    21                 #sjs-editor-container .svd_container .card {
     21                /* #sjs-editor-container .svd_container .card {
    2222                    max-width: none;
    2323                }
     
    2626                    line-height: 20px;
    2727                    padding: 6px 12px;
    28                 }
     28                } */
    2929            </style>
    3030            <script>
     
    8787                    </span>
    8888                </h3>
    89                 <div id="sjs-editor-container"></div>
    90                 <script>
    91                     var CommercialLicense = <?php echo json_encode(file_exists(plugin_dir_path(__FILE__) . 'CommercialLicense.txt')) ?>;
    92                     var editorOptions = { showEmbededSurveyTab: false, showOptions: true, generateValidJSON : false, haveCommercialLicense: CommercialLicense };
    93                     var editor = new SurveyCreator.SurveyCreator("sjs-editor-container", editorOptions);
    94                     editor.showState = true;
    95                     editor.isAutoSave = true;
    96                     editor.saveSurveyFunc = function(saveNo, callback) {
    97                         var json = JSON.stringify(editor.getSurveyJSON());   
    98                         jQuery.ajax({
    99                             url:  "<?php echo esc_url($saveSurveyUri) ?>",
    100                             type: "POST",
    101                             data: { Id: '<?php echo $surveyId ?>', Json: json },
    102                             success: function (data) {
    103                                 // if(data.isSuccess) {
    104                                 // }
    105                                 callback(saveNo, data.IsSuccess === 1);
    106                             }
     89                <div id="sjs-editor-container" style="height: 77vh;"></div>
     90                <script type="text/babel">
     91                    function SurveyCreatorRenderComponent() {
     92                        var CommercialLicense = <?php echo json_encode(file_exists(plugin_dir_path(__FILE__) . 'CommercialLicense.txt')) ?>;
     93                        var editorOptions = { showThemeTab: true, showLogicTab: true, showEmbededSurveyTab: false, showOptions: true, generateValidJSON : false, haveCommercialLicense: CommercialLicense };
     94                        const editor = new SurveyCreator.SurveyCreator(editorOptions);
     95                        editor.showState = true;
     96                        editor.isAutoSave = true;
     97                        editor.saveSurveyFunc = function(saveNo, callback) {
     98                            var json = JSON.stringify(editor.getSurveyJSON());   
     99                            var theme = JSON.stringify(editor.theme);
     100                            jQuery.ajax({
     101                                url:  "<?php echo esc_url($saveSurveyUri) ?>",
     102                                type: "POST",
     103                                data: { Id: '<?php echo $surveyId ?>', Json: json, Theme: theme },
     104                                success: function (data) {
     105                                    // if(data.isSuccess) {
     106                                    // }
     107                                    callback(saveNo, data.IsSuccess === 1);
     108                                }
     109                            });
     110                        };
     111                        editor.saveThemeFunc = function(saveNo, callback) {
     112                            var json = JSON.stringify(editor.getSurveyJSON());   
     113                            var theme = JSON.stringify(editor.theme);
     114                            jQuery.ajax({
     115                                url:  "<?php echo esc_url($saveSurveyUri) ?>",
     116                                type: "POST",
     117                                data: { Id: '<?php echo $surveyId ?>', Json: json, Theme: theme },
     118                                success: function (data) {
     119                                    // if(data.isSuccess) {
     120                                    // }
     121                                    callback(saveNo, data.IsSuccess === 1);
     122                                }
     123                            });
     124                        };
     125                        editor.onUploadFile.add(function(editor, options) {
     126                            var formData = new FormData();
     127                            options.files.forEach(function(file) {
     128                                formData.append("file", file);
     129                            });
     130                            jQuery.ajax({
     131                                url: "<?php echo esc_url($uploadFileUri) ?>",
     132                                type: "POST",
     133                                xhr: function () {
     134                                    var myXhr = jQuery.ajaxSettings.xhr();
     135                                    if (myXhr.upload) {
     136                                        myXhr.upload.addEventListener('progress', function (event) {
     137                                            var percent = 0;
     138                                            var position = event.loaded || event.position;
     139                                            var total = event.total;
     140                                        }, false);
     141                                    }
     142                                    return myXhr;
     143                                },
     144                                success: function (data) {
     145                                    options.callback("success", data["url"]);
     146                                },
     147                                error: function (error) {
     148                                },
     149                                async: true,
     150                                data: formData,
     151                                cache: false,
     152                                contentType: false,
     153                                processData: false,
     154                                timeout: 60000
     155                            });
    107156                        });
     157                        const creator = editor;
     158                        var json = '<?php echo htmlspecialchars_decode($json); ?>';
     159                        creator.text = json;
     160                        //creator.JSON = surveyJSON;
     161                        return (<SurveyCreator.SurveyCreatorComponent creator={creator} />);
    108162                    }
    109                     editor.onUploadFile.add(function(editor, options) {
    110                         var formData = new FormData();
    111                         options.files.forEach(function(file) {
    112                             formData.append("file", file);
    113                         });
    114                         jQuery.ajax({
    115                             url: "<?php echo esc_url($uploadFileUri) ?>",
    116                             type: "POST",
    117                             xhr: function () {
    118                                 var myXhr = jQuery.ajaxSettings.xhr();
    119                                 if (myXhr.upload) {
    120                                     myXhr.upload.addEventListener('progress', function (event) {
    121                                         var percent = 0;
    122                                         var position = event.loaded || event.position;
    123                                         var total = event.total;
    124                                     }, false);
    125                                 }
    126                                 return myXhr;
    127                             },
    128                             success: function (data) {
    129                                 options.callback("success", data["url"]);
    130                             },
    131                             error: function (error) {
    132                             },
    133                             async: true,
    134                             data: formData,
    135                             cache: false,
    136                             contentType: false,
    137                             processData: false,
    138                             timeout: 60000
    139                         });
    140                     });
    141                     var json = '<?php echo htmlspecialchars_decode($json); ?>';
    142                     editor.text = json;     
     163
     164                    const root = ReactDOM.createRoot(document.getElementById("sjs-editor-container"));
     165                    root.render(<SurveyCreatorRenderComponent />);
    143166                </script>
    144167            </div>
  • surveyjs/trunk/views/results.php

    r2263985 r3006114  
    7676                });
    7777
    78                 var windowSurvey = new Survey.SurveyWindow(surveyJson);
     78                var windowSurvey = new Survey.PopupSurveyModel(surveyJson);
    7979                windowSurvey.survey.mode = "display";
    8080                windowSurvey.survey.title = "<?php echo $surveyName; ?>";
  • surveyjs/trunk/views/settings.php

    r2300379 r3006114  
    3131        register_setting( 'sjs-settings-group', 'sjs-settings' );
    3232           
    33         add_settings_section( 'sjs-themes-section', __( 'Tnemes', 'sjs' ), array($this, 'sjs_themes_section'), 'sjs-settings-page' );
    34         add_settings_field( 'theme', __( 'Current Theme', 'sjs' ), array($this, 'theme_render'), 'sjs-settings-page', 'sjs-themes-section' );
     33        // add_settings_section( 'sjs-themes-section', __( 'Tnemes', 'sjs' ), array($this, 'sjs_themes_section'), 'sjs-settings-page' );
     34        //add_settings_field( 'theme', __( 'Current Theme', 'sjs' ), array($this, 'theme_render'), 'sjs-settings-page', 'sjs-themes-section' );
    3535        add_settings_field( 'allow-paddings', __( 'Allow Paddings', 'sjs' ), array($this, 'allow_paddings_render'), 'sjs-settings-page', 'sjs-themes-section' );
    3636    }
Note: See TracChangeset for help on using the changeset viewer.