Merge branch 'ent-7584-no-se-puede-cerrar-ventana' into 'develop'
Improve code and fix issue with modal Closes pandora_enterprise#7584 See merge request artica/pandorafms!4153
This commit is contained in:
commit
c3ea89597c
|
@ -755,43 +755,47 @@ function newsletter_wiz_modal(
|
||||||
);
|
);
|
||||||
|
|
||||||
// Avoid to show default email.
|
// Avoid to show default email.
|
||||||
if ($email == 'admin@example.com') {
|
if ($email === 'admin@example.com') {
|
||||||
$email = '';
|
$email = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= '<div id="newsletter_wizard" title="';
|
$modalContent = html_print_div(
|
||||||
$output .= __('Do you want to be up to date?');
|
[
|
||||||
$output .= '" class="invisible">';
|
'class' => 'register_update_manager',
|
||||||
$output .= '<div class="register_update_manager">';
|
'content' => html_print_image(
|
||||||
$output .= html_print_image('images/pandora_circle_big.png', true);
|
'images/pandora_circle_big.png',
|
||||||
$output .= '</div>';
|
true
|
||||||
|
),
|
||||||
$output .= '<div class="newsletter_div">';
|
],
|
||||||
$output .= __(
|
true
|
||||||
'Subscribe to our newsletter',
|
|
||||||
$product_name
|
|
||||||
);
|
|
||||||
$output .= '</div>';
|
|
||||||
|
|
||||||
$output .= '<div class="license_text both">';
|
|
||||||
$output .= '<p>Stay up to date with updates, upgrades and promotions by subscribing to our newsletter.</p>';
|
|
||||||
$output .= '<p>';
|
|
||||||
$output .= __(
|
|
||||||
'By subscribing to the newsletter, you accept that your email will be transferred to a database owned by %s. These data will be used only to provide you with information about %s and will not be given to third parties. You can unsubscribe from this database at any time from the newsletter subscription options.',
|
|
||||||
$product_name,
|
|
||||||
$product_name
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$output .= '</p>';
|
$modalContent .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'newsletter_div',
|
||||||
|
'content' => __('Subscribe to our newsletter'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$output .= '</div>';
|
$modalContent .= html_print_div(
|
||||||
// Show regiter to newsletter state.
|
[
|
||||||
$show_newsletter = ($display_newsletter !== true) ? 'inline-block' : 'none';
|
'class' => 'license_text both',
|
||||||
|
'content' => sprintf(
|
||||||
|
'<p>%s</p><p>%s</p>',
|
||||||
|
__('Stay up to date with updates, upgrades and promotions by subscribing to our newsletter.'),
|
||||||
|
__(
|
||||||
|
'By subscribing to the newsletter, you accept that your email will be transferred to a database owned by %s. These data will be used only to provide you with information about %s and will not be given to third parties. You can unsubscribe from this database at any time from the newsletter subscription options.',
|
||||||
|
$product_name,
|
||||||
|
$product_name
|
||||||
|
)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$output .= '<div class="mrgn_lft_4em">';
|
// Email Input case.
|
||||||
$output .= '<div id="box_newsletter">';
|
$emailInputCase = '<span id="label-email-newsletter">'.__('Email').' </span>'.html_print_input_text_extended(
|
||||||
$output .= '<span id="label-email-newsletter">'.__('Email').' </span>';
|
|
||||||
$output .= html_print_input_text_extended(
|
|
||||||
'email-newsletter',
|
'email-newsletter',
|
||||||
$email,
|
$email,
|
||||||
'text-email-newsletter',
|
'text-email-newsletter',
|
||||||
|
@ -800,52 +804,110 @@ function newsletter_wiz_modal(
|
||||||
255,
|
255,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
['style' => 'display:'.$show_newsletter.'; width: 200px;'],
|
['style' => 'display: inline-block; width: 200px;'],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$output .= '</div><br /><br />';
|
|
||||||
|
|
||||||
$output .= '<div class="submit_buttons_container">';
|
// Generate the submit buttons.
|
||||||
$output .= '<div class="left">';
|
// Cancel Button.
|
||||||
$output .= html_print_submit_button(
|
$submitButtons = html_print_div(
|
||||||
__('Cancel'),
|
[
|
||||||
'cancel_newsletter',
|
'class' => 'left',
|
||||||
false,
|
'content' => html_print_submit_button(
|
||||||
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel w100px"',
|
__('Cancel'),
|
||||||
|
'cancel_newsletter',
|
||||||
|
false,
|
||||||
|
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub upd submit-cancel w100px"',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$output .= '</div>';
|
|
||||||
$output .= '<div class="right">';
|
|
||||||
$output .= html_print_submit_button(
|
|
||||||
__('OK!'),
|
|
||||||
'newsletter',
|
|
||||||
false,
|
|
||||||
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"',
|
|
||||||
true
|
|
||||||
);
|
|
||||||
$output .= '</div>';
|
|
||||||
$output .= '</div>';
|
|
||||||
|
|
||||||
$output .= '<div id="both"></div>';
|
// OK Button.
|
||||||
$output .= '<br/>';
|
$submitButtons .= html_print_div(
|
||||||
$output .= '</div>';
|
[
|
||||||
$output .= '</div>';
|
'class' => 'right',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('OK!'),
|
||||||
|
'newsletter',
|
||||||
|
false,
|
||||||
|
'class="ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok submit-next w100px"',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$submitButtonsCase = html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'submit_buttons_container',
|
||||||
|
'content' => $submitButtons,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$modalContent .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'mrgn_lft_4em',
|
||||||
|
'content' => html_print_div(
|
||||||
|
[
|
||||||
|
'id' => 'box_newsletter',
|
||||||
|
'content' => $emailInputCase.$submitButtonsCase.'<div id="both"></div><br />',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$output .= html_print_div(
|
||||||
|
[
|
||||||
|
'id' => 'newsletter_wizard',
|
||||||
|
'style' => 'display: none;',
|
||||||
|
'title' => __('Do you want to be up to date?'),
|
||||||
|
'content' => $modalContent,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Verification modal.
|
// Verification modal.
|
||||||
$output .= '<div id="news_ensure_cancel" title="Confirmation Required" class="invisible">';
|
$verificationContent = html_print_div(
|
||||||
$output .= '<div class="font_12_20">';
|
[
|
||||||
$output .= __('Are you sure you don\'t want to subscribe?');
|
'class' => 'font_12_20',
|
||||||
$output .= '<p>';
|
'content' => __('Are you sure you don\'t want to subscribe?').'<p>'.__('You will miss all news about amazing features and fixes!').'</p>',
|
||||||
$output .= __('You will miss all news about amazing features and fixes!');
|
],
|
||||||
$output .= '</p>';
|
true
|
||||||
$output .= '</div>';
|
);
|
||||||
$output .= '</div>';
|
|
||||||
|
$output .= html_print_div(
|
||||||
|
[
|
||||||
|
'id' => 'news_ensure_cancel',
|
||||||
|
'style' => 'display: none;',
|
||||||
|
'title' => 'Confirmation Required',
|
||||||
|
'content' => $verificationContent,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Results modal.
|
// Results modal.
|
||||||
$output .= '<div id="news_result" title="Subscription process result" class="invisible">';
|
$resultsContent = html_print_div(
|
||||||
$output .= '<div id="news_result_content" class="font_12_20">';
|
[
|
||||||
$output .= '</div>';
|
'id' => 'news_result_content',
|
||||||
$output .= '</div>';
|
'class' => 'font_12_20',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
$output .= html_print_div(
|
||||||
|
[
|
||||||
|
'id' => 'news_result',
|
||||||
|
'style' => 'display: none;',
|
||||||
|
'title' => 'Subscription process result',
|
||||||
|
'content' => $resultsContent,
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue