diff --git a/css/admin-dashboard-rtl.css b/css/admin-dashboard-rtl.css index 13e1a270d..ecd3beddb 100644 --- a/css/admin-dashboard-rtl.css +++ b/css/admin-dashboard-rtl.css @@ -807,6 +807,11 @@ h2.hndle.ui-sortable-handle { background: #ffffff60; padding: 20px; position: relative; + display: flex; + flex-wrap: wrap; +} +#model-wizard .qsm-new-menu-elements .input-group label { + display: block; } #model-wizard .qsm-new-menu-elements .input-group .qsm-tooltips-icon { @@ -816,8 +821,8 @@ h2.hndle.ui-sortable-handle { #model-wizard .qsm-new-menu-elements .input-group .qsm-opt-desc { color: #666; font-size: 12px; - display: block; - text-align: right; + margin-right: calc(33% + 4px); + margin-top: 5px; } #model-wizard .qsm-new-menu-elements .input-group>label { @@ -858,10 +863,6 @@ h2.hndle.ui-sortable-handle { margin-bottom: 10px; } -#model-wizard .featured_image { - display: none; -} - #model-wizard .empty-market-place { position: absolute; top: 45%; diff --git a/css/admin-dashboard.css b/css/admin-dashboard.css index 4c340c76f..212fc195c 100644 --- a/css/admin-dashboard.css +++ b/css/admin-dashboard.css @@ -806,6 +806,11 @@ h2.hndle.ui-sortable-handle { background: #ffffff60; padding: 20px; position: relative; + display: flex; + flex-wrap: wrap; +} +#model-wizard .qsm-new-menu-elements .input-group label { + display: block; } #model-wizard .qsm-new-menu-elements .input-group .qsm-tooltips-icon { @@ -815,8 +820,8 @@ h2.hndle.ui-sortable-handle { #model-wizard .qsm-new-menu-elements .input-group .qsm-opt-desc { color: #666; font-size: 12px; - display: block; - text-align: left; + margin-left: calc(33% + 4px); + margin-top: 5px; } #model-wizard .qsm-new-menu-elements .input-group>label { @@ -857,10 +862,6 @@ h2.hndle.ui-sortable-handle { margin-bottom: 10px; } -#model-wizard .featured_image { - display: none; -} - #model-wizard .empty-market-place { position: absolute; top: 45%; diff --git a/js/qsm-admin.js b/js/qsm-admin.js index 2e6e4e521..40358f1b6 100644 --- a/js/qsm-admin.js +++ b/js/qsm-admin.js @@ -1195,14 +1195,6 @@ if(current_id == 'qsm_variable_text'){ jQuery(".current_variable")[0].click();} $(document).find('#select_themes .theme-actions').remove(); - $(document).on('click', '#new_quiz_button', function () { - $('#quiz_settings').find('.qsm-opt-desc').each(function () { - if ($(this)) { - desc = $(this); - desc.parents('.input-group').find('label:first-child').append(desc); - } - }) - }); } }(jQuery)); diff --git a/php/admin/functions.php b/php/admin/functions.php index 18d95720a..e4b6d5ac2 100644 --- a/php/admin/functions.php +++ b/php/admin/functions.php @@ -654,22 +654,8 @@ class="qsm-wizard-step-text"> - - - quiz_settings->load_setting_fields( 'quiz_options' ); @@ -678,14 +664,48 @@ class="qsm-opt-desc"> array( 'option_name' => __( 'Form Type', 'quiz-master-next' ), 'value' => $globalQuizsetting['form_type'], + 'default' => 0, + 'type' => 'select', + 'options' => array( + array( + 'label' => __( 'Quiz', 'quiz-master-next' ), + 'value' => 0, + ), + array( + 'label' => __( 'Survey', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'Simple Form', 'quiz-master-next' ), + 'value' => 2, + ), + ), ), 'system' => array( 'option_name' => __( 'Grading System', 'quiz-master-next' ), 'value' => $globalQuizsetting['system'], + 'default' => 0, + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Correct/Incorrect', 'quiz-master-next' ), + 'value' => 0, + ), + array( + 'label' => __( 'Points', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'Both', 'quiz-master-next' ), + 'value' => 3, + ), + ), + 'help' => __( 'Select the system for grading the quiz.', 'quiz-master-next' ), ), 'enable_contact_form' => array( 'option_name' => __( 'Enable Contact Form', 'quiz-master-next' ), 'value' => 0, + 'type' => 'radio', 'options' => array( array( 'label' => __( 'Yes', 'quiz-master-next' ), @@ -696,38 +716,118 @@ class="qsm-opt-desc"> 0, ), ), + 'help' => __( 'Display a contact form before quiz', 'quiz-master-next' ), ), 'timer_limit' => array( 'option_name' => __( 'Time Limit (in Minute)', 'quiz-master-next' ), 'value' => $globalQuizsetting['timer_limit'], + 'type' => 'number', + 'default' => 0, + 'help' => __( 'Leave 0 for no time limit', 'quiz-master-next' ), ), 'pagination' => array( 'option_name' => __( 'Questions Per Page', 'quiz-master-next' ), 'value' => $globalQuizsetting['pagination'], + 'type' => 'number', + 'default' => 0, + 'help' => __( 'Override the default pagination created on questions tab', 'quiz-master-next' ), ), 'enable_pagination_quiz' => array( 'option_name' => __( 'Show current page number', 'quiz-master-next' ), 'value' => $globalQuizsetting['enable_pagination_quiz'], + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 0, + ), + ), + 'default' => 0, ), 'show_question_featured_image_in_result' => array( 'option_name' => __( 'Show question featured image in results page', 'quiz-master-next' ), 'value' => $globalQuizsetting['show_question_featured_image_in_result'], + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 0, + ), + ), + 'default' => 0, ), 'progress_bar' => array( 'option_name' => __( 'Show progress bar', 'quiz-master-next' ), 'value' => $globalQuizsetting['enable_pagination_quiz'], + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 0, + ), + ), + 'default' => 0, ), 'require_log_in' => array( 'option_name' => __( 'Require User Login', 'quiz-master-next' ), 'value' => $globalQuizsetting['require_log_in'], + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 0, + ), + ), + 'default' => 0, + 'help' => __( 'Enabling this allows only logged in users to take the quiz', 'quiz-master-next' ), ), 'disable_first_page' => array( 'option_name' => __( 'Disable first page on quiz', 'quiz-master-next' ), 'value' => $globalQuizsetting['disable_first_page'], + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 1, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 0, + ), + ), + 'default' => 0, ), 'comment_section' => array( 'option_name' => __( 'Enable Comment box', 'quiz-master-next' ), 'value' => $globalQuizsetting['comment_section'], + 'type' => 'radio', + 'options' => array( + array( + 'label' => __( 'Yes', 'quiz-master-next' ), + 'value' => 0, + ), + array( + 'label' => __( 'No', 'quiz-master-next' ), + 'value' => 1, + ), + ), + 'default' => 1, + 'help' => __( 'Allow users to enter their comments after the quiz', 'quiz-master-next' ), ), ); $quiz_setting_option = apply_filters( 'qsm_quiz_wizard_settings_option', $quiz_setting_option ); @@ -745,7 +845,7 @@ class="qsm-opt-desc"> isset( $single_setting['type'] ) ? $single_setting['type'] : 'radio', 'options' => isset( $single_setting['options'] ) ? $single_setting['options'] : array(), 'default' => $single_setting['value'], - 'help' => __( 'Display a contact form before quiz', 'quiz-master-next' ), + 'help' => isset( $single_setting['help'] ) ? $single_setting['help'] : "", ); } echo '
';