Skip to content

Commit

Permalink
Merge pull request #2509 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
added feature image in create quiz popup
  • Loading branch information
zubairraeen authored Mar 27, 2024
2 parents 66de04b + 5a82ceb commit fb7d7d7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions css/admin-dashboard-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ h2.hndle.ui-sortable-handle {
#model-wizard #qsm_span .quiz_featured_image {
width: 100%;
margin-bottom: 10px;
height: 30px;
}

#model-wizard .empty-market-place {
Expand Down
1 change: 1 addition & 0 deletions css/admin-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ h2.hndle.ui-sortable-handle {
#model-wizard #qsm_span .quiz_featured_image {
width: 100%;
margin-bottom: 10px;
height: 30px;
}

#model-wizard .empty-market-place {
Expand Down
8 changes: 7 additions & 1 deletion js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,13 @@ var QSMAdmin;
if ( !jQuery('.category_selection_random').length ) {
jQuery('#limit_category_checkbox, #question_per_category').hide();
}
//Hide/show tr based on selection
jQuery(document).on('change', '#qsm-quiz-options-form_type input', function () {
if (0 == jQuery(this).val()) {
jQuery('#qsm-quiz-options-system').show();
} else {
jQuery('#qsm-quiz-options-system').hide();
}
});
$('.qsm_tab_content .qsm-opt-tr select').each(function () {
var name = $(this).attr('name');
var value = $(this).val();
Expand Down
21 changes: 16 additions & 5 deletions php/admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,12 @@ function qsm_generate_question_option( $key, $single_option ) {

/**
* @since 8.2.3
* Settings to create Quiz
* Settings to create Quiz
*/
if ( ! function_exists( 'qsm_settings_to_create_quiz' ) ) {
function qsm_settings_to_create_quiz( $require_field = false ) {
global $globalQuizsetting, $mlwQuizMasterNext, $themes_data;

$quiz_setting_option = array(
'form_type' => array(
'option_name' => __( 'Form Type', 'quiz-master-next' ),
Expand Down Expand Up @@ -782,7 +782,7 @@ function qsm_settings_to_create_quiz( $require_field = false ) {
}

if ( true != $require_field ) {
echo '<div class="input-group">';
echo '<div class="input-group" id="qsm-quiz-options-' . esc_html( $key ) . '">';
QSM_Fields::generate_field( $field, $single_setting['value'] );
echo '</div>';
} else {
Expand Down Expand Up @@ -874,17 +874,28 @@ class="qsm-wizard-step-text"><?php esc_html_e( 'Quiz Settings', 'quiz-master-nex
</label>
<input type="text" class="quiz_name" name="quiz_name" value="" required="" placeholder="<?php esc_html_e( 'Enter a name for this Quiz.', 'quiz-master-next' ); ?>">
</div>
<div class="input-group qsm-quiz-options-featured_image">
<label for="quiz_name"><?php esc_html_e( 'Quiz Featured Image', 'quiz-master-next' ); ?>
</label>
<span id="qsm_span">
<input type="text" class="quiz_featured_image" name="quiz_featured_image" value="">
<a id="set_featured_image" class="button "><?php esc_html_e( 'Set Featured Image', 'quiz-master-next' ); ?></a>
</span>
<span class="qsm-opt-desc"><?php esc_html_e( 'Enter an external URL or Choose from Media Library. Can be changed further from style tab', 'quiz-master-next' ); ?></span>
</div>
<?php qsm_settings_to_create_quiz(); ?>
</div>
<div id="select_themes" class="qsm-new-menu-elements">
<div class="theme-browser rendered">
<div class="themes wp-clearfix">
<ul class="theme-sub-menu">
<li class="active">
<a data-show="downloaded_theme" href="javascript:void(0)"><?php esc_html_e( 'Themes', 'quiz-master-next' ); ?></a></li>
<a data-show="downloaded_theme" href="javascript:void(0)"><?php esc_html_e( 'Themes', 'quiz-master-next' ); ?></a>
</li>
<?php if ( ! empty( $themes_data ) ) { ?>
<li>
<a data-show="browse_themes" href="javascript:void(0)"><?php esc_html_e( 'Explore Marketplace', 'quiz-master-next' ); ?></a></li>
<a data-show="browse_themes" href="javascript:void(0)"><?php esc_html_e( 'Explore Marketplace', 'quiz-master-next' ); ?></a>
</li>
<?php } ?>
</ul>
<div class="theme-wrap" id="browse_themes" style="display: none;">
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
18. Database

== Changelog ==
= 9.0.0 (March 26, 2024) =
= 9.0.0 (March 27, 2024) =
* Feature: Implemented a minimum length requirement for text-based question types
* Feature: Introduced a placeholder option for contact fields
* Feature: Added option to set default setting to multiple quizzes
Expand Down

0 comments on commit fb7d7d7

Please sign in to comment.