Skip to content

Commit 2598bee

Browse files
committed
Add preselected option for tenant selection across multiple forms
1 parent 9c1235e commit 2598bee

File tree

13 files changed

+79
-71
lines changed

13 files changed

+79
-71
lines changed

src/pages/email/administration/contacts-template/deploy.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const Page = () => {
3131
name="selectedTenants"
3232
type="multiple"
3333
allTenants={true}
34+
preselectedEnabled={true}
3435
validators={{ required: "At least one tenant must be selected" }}
3536
/>
3637
</Grid>

src/pages/email/spamfilter/list-connectionfilter/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const AddPolicy = () => {
4141
name="selectedTenants"
4242
type="multiple"
4343
allTenants={true}
44+
preselectedEnabled={true}
4445
validators={{ required: "At least one tenant must be selected" }}
4546
/>
4647
</Grid>

src/pages/email/spamfilter/list-quarantine-policies/add.jsx

Lines changed: 61 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const AddPolicy = () => {
4747
name="selectedTenants"
4848
type="multiple"
4949
allTenants={true}
50+
preselectedEnabled={true}
5051
validators={{ required: "At least one tenant must be selected" }}
5152
/>
5253
</Grid>
@@ -72,73 +73,67 @@ const AddPolicy = () => {
7273
</Grid> */}
7374

7475
<Divider sx={{ my: 2, width: "100%" }} />
75-
<Grid xs={6} >
76-
<CippFormComponent
77-
type="textField"
78-
label="Policy Name"
79-
name="Name"
80-
placeholder="Enter policy name"
81-
formControl={formControl}
82-
required={true}
83-
/>
84-
<Divider sx={{ my: 2, width: "100%" }} />
85-
<CippFormComponent
86-
type="autoComplete"
87-
label="Release Action Preference"
88-
name="ReleaseActionPreference"
89-
placeholder="Select release action preference"
90-
formControl={formControl}
91-
required={true}
92-
multiple={false}
93-
options={[
94-
{ label: "Release", value: "Release" },
95-
{ label: "Request Release", value: "RequestRelease" },
96-
]}
97-
/>
98-
</Grid>
76+
<Grid xs={6}>
77+
<CippFormComponent
78+
type="textField"
79+
label="Policy Name"
80+
name="Name"
81+
placeholder="Enter policy name"
82+
formControl={formControl}
83+
required={true}
84+
/>
85+
<Divider sx={{ my: 2, width: "100%" }} />
86+
<CippFormComponent
87+
type="autoComplete"
88+
label="Release Action Preference"
89+
name="ReleaseActionPreference"
90+
placeholder="Select release action preference"
91+
formControl={formControl}
92+
required={true}
93+
multiple={false}
94+
options={[
95+
{ label: "Release", value: "Release" },
96+
{ label: "Request Release", value: "RequestRelease" },
97+
]}
98+
/>
99+
</Grid>
99100

100-
<Grid xs={2}>
101-
102-
<CippFormComponent
103-
type="switch"
104-
label="Delete"
105-
name="Delete"
106-
formControl={formControl}
107-
/>
108-
<CippFormComponent
109-
type="switch"
110-
label="Preview"
111-
name="Preview"
112-
formControl={formControl}
113-
/>
114-
<CippFormComponent
115-
type="switch"
116-
label="Block Sender"
117-
name="BlockSender"
118-
formControl={formControl}
119-
/>
120-
<CippFormComponent
121-
type="switch"
122-
label="Allow Sender"
123-
name="AllowSender"
124-
formControl={formControl}
125-
/>
126-
</Grid>
127-
<Grid xs={4}>
128-
<CippFormComponent
129-
type="switch"
130-
label="Quarantine Notification"
131-
name="QuarantineNotification"
132-
formControl={formControl}
133-
/>
134-
<CippFormComponent
135-
type="switch"
136-
label="Include Messages From Blocked Sender Address"
137-
name="IncludeMessagesFromBlockedSenderAddress"
138-
formControl={formControl}
139-
disabled={!quarantineNotification}
140-
/>
141-
</Grid>
101+
<Grid xs={2}>
102+
<CippFormComponent type="switch" label="Delete" name="Delete" formControl={formControl} />
103+
<CippFormComponent
104+
type="switch"
105+
label="Preview"
106+
name="Preview"
107+
formControl={formControl}
108+
/>
109+
<CippFormComponent
110+
type="switch"
111+
label="Block Sender"
112+
name="BlockSender"
113+
formControl={formControl}
114+
/>
115+
<CippFormComponent
116+
type="switch"
117+
label="Allow Sender"
118+
name="AllowSender"
119+
formControl={formControl}
120+
/>
121+
</Grid>
122+
<Grid xs={4}>
123+
<CippFormComponent
124+
type="switch"
125+
label="Quarantine Notification"
126+
name="QuarantineNotification"
127+
formControl={formControl}
128+
/>
129+
<CippFormComponent
130+
type="switch"
131+
label="Include Messages From Blocked Sender Address"
132+
name="IncludeMessagesFromBlockedSenderAddress"
133+
formControl={formControl}
134+
disabled={!quarantineNotification}
135+
/>
136+
</Grid>
142137
</Grid>
143138
</CippFormPage>
144139
);

src/pages/email/spamfilter/list-spamfilter/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const AddPolicy = () => {
4141
name="selectedTenants"
4242
type="multiple"
4343
allTenants={true}
44+
preselectedEnabled={true}
4445
validators={{ required: "At least one tenant must be selected" }}
4546
/>
4647
</Grid>

src/pages/email/transport/list-connectors/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const AddPolicy = () => {
4141
name="selectedTenants"
4242
type="multiple"
4343
allTenants={true}
44+
preselectedEnabled={true}
4445
validators={{ required: "At least one tenant must be selected" }}
4546
/>
4647
</Grid>

src/pages/email/transport/list-rules/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const AddPolicy = () => {
4141
name="selectedTenants"
4242
type="multiple"
4343
allTenants={true}
44+
preselectedEnabled={true}
4445
validators={{ required: "At least one tenant must be selected" }}
4546
/>
4647
</Grid>

src/pages/endpoint/applications/list/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const ApplicationDeploymentForm = () => {
118118
name="selectedTenants"
119119
type="multiple"
120120
allTenants={true}
121+
preselectedEnabled={true}
121122
validators={{ required: "At least one tenant must be selected" }}
122123
/>
123124
</Grid>

src/pages/endpoint/autopilot/add-status-page/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Divider } from "@mui/material";
22
import { Grid } from "@mui/system";
3-
import { useForm} from "react-hook-form";
3+
import { useForm } from "react-hook-form";
44
import { Layout as DashboardLayout } from "/src/layouts/index.js";
55
import CippFormPage from "/src/components/CippFormPages/CippFormPage";
66
import CippFormComponent from "/src/components/CippComponents/CippFormComponent";
@@ -40,6 +40,7 @@ const Page = () => {
4040
name="selectedTenants"
4141
type="multiple"
4242
allTenants={true}
43+
preselectedEnabled={true}
4344
validators={{ required: "At least one tenant must be selected" }}
4445
/>
4546
</Grid>

src/pages/endpoint/autopilot/list-profiles/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const AutopilotProfileForm = () => {
4545
name="selectedTenants"
4646
type="multiple"
4747
allTenants={true}
48+
preselectedEnabled={true}
4849
validators={{ required: "At least one tenant must be selected" }}
4950
/>
5051
</Grid>

src/pages/identity/administration/jit-admin/add.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const Page = () => {
2929
type="single"
3030
allTenants={false}
3131
preselectedEnabled={true}
32+
validators={{ required: "A tenant must be selected" }}
3233
/>
3334
</Grid>
3435
<Grid size={{ md: 12, xs: 12 }}>

0 commit comments

Comments
 (0)