diff --git a/pages/preferences.php b/pages/preferences.php index f9d8a0941..aafe86937 100644 --- a/pages/preferences.php +++ b/pages/preferences.php @@ -151,12 +151,12 @@ JS $sIdFavoriteOrganizations = 1; $oFavoriteOrganizationsForm->AddSubBlock($oBlock->GetDisplay($oP, $sIdFavoriteOrganizations, [ - 'menu' => false, - 'selection_mode' => true, - 'selection_type' => 'multiple', - 'table_id' => 'user_prefs', + 'menu' => false, + 'selection_mode' => true, + 'selection_type' => 'multiple', + 'table_id' => 'user_prefs', 'surround_with_panel' => false, - 'selected_rows' => $aFavoriteOrgs + 'selected_rows' => $aFavoriteOrgs, ])); $oFavoriteOrganizationsForm->AddSubBlock($oAppContext->GetForFormBlock()); @@ -223,7 +223,7 @@ JS $oShortcutsToolBar->AddSubBlock($oShortcutsDeleteButton); } $oContentLayout->AddMainBlock($oShortcutsBlock); - + ////////////////////////////////////////////////////////////////////////// // // Newsroom @@ -239,7 +239,7 @@ JS $iCountProviders++; } } - + $bNewsroomEnabled = (MetaModel::GetConfig()->Get('newsroom_enabled') !== false); if ($bNewsroomEnabled && ($iCountProviders > 0)) { @@ -248,13 +248,13 @@ JS $sNewsroomHtml = ''; $sNewsroomHtml .= '
'; $iNewsroomDisplaySize = (int)appUserPreferences::GetPref('newsroom_display_size', 7); - + if ($iNewsroomDisplaySize < 1) $iNewsroomDisplaySize = 1; if ($iNewsroomDisplaySize > 20) $iNewsroomDisplaySize = 20; $sInput = ''; $sIcon = ''; $sNewsroomHtml .= Dict::Format('UI:Newsroom:DisplayAtMost_X_Messages', $sInput, $sIcon); - + /** * @var iNewsroomProvider[] $aProviders */ @@ -311,7 +311,7 @@ JS $oNewsroomBlock->AddSubBlock($oNewsroomEndHtmlBlock); $oContentLayout->AddMainBlock($oNewsroomBlock); } - + ////////////////////////////////////////////////////////////////////////// // // User defined keyboard shortcut @@ -354,14 +354,14 @@ var fCallback = function(sVal){ oPanel.addClass('ibo-is-focus').val('$sKeyboardShortcutsInputHint') recordSequence$sKeyboardShortcutBlockId(fCallback); JS - ); - - $oInput = InputUIBlockFactory::MakeForInputWithLabel(Dict::S($aKeyboardShortcut['label']), $sKeyboardShortcutId, $aKeyboardShortcut['key'], $sKeyboardShortcutId, 'text'); - $oInput->GetInput()->AddCSSClasses(['ibo-keyboard-shortcut--input']); - $oKeyboardShortcutForm->AddSubBlock(new Html('
')); - $oKeyboardShortcutForm->AddSubBlock($oInput); - $oKeyboardShortcutForm->AddSubBlock($oButton); - $oKeyboardShortcutForm->AddSubBlock(new Html('
')); + ); + + $oInput = InputUIBlockFactory::MakeForInputWithLabel(Dict::S($aKeyboardShortcut['label']), $sKeyboardShortcutId, $aKeyboardShortcut['key'], $sKeyboardShortcutId, 'text'); + $oInput->GetInput()->AddCSSClasses(['ibo-keyboard-shortcut--input']); + $oKeyboardShortcutForm->AddSubBlock(new Html('
')); + $oKeyboardShortcutForm->AddSubBlock($oInput); + $oKeyboardShortcutForm->AddSubBlock($oButton); + $oKeyboardShortcutForm->AddSubBlock(new Html('
')); } // Prepare buttons @@ -380,6 +380,10 @@ JS $oKeyboardShortcutResetButton = ButtonUIBlockFactory::MakeForSecondaryAction(Dict::S('UI:Preferences:PersonalizeKeyboardShortcuts:Button:Reset'), 'operation', 'reset_keyboard_shortcuts', true); $oKeyboardShortcutResetButton->SetTooltip(Dict::S('UI:Preferences:PersonalizeKeyboardShortcuts:Button:Reset:Tooltip')); $oKeyboardShortcutToolbar->AddSubBlock($oKeyboardShortcutResetButton); + // - Submit button + $oKeyboardShortcutSubmitButton = ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('UI:Button:Apply'), 'operation', 'apply_keyboard_shortcuts', true); + $oKeyboardShortcutToolbar->AddSubBlock($oKeyboardShortcutSubmitButton); + $oContentLayout->AddMainBlock($oKeyboardShortcutBlock); @@ -444,7 +448,7 @@ HTML $oUserPicturePlaceHolderHtmlBlock = new Html($sUserPicturePlaceHolderHtml); $oUserPicturePlaceHolderBlock->AddSubBlock($oUserPicturePlaceHolderHtmlBlock); $oContentLayout->AddMainBlock($oUserPicturePlaceHolderBlock); - + /** @var iPreferencesExtension $oLoginExtensionInstance */ foreach (MetaModel::EnumPlugins('iPreferencesExtension') as $oPreferencesExtensionInstance) {