LP#1951307: Contextual confirm dialog button text
authorStephanie Leary <stephanie.leary@equinoxOLI.org>
Mon, 26 Sep 2022 16:54:48 +0000 (11:54 -0500)
committerStephanie Leary <stephanie.leary@equinoxOLI.org>
Mon, 26 Sep 2022 16:54:48 +0000 (11:54 -0500)
commita581623b2cfd56d072a1c3b00ad138811a448d50
tree5aede1e9824a7cdb0eb0eda3601d4d0bc747edb7
parent862eca349b5f74c77aa5684d96a26f3513224c00
LP#1951307: Contextual confirm dialog button text

This patch changes the confirm dialog buttons to "Yes" and "No" for
event cloning as requested.

More generally, it allows the confirm and prompt dialogs to accept
input strings specifying the text for these buttons, with "Confirm"
and "Cancel" as the defaults. You can now choose the wording that makes
the most sense in the context of the dialog.

See <eg-confirm-dialog> in triggers.component.html for usage.

The logic has been duplicated in ConfirmDialogComponent and
PromptDialogComponent so that both prompt and confirm dialogs
can use custom strings. Galen and I discussed whether this would be
better implemented once in the dialog component, but since not all
subcomponents would use the functionality, we agreed to duplicate and
document the two subcomponents instead. Note that prompt components
throughout the interface have not been updated and will use the default
strings unless dialogConfirmTrue and dialogConfirmFalse are specified
as in triggers.component.html.

To test:
-------
[1] Apply the patch and open the Local Admin Notifications/Action
    Triggers screen:
    eg2/en-US/staff/admin/local/action_trigger/event_definition
[2] Right-click a row and choose "Clone Selected."
[3] Verify that the choices are "Yes" and "No" instead of "Confirm" and
    "Cancel."
[4] Navigate to another screen that includes a confirm dialog, e.g.
    eg2/en-US/staff/reporter/simple, right click a report and select
    "Clone Report," to verify that "Confirm" and "Cancel" have not
    changed in other instances.
Open-ILS/src/eg2/src/app/share/dialog/confirm.component.html
Open-ILS/src/eg2/src/app/share/dialog/confirm.component.ts
Open-ILS/src/eg2/src/app/share/dialog/prompt.component.html
Open-ILS/src/eg2/src/app/share/dialog/prompt.component.ts
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/triggers.component.html