From 69bff04f7820a4f66e5cce3b41b201a5eb5e09ff Mon Sep 17 00:00:00 2001 From: John Date: Tue, 6 Apr 2021 19:24:06 +0000 Subject: [PATCH] C2021-021 Set the Find/Replace button text, and tool tip based on whether the user has write privileges --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index d1310471..de007911 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -3423,13 +3423,24 @@ namespace VEPROMS { StepPanel pnl = tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepPanel; if (pnl != null) + { + // C2021-021 change the tool tip for the Find and Find/Replace button based on the user's accessibility to the procedure. + // also change the text on the buttons to read either Find or Find/Replace + // also toggle the Replace tab on the dialog based on the user's accessibility to the procedure + bool isReviewer = !MyUserInfo.IsAllowedToEdit(tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion); pnl.MyStepTabPanel.MyStepTabRibbon.SetButtonAndMenuEnabling(true); + this.dlgFindReplace.ToggleReplaceTab(isReviewer ? E_ViewMode.View : E_ViewMode.Edit); + pnl.MyStepTabPanel.MyStepTabRibbon.ToggleFindReplaceToolTip(isReviewer); + } } } private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args) { this.lblEditView.Text = args.ViewMode == E_ViewMode.Edit ? "Edit" : "View"; this.dlgFindReplace.ToggleReplaceTab(args.ViewMode); + // C2021-021 change the tool tip for the Find and Find/Replace button based on the user's accessibility to the procedure. + // also change the text on the buttons to read either Find or Find/Replace + tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.ToggleFindReplaceToolTip(args.ViewMode == E_ViewMode.View); } private ItemInfo _CurrentItem = null; private StepRTB _LastStepRTB = null;