-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ingest_fixes
- Loading branch information
Showing
11 changed files
with
1,000 additions
and
1,084 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
keycloak/keycloakify/src/login/pages/AcceptanceOfTerms.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
|
||
interface AcceptanceOfTermsProps { | ||
termsMessage: string; | ||
onAgreeChange: (agreed: boolean) => void; | ||
} | ||
|
||
const AcceptanceOfTerms: React.FC<AcceptanceOfTermsProps> = ({ termsMessage, onAgreeChange }) => { | ||
return ( | ||
<div style={{ marginLeft: "1.5em", marginRight: "1.5em" }}> | ||
<div dangerouslySetInnerHTML={{ __html: termsMessage }}></div> | ||
<div> | ||
<label> | ||
<input | ||
type="checkbox" | ||
id="terms" | ||
name="terms" | ||
onChange={(e) => onAgreeChange(e.target.checked)} | ||
/> I agree | ||
</label> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AcceptanceOfTerms; |
59 changes: 59 additions & 0 deletions
59
keycloak/keycloakify/src/login/pages/IdpReviewUserProfile.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { useState } from "react"; | ||
import { clsx } from "keycloakify/tools/clsx"; | ||
import { UserProfileFormFields } from "keycloakify/login/pages/shared/UserProfileFormFields"; | ||
import type { PageProps } from "keycloakify/login/pages/PageProps"; | ||
import { useGetClassName } from "keycloakify/login/lib/useGetClassName"; | ||
import type { KcContext } from "../kcContext"; | ||
import type { I18n } from "../i18n"; | ||
import AcceptanceOfTerms from "./AcceptanceOfTerms"; | ||
|
||
export default function IdpReviewUserProfile(props: PageProps<Extract<KcContext, { pageId: "idp-review-user-profile.ftl" }>, I18n>) { | ||
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props; | ||
|
||
const { getClassName } = useGetClassName({ | ||
doUseDefaultCss, | ||
classes | ||
}); | ||
|
||
const { msg, msgStr } = i18n; | ||
|
||
const { url } = kcContext; | ||
|
||
const [isFormSubmittable, setIsFormSubmittable] = useState(false); | ||
const [didAgree, setDidAgree] = useState(false); | ||
|
||
return ( | ||
<Template {...{ kcContext, i18n, doUseDefaultCss, classes }} headerNode={msg("loginIdpReviewProfileTitle")}> | ||
<form id="kc-idp-review-profile-form" className={getClassName("kcFormClass")} action={url.loginAction} method="post"> | ||
<UserProfileFormFields | ||
kcContext={kcContext} | ||
onIsFormSubmittableValueChange={setIsFormSubmittable} | ||
i18n={i18n} | ||
getClassName={getClassName} | ||
/> | ||
<div className={getClassName("kcFormGroupClass")}> | ||
<AcceptanceOfTerms | ||
termsMessage={kcContext.properties.REGISTRATION_TERMS_MESSAGE || ''} | ||
onAgreeChange={setDidAgree} | ||
/> | ||
<div id="kc-form-options" className={getClassName("kcFormOptionsClass")}> | ||
<div className={getClassName("kcFormOptionsWrapperClass")} /> | ||
</div> | ||
<div id="kc-form-buttons" className={getClassName("kcFormButtonsClass")}> | ||
<input | ||
className={clsx( | ||
getClassName("kcButtonClass"), | ||
getClassName("kcButtonPrimaryClass"), | ||
getClassName("kcButtonBlockClass"), | ||
getClassName("kcButtonLargeClass") | ||
)} | ||
type="submit" | ||
value={msgStr("doSubmit")} | ||
disabled={!isFormSubmittable || !didAgree} | ||
/> | ||
</div> | ||
</div> | ||
</form> | ||
</Template> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v22.4.1 | ||
v22 |
Oops, something went wrong.