Fix labels for user vs admin clear events (#1079)

* fix labels for user vs admin clear events

* fix lint issue unrelated to fixed issue
This commit is contained in:
mfrances17 2021-08-27 15:18:23 -04:00 committed by GitHub
parent e062603ff2
commit 299993d30b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 207 additions and 206 deletions

View file

@ -184,7 +184,6 @@ export const EventsSection = () => {
const userEventSearchFormDisplay = () => {
return (
<>
<Flex
direction={{ default: "column" }}
spaceItems={{ default: "spaceItemsNone" }}
@ -388,7 +387,6 @@ export const EventsSection = () => {
)}
</FlexItem>
</Flex>
</>
);
};

View file

@ -161,12 +161,14 @@ export const EventConfigForm = ({
</ActionGroup>
<Divider />
<FormGroup
label={t("clearEvents")}
label={type === "user" ? t("clearUserEvents") : t("clearAdminEvents")}
fieldId={`clear-${type}-events`}
labelIcon={
<HelpItem
helpText={`realm-settings-help:${type}-clearEvents`}
forLabel={t("clearEvents")}
forLabel={
type === "user" ? t("clearUserEvents") : t("clearAdminEvents")
}
forID={`clear-${type}-events`}
/>
}
@ -177,7 +179,7 @@ export const EventConfigForm = ({
data-testid={`clear-${type}-events`}
onClick={() => clear()}
>
{t("clearEvents")}
{type === "user" ? t("clearUserEvents") : t("clearAdminEvents")}
</Button>
</FormGroup>
</>

View file

@ -30,11 +30,12 @@ export default {
events: "Events",
userEventsConfig: "User events configuration",
userEventsSettings: "User events settings",
adminEventsConfig: "Admin events config",
adminEventsConfig: "Admin events configuration",
adminEventsSettings: "Admin events settings",
saveEvents: "Save events",
expiration: "Expiration",
clearEvents: "Clear user events",
clearUserEvents: "Clear user events",
clearAdminEvents: "Clear admin events",
includeRepresentation: "Include representation",
email: "Email",
template: "Template",