Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consent enter button #3445

Merged
merged 4 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions apps/consent/app/consent/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,7 @@ const Consent = async ({ searchParams }: { searchParams: ConsentProps }) => {
Do not ask me again
</label>
</p>
<div className="flex flex-col md:flex-row w-full gap-2">
<SecondaryButton
type="submit"
id="reject"
name="submit"
value={SubmitValue.denyAccess}
formNoValidate
>
Deny
</SecondaryButton>

<div className="flex flex-col md:flex-row-reverse w-full gap-2">
<PrimaryButton
data-testid="submit_consent_btn"
type="submit"
Expand All @@ -197,6 +187,15 @@ const Consent = async ({ searchParams }: { searchParams: ConsentProps }) => {
>
Allow
</PrimaryButton>
<SecondaryButton
type="submit"
id="reject"
name="submit"
value={SubmitValue.denyAccess}
formNoValidate
>
Deny
</SecondaryButton>
</div>
</form>
</Card>
Expand Down
21 changes: 11 additions & 10 deletions apps/consent/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async function submitForm(formData: FormData): Promise<LoginEmailResponse | void
const submitValue = formData.get("submit")
const email = formData.get("email")
const remember = String(formData.get("remember") === "1")

if (
!login_challenge ||
!submitValue ||
Expand Down Expand Up @@ -182,16 +183,7 @@ const Login = async ({ searchParams }: { searchParams: LoginProps }) => {
</Link>
</div>
</div>
<div className="flex flex-col md:flex-row w-full gap-2">
<SecondaryButton
type="submit"
id="reject"
name="submit"
value={SubmitValue.denyAccess}
formNoValidate
>
Cancel
</SecondaryButton>
<div className="flex flex-col md:flex-row-reverse w-full gap-2">
<PrimaryButton
type="submit"
id="accept"
Expand All @@ -201,6 +193,15 @@ const Login = async ({ searchParams }: { searchParams: LoginProps }) => {
>
Next
</PrimaryButton>
<SecondaryButton
type="submit"
id="reject"
name="submit"
value={SubmitValue.denyAccess}
formNoValidate
>
Cancel
</SecondaryButton>
</div>
</FormComponent>
</Card>
Expand Down
20 changes: 10 additions & 10 deletions apps/consent/app/login/phone/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,16 @@ const LoginForm: React.FC<LoginFormProps> = ({ login_challenge, countryCodes })
</div>
</div>

<div className="flex flex-col md:flex-row w-full gap-2">
<div className="flex flex-col md:flex-row-reverse w-full gap-2">
<PrimaryButton
type="submit"
id="accept"
name="submit"
value="Log in"
data-testid="phone_login_next_btn"
>
Next
</PrimaryButton>
<SecondaryButton
type="submit"
id="reject"
Expand All @@ -129,15 +138,6 @@ const LoginForm: React.FC<LoginFormProps> = ({ login_challenge, countryCodes })
>
Cancel
</SecondaryButton>
<PrimaryButton
data-testid="phone_login_next_btn"
type="submit"
id="accept"
name="submit"
value="Log in"
>
Next
</PrimaryButton>
</div>
</FormComponent>
</>
Expand Down
Loading