Skip to content
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
3 changes: 2 additions & 1 deletion web/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ const en: BaseTranslation = {
label: 'Phone',
},
enableEnrollment: {
label: 'Use enrollment process',
label: 'Use user self-enrollment process',
link: '[more information here](https://defguard.gitbook.io/defguard/help/enrollment)',
},
},
},
Expand Down
12 changes: 10 additions & 2 deletions web/src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,13 @@ type RootTranslation = {
}
enableEnrollment: {
/**
* Uโ€‹sโ€‹eโ€‹ โ€‹eโ€‹nโ€‹rโ€‹oโ€‹lโ€‹lโ€‹mโ€‹eโ€‹nโ€‹tโ€‹ โ€‹pโ€‹rโ€‹oโ€‹cโ€‹eโ€‹sโ€‹s
* Uโ€‹sโ€‹eโ€‹ โ€‹uโ€‹sโ€‹eโ€‹rโ€‹ โ€‹sโ€‹eโ€‹lโ€‹fโ€‹-โ€‹eโ€‹nโ€‹rโ€‹oโ€‹lโ€‹lโ€‹mโ€‹eโ€‹nโ€‹tโ€‹ โ€‹pโ€‹rโ€‹oโ€‹cโ€‹eโ€‹sโ€‹s
*/
label: string
/**
* [โ€‹mโ€‹oโ€‹rโ€‹eโ€‹ โ€‹iโ€‹nโ€‹fโ€‹oโ€‹rโ€‹mโ€‹aโ€‹tโ€‹iโ€‹oโ€‹nโ€‹ โ€‹hโ€‹eโ€‹rโ€‹eโ€‹]โ€‹(โ€‹hโ€‹tโ€‹tโ€‹pโ€‹sโ€‹:โ€‹/โ€‹/โ€‹dโ€‹eโ€‹fโ€‹gโ€‹uโ€‹aโ€‹rโ€‹dโ€‹.โ€‹gโ€‹iโ€‹tโ€‹bโ€‹oโ€‹oโ€‹kโ€‹.โ€‹iโ€‹oโ€‹/โ€‹dโ€‹eโ€‹fโ€‹gโ€‹uโ€‹aโ€‹rโ€‹dโ€‹/โ€‹hโ€‹eโ€‹lโ€‹pโ€‹/โ€‹eโ€‹nโ€‹rโ€‹oโ€‹lโ€‹lโ€‹mโ€‹eโ€‹nโ€‹tโ€‹)
*/
link: string
}
}
}
Expand Down Expand Up @@ -5056,9 +5060,13 @@ export type TranslationFunctions = {
}
enableEnrollment: {
/**
* Use enrollment process
* Use user self-enrollment process
*/
label: () => LocalizedString
/**
* [more information here](https://defguard.gitbook.io/defguard/help/enrollment)
*/
link: () => LocalizedString
}
}
}
Expand Down
1 change: 1 addition & 0 deletions web/src/i18n/pl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ const pl: Translation = {
},
enableEnrollment: {
label: 'Uลผyj zdalnej rejestracji',
link: '[wiฤ™cej informacji tutaj](https://defguard.gitbook.io/defguard/help/enrollment)',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';
import { omit } from 'lodash-es';
import { useMemo, useRef, useState } from 'react';
import { SubmitHandler, useController, useForm } from 'react-hook-form';
import ReactMarkdown from 'react-markdown';
import { z } from 'zod';
import { shallow } from 'zustand/shallow';

Expand Down Expand Up @@ -188,11 +189,16 @@ export const AddUserForm = () => {
data-testid="add-user-form"
onSubmit={handleSubmit(onSubmit)}
>
<FormCheckBox
labelPlacement="right"
label={LL.modals.addUser.form.fields.enableEnrollment.label()}
controller={{ control, name: 'enable_enrollment' }}
/>
<div className="checkbox-space">
<FormCheckBox
labelPlacement="right"
label={LL.modals.addUser.form.fields.enableEnrollment.label()}
controller={{ control, name: 'enable_enrollment' }}
/>
<ReactMarkdown>
{LL.modals.addUser.form.fields.enableEnrollment.link()}
</ReactMarkdown>
</div>
<div className="row">
<div className="item">
<FormInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
width: 1100px;
}

& > .form-checkbox {
.checkbox-space {
display: flex;
margin-bottom: 25px;
gap: 5px;

a {
@include typography(input-label);
}
}

& > .row {
display: flex;
flex-flow: column;
Expand Down