Skip to content

Commit

Permalink
Merge pull request #2399 from QuizandSurveyMaster/CU-864e8yzb2-mailer…
Browse files Browse the repository at this point in the history
…lite-integration

Removed MailerLite Promo banner from email tab
  • Loading branch information
zubairraeen authored Nov 21, 2023
2 parents 1dced72 + e6ef412 commit 9828d8f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 73 deletions.
28 changes: 0 additions & 28 deletions css/qsm-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -3219,31 +3219,3 @@ input#preferred-date-format-custom {
min-width: 110px;
display: inline-block;
}
/* ----------------Addon Promo CSS--------------- */
.qsm-addon-promo-wrapper {
display: flex;
flex-direction: column;
padding: 5px 0;
}
.qsm-addon-promo-wrapper .accordion {
color: #444;
cursor: pointer;
padding: 10px 10px;
width: 100%;
text-align: left;
border: none;
border-bottom: 1px solid rgb(206, 204, 204);
outline: none;
transition: 0.4s;
font-size: 16px;
background-color: rgb(255, 255, 255);
font-weight: 600;
}
.qsm-addon-promo-wrapper .panel {
position: relative;
display: none;
top: 0;
padding: 0 18px;
background-color: white;
box-sizing: border-box;
}
18 changes: 0 additions & 18 deletions js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3443,21 +3443,3 @@ var import_button;
}
}
}(jQuery));

// MailerLite Inactive promo banner
jQuery(document).on('click', '.qsm-addon-promo-wrapper .accordion', function(event) {
// Find the corresponding panel for the clicked accordion
let panel = jQuery(this).closest('.qsm-addon-promo-wrapper').find('.panel');

if (panel.css('display') === 'block') {
panel.css('display', 'none');
jQuery(this).removeClass('active');
jQuery(this).find('span').removeClass('dashicons-arrow-up-alt2');
jQuery(this).find('span').addClass('dashicons-arrow-down-alt2');
} else {
panel.css('display', 'block');
jQuery(this).addClass('active');
jQuery(this).find('span').removeClass('dashicons-arrow-down-alt2');
jQuery(this).find('span').addClass('dashicons-arrow-up-alt2');
}
});
27 changes: 0 additions & 27 deletions php/admin/options-page-email-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ function qsm_options_emails_tab_template() {
$quiz_id = isset( $_GET['quiz_id'] ) ? intval( $_GET['quiz_id'] ) : 0;
$categories = array();
$enabled = get_option( 'qsm_multiple_category_enabled' );
$ml_settings = get_option( 'qsm_addon_mailerlite_settings' );
if ( $enabled && 'cancelled' !== $enabled ) {
$query = $wpdb->prepare( "SELECT name FROM {$wpdb->prefix}terms WHERE term_id IN ( SELECT DISTINCT term_id FROM {$wpdb->prefix}mlw_question_terms WHERE quiz_id = %d ) ORDER BY name ASC", $quiz_id );
} else {
Expand Down Expand Up @@ -197,17 +196,6 @@ function qsm_options_emails_tab_template() {
<label><?php esc_html_e( 'Email Content', 'quiz-master-next' ); ?></label>
<textarea id="email-template-{{ data.id }}" class="email-template">{{{ data.content }}}</textarea>
<label><input type="checkbox" class="reply-to" <# if ( "true" == data.replyTo || true == data.replyTo ) { #>checked<# } #>>Add user email as Reply-To</label>
<?php if ( empty($ml_settings) ) : ?>
<div class="qsm-addon-promo-wrapper">
<button class="accordion">
<?php esc_html_e( 'MailerLite Automation', 'quiz-master-next' ); ?>
<span style="float:right" class="dashicons dashicons-arrow-down-alt2"></span>
</button>
<div class="panel">
<?php qsm_mailerlite_quiz_tabs_content(); ?>
</div>
</div>
<?php endif; ?>
<?php do_action( 'qsm_email_page_after', $quiz_id, $categories ); ?>
</div>
</main>
Expand Down Expand Up @@ -252,19 +240,4 @@ function qsm_options_emails_tab_template() {

<?php
}
function qsm_mailerlite_quiz_tabs_content() {
$args = array(
"id" => 'mailerlite-integration',
"title" => __( 'MailerLite Integration', 'quiz-master-next' ),
"description" => __( 'This tool helps you to seamlessly integrate your MailerLite account with quizzes and surveys created in QSM, so you can easily collect the contact information of quiz or survey takers and automate the process of sending targeted, custom emails straight from MailerLite.', 'quiz-master-next' ),
"chart_image" => QSM_PLUGIN_URL . 'assets/mailerlite_promo.png',
"warning" => __( 'Missing Feature - MailerLite Integration Add-on required', 'quiz-master-next' ),
"information" => __( 'QSM Addon Bundle is the best way to get all our add-ons at a discount. Upgrade to save 95% today. OR you can buy MailerLite Integration Addon separately.', 'quiz-master-next' ),
"buy_btn_text" => __( 'Buy MailerLite Integration Addon', 'quiz-master-next' ),
"doc_link" => qsm_get_plugin_link( 'docs/add-ons/mailerlite-integration', 'quiz-documentation', 'plugin', 'mailerlite-integration', 'qsm_plugin_upsell' ),
"upgrade_link" => qsm_get_plugin_link( 'pricing', 'quiz-documentation', 'plugin', 'mailerlite-integration', 'qsm_plugin_upsell' ),
"addon_link" => qsm_get_plugin_link( 'downloads/mailerlite-integration', 'quiz-documentation', 'plugin', 'mailerlite-integration', 'qsm_plugin_upsell' ),
);
qsm_admin_upgrade_content( $args, 'page' );
}
?>

0 comments on commit 9828d8f

Please sign in to comment.