From f62defa7efd6fb4f6d9cc266fe1e8f1f0a5bbe55 Mon Sep 17 00:00:00 2001 From: Mohammad Zubair Ali Date: Tue, 31 Oct 2023 13:32:10 +0530 Subject: [PATCH] improve quiz option settings UI --- css/qsm-admin.css | 22 ++++++++++++++++------ php/classes/class-qsm-install.php | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/css/qsm-admin.css b/css/qsm-admin.css index f24be67b8..512e01408 100644 --- a/css/qsm-admin.css +++ b/css/qsm-admin.css @@ -853,7 +853,8 @@ ul.changelog li.update div.two:before { box-sizing: border-box; border-left: 1px solid #dfd4d4; } -.quiz_text_tab_content .right-bar .quiz_style_tab_content .form-table th { +.quiz_text_tab_content .right-bar .quiz_style_tab_content .form-table th, +.quiz_style_tab_content .form-table th { width: 250px; } .quiz_text_tab_content .left-bar ul { @@ -1320,11 +1321,10 @@ span.qsm-ph_text { display: inline-block; } tr .qsm-opt-desc { - color: #666; - font-style: italic; - font-size: 14px; - margin-top: 5px; - display: block; + color: #646970; + margin-top: 5px; + display: block; + font-size: 14px; } .form-table .send_email .qsm-opt-tr, .form-table .send_email td { padding-top: 0; @@ -3215,4 +3215,14 @@ body .qsm_tab_content .qsm-small-input-field input[type="text"] { fieldset#enable_quick_correct_answer_info { margin-left: 25px; margin-top: 4px; +} +.qsm-mb-1, .qsm_tab_content fieldset{ + margin-bottom: .25rem; +} +input#preferred-date-format-custom { + min-width: 100px; +} +.qsm-date-time-text { + min-width: 110px; + display: inline-block; } \ No newline at end of file diff --git a/php/classes/class-qsm-install.php b/php/classes/class-qsm-install.php index 403baf3b7..b9bbb1ec4 100644 --- a/php/classes/class-qsm-install.php +++ b/php/classes/class-qsm-install.php @@ -131,7 +131,7 @@ public function register_default_settings() { 'fields' => array( 'correct_answer_logic' => array( 'type' => 'radio', - 'prefix_text' => __( 'Correct Answer Logic:', 'quiz-master-next' ), + 'prefix_text' => '
' . __( 'Correct Answer Logic:', 'quiz-master-next' ) . '
', 'options' => array( array( 'label' => __( 'All correct answers', 'quiz-master-next' ), @@ -146,7 +146,7 @@ public function register_default_settings() { ), 'enable_deselect_option' => array( 'type' => 'checkbox', - 'prefix_text' => __( 'Other Answer Settings:', 'quiz-master-next' ), + 'prefix_text' => '
' . __( 'Other Answer Settings:', 'quiz-master-next' ) . '
', 'options' => array( array( 'label' => __( 'Allow user to deselect an answer and leave it blank. ', 'quiz-master-next' ) . $i_tag . '(' . __( 'Works with multiple choice & horizontal multiple choice questions only', 'quiz-master-next' ) . ')', @@ -250,7 +250,7 @@ public function register_default_settings() { 'fields' => array( 'question_from_total' => array( 'type' => 'number', - 'suffix_text' => $i_tag . __( 'Maximum question limit', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Maximum question limit', 'quiz-master-next' ), 'default' => 0, ), 'limit_category_checkbox' => array( @@ -265,7 +265,7 @@ public function register_default_settings() { ), 'question_per_category' => array( 'type' => 'number', - 'suffix_text' => '' . $i_tag . __( "Limit number of questions per category", "quiz-master-next" ) . ' ' . __( "Show only limited number of category questions from your quiz.You also need to set Limit Number of questions.", "quiz-master-next" ) . '', + 'suffix_text' => '' . __( "Limit number of questions per category", "quiz-master-next" ) . '' . __( "Show only limited number of category questions from your quiz.You also need to set Limit Number of questions.", "quiz-master-next" ) . '', 'default' => 0, ), ), @@ -306,7 +306,7 @@ public function register_default_settings() { 'type' => 'number', 'default' => 1, 'container_class' => 'qsm-small-input-field', - 'suffix_text' => $i_tag . __( 'Adds number of answer field', 'quiz-master-next' ) . "", + 'suffix_text' => __( 'Adds number of answer field', 'quiz-master-next' ), 'option_tab' => 'general', ); $mlwQuizMasterNext->pluginHelper->register_quiz_setting( $field_array, 'quiz_options' ); @@ -336,7 +336,7 @@ public function register_default_settings() { 'fields' => array( 'timer_limit' => array( 'type' => 'number', - 'suffix_text' => $i_tag . __( 'minutes', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Minutes', 'quiz-master-next' ) . '', 'default' => 0, ), 'enable_result_after_timer_end' => array( @@ -374,7 +374,7 @@ public function register_default_settings() { 'type' => 'number', 'default' => 0, 'placeholder' => __( 'Set Limit', 'quiz-master-next' ), - 'suffix_text' => $i_tag . __( 'Incorrect answers will end the quiz', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Incorrect answers will end the quiz', 'quiz-master-next' ) . '', ), 'disable_answer_onselect' => array( 'type' => 'checkbox', @@ -401,13 +401,13 @@ public function register_default_settings() { 'type' => 'number', 'default' => 0, 'placeholder' => __( 'Set Limit', 'quiz-master-next' ), - 'suffix_text' => $i_tag . __( 'Attempts', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Attempts', 'quiz-master-next' ) . '', ), 'limit_total_entries' => array( 'type' => 'number', 'default' => 0, 'placeholder' => __( 'Set Limit', 'quiz-master-next' ), - 'suffix_text' => $i_tag . __( 'Entries', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Entries', 'quiz-master-next' ) . '', ), 'enable_retake_quiz_button' => array( 'type' => 'checkbox', @@ -519,7 +519,7 @@ public function register_default_settings() { 'type' => 'number', 'default' => 0, 'placeholder' => __( 'Set Limit', 'quiz-master-next' ), - 'suffix_text' => $i_tag . __( 'Questions Per Page', 'quiz-master-next' ) . '', + 'suffix_text' => __( 'Questions Per Page', 'quiz-master-next' ) . '', ), 'question_numbering' => array( 'type' => 'checkbox', @@ -670,23 +670,23 @@ public function register_default_settings() { 'prefix' => __( 'Preferred date format:', 'quiz-master-next' ), 'options' => array( array( - 'label' => __( 'June 15, 2023 ', 'quiz-master-next' ) . 'F j, Y', + 'label' => '' . __( 'June 15, 2023 ', 'quiz-master-next' ) . ' F j, Y', 'value' => 'F j, Y', ), array( - 'label' => __( '2023-06-15 ', 'quiz-master-next' ) . 'Y-m-d', + 'label' => '' . __( '2023-06-15 ', 'quiz-master-next' ) . ' Y-m-d', 'value' => 'Y-m-d', ), array( - 'label' => __( '06/15/2023 ' , 'quiz-master-next' ) . 'm/d/Y', + 'label' => '' . __( '06/15/2023 ' , 'quiz-master-next' ) . ' m/d/Y', 'value' => 'm/d/Y', ), array( - 'label' => __( '15/06/2023 ', 'quiz-master-next' ) . 'd/m/Y', + 'label' => '' . __( '15/06/2023 ', 'quiz-master-next' ) . ' d/m/Y', 'value' => 'd/m/Y', ), array( - 'label' => __( 'Custom', 'quiz-master-next' ) . '', + 'label' => '' . __( 'Custom', 'quiz-master-next' ) . '', 'value' => $preferred_date_format, ), ),