Skip to content

Commit

Permalink
Check for disabled languages on wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
jack7anderson7 committed Jul 23, 2024
1 parent 8e90f7d commit 07e9b98
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/Users/views/view.wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,16 @@ function setSymbolValue(id) {

//// Name display format
$this->ss->assign('default_locale_name_format', $locale->getLocaleFormatMacro($current_user));
$this->ss->assign('user_language', get_select_options_with_id($sugar_config['languages'], $current_user->getPreference('language')));

$disabledLanguages = $sugar_config['disabled_languages'] ?? '';
$language = $current_user->getPreference('language');


if (str_contains($disabledLanguages, $language)){
$language = $sugar_config['default_language'];
}

$this->ss->assign('user_language', get_select_options_with_id(get_languages(), $language));
$this->ss->assign('getNameJs', $locale->getNameJs());

$this->ss->assign('TIMEOPTIONS', get_select_options_with_id($sugar_config['time_formats'], $current_user->_userPreferenceFocus->getDefaultPreference('default_time_format')));
Expand Down

0 comments on commit 07e9b98

Please sign in to comment.