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,7 +149,8 @@ if ($initial && users_is_admin()) {
|
|||
);
|
||||
}
|
||||
|
||||
if ($registration && users_is_admin()) {
|
||||
if (!$config['disabled_newsletter']) {
|
||||
if ($registration && users_is_admin()) {
|
||||
// Prepare registration wizard, not launch. leave control to flow.
|
||||
registration_wiz_modal(
|
||||
false,
|
||||
|
@ -158,7 +158,7 @@ if ($registration && users_is_admin()) {
|
|||
!$initial,
|
||||
(($show_newsletter === true) ? 'force_run_newsletter()' : null)
|
||||
);
|
||||
} else {
|
||||
} else {
|
||||
if ($show_newsletter) {
|
||||
// Show newsletter wizard for current user.
|
||||
newsletter_wiz_modal(
|
||||
|
@ -167,9 +167,9 @@ if ($registration && users_is_admin()) {
|
|||
!$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,11 +426,11 @@ if (check_acl($config['id_user'], 0, 'ER')) {
|
|||
).'</div>';
|
||||
}
|
||||
|
||||
|
||||
$newsletter = '<div class="label_select_simple"><p class="edit_user_labels">'.__('Newsletter Subscribed').': </p>';
|
||||
if ($user_info['middlename'] > 0) {
|
||||
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 {
|
||||
} 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(
|
||||
|
@ -440,9 +440,10 @@ if ($user_info['middlename'] > 0) {
|
|||
'disabled' => false,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$newsletter_reminder .= '</div>';
|
||||
$newsletter_reminder .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue