fixed minor error
This commit is contained in:
parent
ab3cfd4cc9
commit
bd070b706b
|
@ -122,7 +122,6 @@ if (is_ajax()) {
|
|||
exit();
|
||||
}
|
||||
|
||||
|
||||
ui_require_css_file('register');
|
||||
|
||||
$initial = isset($config['initial_wizard']) !== true
|
||||
|
@ -150,26 +149,27 @@ if ($initial && users_is_admin()) {
|
|||
);
|
||||
}
|
||||
|
||||
if ($registration && users_is_admin()) {
|
||||
// Prepare registration wizard, not launch. leave control to flow.
|
||||
registration_wiz_modal(
|
||||
false,
|
||||
// Launch only if not being launch from 'initial'.
|
||||
!$initial,
|
||||
(($show_newsletter === true) ? 'force_run_newsletter()' : null)
|
||||
);
|
||||
} else {
|
||||
if ($show_newsletter) {
|
||||
// Show newsletter wizard for current user.
|
||||
newsletter_wiz_modal(
|
||||
if (!$config['disabled_newsletter']) {
|
||||
if ($registration && users_is_admin()) {
|
||||
// Prepare registration wizard, not launch. leave control to flow.
|
||||
registration_wiz_modal(
|
||||
false,
|
||||
// Launch only if not being call from 'registration'.
|
||||
!$registration && !$initial
|
||||
// Launch only if not being launch from 'initial'.
|
||||
!$initial,
|
||||
(($show_newsletter === true) ? 'force_run_newsletter()' : null)
|
||||
);
|
||||
} else {
|
||||
if ($show_newsletter) {
|
||||
// Show newsletter wizard for current user.
|
||||
newsletter_wiz_modal(
|
||||
false,
|
||||
// Launch only if not being call from 'registration'.
|
||||
!$registration && !$initial
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$newsletter = null;
|
||||
|
||||
?>
|
||||
|
|
|
@ -1976,7 +1976,7 @@ class ConsoleSupervisor
|
|||
'id_user',
|
||||
$config['id_user']
|
||||
);
|
||||
if (license_free() === true
|
||||
if (!$config['disabled_newsletter']
|
||||
&& $newsletter != 1
|
||||
&& $login === false
|
||||
) {
|
||||
|
|
|
@ -395,6 +395,10 @@ function config_update_config()
|
|||
$error_update[] = __('Enable Update Manager');
|
||||
}
|
||||
|
||||
if (!config_update_value('disabled_newsletter', get_parameter('disabled_newsletter'))) {
|
||||
$error_update[] = __('Disabled newsletter');
|
||||
}
|
||||
|
||||
if (!config_update_value('ipam_ocuppied_critical_treshold', get_parameter('ipam_ocuppied_critical_treshold'))) {
|
||||
$error_update[] = __('Ipam Ocuppied Manager Critical');
|
||||
}
|
||||
|
@ -1723,6 +1727,10 @@ function config_process_config()
|
|||
config_update_value('enable_update_manager', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['disabled_newsletter'])) {
|
||||
config_update_value('disabled_newsletter', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['ipam_ocuppied_critical_treshold'])) {
|
||||
config_update_value('ipam_ocuppied_critical_treshold', 90);
|
||||
}
|
||||
|
|
|
@ -426,24 +426,25 @@ if (check_acl($config['id_user'], 0, 'ER')) {
|
|||
).'</div>';
|
||||
}
|
||||
|
||||
if (!$config['disabled_newsletter']) {
|
||||
$newsletter = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Newsletter Subscribed').': </p>';
|
||||
if ($user_info['middlename'] > 0) {
|
||||
$newsletter .= '<span>'.__('Already subscribed to %s newsletter', get_product_name()).'</span>';
|
||||
} else {
|
||||
$newsletter .= '<span><a href="javascript: force_run_newsletter();">'.__('Subscribe to our newsletter').'</a></span></div>';
|
||||
$newsletter_reminder = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Newsletter Reminder').': </p>';
|
||||
$newsletter_reminder .= html_print_switch(
|
||||
[
|
||||
'name' => 'newsletter_reminder',
|
||||
'value' => $newsletter_reminder_value,
|
||||
'disabled' => false,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$newsletter = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Newsletter Subscribed').': </p>';
|
||||
if ($user_info['middlename'] > 0) {
|
||||
$newsletter .= '<span>'.__('Already subscribed to %s newsletter', get_product_name()).'</span>';
|
||||
} else {
|
||||
$newsletter .= '<span><a href="javascript: force_run_newsletter();">'.__('Subscribe to our newsletter').'</a></span></div>';
|
||||
$newsletter_reminder = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Newsletter Reminder').': </p>';
|
||||
$newsletter_reminder .= html_print_switch(
|
||||
[
|
||||
'name' => 'newsletter_reminder',
|
||||
'value' => $newsletter_reminder_value,
|
||||
'disabled' => false,
|
||||
]
|
||||
);
|
||||
$newsletter_reminder .= '</div>';
|
||||
}
|
||||
|
||||
$newsletter_reminder .= '</div>';
|
||||
|
||||
|
||||
|
||||
$autorefresh_list_out = [];
|
||||
|
|
Loading…
Reference in New Issue