mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 10:14:13 +08:00
Fix snooze time not getting set
- add type cast so that the selected value is set correctly - Preferences were not being taken into account when retrieving the snooze time
This commit is contained in:
parent
e5cb35bc04
commit
a075a5a10e
3 changed files with 3 additions and 2 deletions
|
@ -100,6 +100,7 @@ class Alert extends Basic
|
|||
|
||||
$preference = $current_user->getPreference('snooze_alert_timer') ?? null;
|
||||
|
||||
$snoozeTimer = $preference;
|
||||
if (empty($preference)){
|
||||
require_once 'modules/Configurator/Configurator.php';
|
||||
$configurator = new Configurator();
|
||||
|
|
|
@ -172,7 +172,7 @@ class ConfiguratorViewEdit extends ViewEdit
|
|||
$this->ss->assign('record_modal_pagination_type', get_select_options_with_id($app_list_strings['record_modal_pagination_type'], 'pagination'));
|
||||
}
|
||||
if (!empty($configurator->config['snooze_alert_timer'])){
|
||||
$this->ss->assign('SNOOZE_ALERT_TIMER', get_select_options_with_id($app_list_strings['snooze_alert_timer'], $configurator->config['snooze_alert_timer']));
|
||||
$this->ss->assign('SNOOZE_ALERT_TIMER', get_select_options_with_id($app_list_strings['snooze_alert_timer'], (int)$configurator->config['snooze_alert_timer']));
|
||||
} else {
|
||||
$this->ss->assign('SNOOZE_ALERT_TIMER', get_select_options_with_id($app_list_strings['snooze_alert_timer'], 300));
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ class UserViewHelper
|
|||
}
|
||||
|
||||
$snooze = $this->bean->getPreference('snooze_alert_timer') ?? $sugar_config['snooze_alert_timer'] ?? 600;
|
||||
$this->ss->assign('SNOOZE_ALERT_TIMER', get_select_options_with_id($app_list_strings['snooze_alert_timer'], $snooze));
|
||||
$this->ss->assign('SNOOZE_ALERT_TIMER', get_select_options_with_id($app_list_strings['snooze_alert_timer'], (int)$snooze));
|
||||
|
||||
$this->ss->assign("REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']);
|
||||
$this->ss->assign("EMAIL_REMINDER_TIME_OPTIONS", $app_list_strings['reminder_time_options']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue