Skip to content

Commit e499247

Browse files
authored
Merge pull request #3695 from Ren-Roros-Digital/defautlValue
feat: readd defaultValue to Standards
2 parents 053ce3e + 980738b commit e499247

File tree

2 files changed

+42
-38
lines changed

2 files changed

+42
-38
lines changed

src/components/CippComponents/CippFormComponent.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const CippFormComponent = (props) => {
4343
name, // The name that may have bracket notation
4444
label,
4545
labelLocation = "behind", // Default location for switches
46+
defaultValue,
4647
...other
4748
} = props;
4849
const { errors } = useFormState({ control: formControl.control });
@@ -121,6 +122,7 @@ export const CippFormComponent = (props) => {
121122
{...other}
122123
{...formControl.register(convertedName, { ...validators })}
123124
label={label}
125+
defaultValue={defaultValue}
124126
/>
125127
</div>
126128
<Typography variant="subtitle3" color="error">
@@ -156,6 +158,7 @@ export const CippFormComponent = (props) => {
156158
{...other}
157159
{...formControl.register(convertedName, { ...validators })}
158160
label={label}
161+
defaultValue={defaultValue}
159162
/>
160163
</div>
161164
<Typography variant="subtitle3" color="error">
@@ -171,6 +174,7 @@ export const CippFormComponent = (props) => {
171174
<Controller
172175
name={convertedName}
173176
control={formControl.control}
177+
defaultValue={defaultValue}
174178
render={({ field }) =>
175179
renderSwitchWithLabel(
176180
<Switch

src/data/standards.json

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@
604604
"type": "number",
605605
"name": "standards.NudgeMFA.snoozeDurationInDays",
606606
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)",
607-
"default": 1
607+
"defaultValue": 1
608608
}
609609
],
610610
"label": "Sets the state for the request to setup Authenticator",
@@ -1136,7 +1136,7 @@
11361136
"name": "standards.EnableMailTips.MailTipsLargeAudienceThreshold",
11371137
"label": "Number of recipients to trigger the large audience MailTip (Default is 25)",
11381138
"placeholder": "Enter a profile name",
1139-
"default": 25
1139+
"defaultValue": 25
11401140
}
11411141
],
11421142
"label": "Enable all MailTips",
@@ -1240,13 +1240,13 @@
12401240
"type": "number",
12411241
"name": "standards.SendReceiveLimitTenant.SendLimit",
12421242
"label": "Send limit in MB (Default is 35)",
1243-
"default": 35
1243+
"defaultValue": 35
12441244
},
12451245
{
12461246
"type": "number",
12471247
"name": "standards.SendReceiveLimitTenant.ReceiveLimit",
12481248
"label": "Receive Limit in MB (Default is 36)",
1249-
"default": 36
1249+
"defaultValue": 36
12501250
}
12511251
],
12521252
"label": "Set send/receive size limits",
@@ -1399,13 +1399,13 @@
13991399
"type": "number",
14001400
"name": "standards.ShortenMeetings.DefaultMinutesToReduceShortEventsBy",
14011401
"label": "Minutes to reduce short calendar events by (Default is 5)",
1402-
"default": 5
1402+
"defaultValue": 5
14031403
},
14041404
{
14051405
"type": "number",
14061406
"name": "standards.ShortenMeetings.DefaultMinutesToReduceLongEventsBy",
14071407
"label": "Minutes to reduce long calendar events by (Default is 10)",
1408-
"default": 10
1408+
"defaultValue": 10
14091409
}
14101410
],
14111411
"label": "Set shorten meetings state",
@@ -1666,31 +1666,31 @@
16661666
"type": "number",
16671667
"label": "Phishing email threshold. (Default 1)",
16681668
"name": "standards.AntiPhishPolicy.PhishThresholdLevel",
1669-
"default": 1
1669+
"defaultValue": 1
16701670
},
16711671
{
16721672
"type": "switch",
16731673
"label": "Show first contact safety tip",
16741674
"name": "standards.AntiPhishPolicy.EnableFirstContactSafetyTips",
1675-
"default": true
1675+
"defaultValue": true
16761676
},
16771677
{
16781678
"type": "switch",
16791679
"label": "Show user impersonation safety tip",
16801680
"name": "standards.AntiPhishPolicy.EnableSimilarUsersSafetyTips",
1681-
"default": true
1681+
"defaultValue": true
16821682
},
16831683
{
16841684
"type": "switch",
16851685
"label": "Show domain impersonation safety tip",
16861686
"name": "standards.AntiPhishPolicy.EnableSimilarDomainsSafetyTips",
1687-
"default": true
1687+
"defaultValue": true
16881688
},
16891689
{
16901690
"type": "switch",
16911691
"label": "Show user impersonation unusual characters safety tip",
16921692
"name": "standards.AntiPhishPolicy.EnableUnusualCharactersSafetyTips",
1693-
"default": true
1693+
"defaultValue": true
16941694
},
16951695
{
16961696
"type": "select",
@@ -1936,7 +1936,7 @@
19361936
"type": "switch",
19371937
"label": "Allow people to click through Protected View even if Safe Documents identified the file as malicious",
19381938
"name": "standards.AtpPolicyForO365.AllowSafeDocsOpen",
1939-
"default": false,
1939+
"defaultValue": false,
19401940
"required": false
19411941
}
19421942
],
@@ -2037,7 +2037,7 @@
20372037
"type": "number",
20382038
"label": "Bulk email threshold (Default 7)",
20392039
"name": "standards.SpamFilterPolicy.BulkThreshold",
2040-
"default": 7
2040+
"defaultValue": 7
20412041
},
20422042
{
20432043
"type": "autoComplete",
@@ -3089,25 +3089,25 @@
30893089
"type": "switch",
30903090
"name": "standards.TeamsMessagingPolicy.AllowOwnerDeleteMessage",
30913091
"label": "Allow Owner to Delete Messages",
3092-
"default": false
3092+
"defaultValue": false
30933093
},
30943094
{
30953095
"type": "switch",
30963096
"name": "standards.TeamsMessagingPolicy.AllowUserDeleteMessage",
30973097
"label": "Allow User to Delete Messages",
3098-
"default": true
3098+
"defaultValue": true
30993099
},
31003100
{
31013101
"type": "switch",
31023102
"name": "standards.TeamsMessagingPolicy.AllowUserEditMessage",
31033103
"label": "Allow User to Edit Messages",
3104-
"default": true
3104+
"defaultValue": true
31053105
},
31063106
{
31073107
"type": "switch",
31083108
"name": "standards.TeamsMessagingPolicy.AllowUserDeleteChat",
31093109
"label": "Allow User to Delete Chats",
3110-
"default": true
3110+
"defaultValue": true
31113111
},
31123112
{
31133113
"type": "autoComplete",
@@ -3135,25 +3135,25 @@
31353135
"type": "switch",
31363136
"name": "standards.TeamsMessagingPolicy.CreateCustomEmojis",
31373137
"label": "Allow Creating Custom Emojis",
3138-
"default": true
3138+
"defaultValue": true
31393139
},
31403140
{
31413141
"type": "switch",
31423142
"name": "standards.TeamsMessagingPolicy.DeleteCustomEmojis",
31433143
"label": "Allow Deleting Custom Emojis",
3144-
"default": false
3144+
"defaultValue": false
31453145
},
31463146
{
31473147
"type": "switch",
31483148
"name": "standards.TeamsMessagingPolicy.AllowSecurityEndUserReporting",
31493149
"label": "Allow reporting message as security concern",
3150-
"default": true
3150+
"defaultValue": true
31513151
},
31523152
{
31533153
"type": "switch",
31543154
"name": "standards.TeamsMessagingPolicy.AllowCommunicationComplianceEndUserReporting",
31553155
"label": "Allow reporting message as inappropriate content",
3156-
"default": true
3156+
"defaultValue": true
31573157
}
31583158
],
31593159
"label": "Global Messaging Policy for Microsoft Teams",
@@ -3179,7 +3179,7 @@
31793179
"type": "number",
31803180
"name": "standards.AutopilotStatusPage.TimeOutInMinutes",
31813181
"label": "Timeout in minutes",
3182-
"default": 60
3182+
"defaultValue": 60
31833183
},
31843184
{
31853185
"type": "textField",
@@ -3190,43 +3190,43 @@
31903190
"type": "switch",
31913191
"name": "standards.AutopilotStatusPage.ShowProgress",
31923192
"label": "Show progress to users",
3193-
"default": true
3193+
"defaultValue": true
31943194
},
31953195
{
31963196
"type": "switch",
31973197
"name": "standards.AutopilotStatusPage.EnableLog",
31983198
"label": "Turn on log collection",
3199-
"default": true
3199+
"defaultValue": true
32003200
},
32013201
{
32023202
"type": "switch",
32033203
"name": "standards.AutopilotStatusPage.OBEEOnly",
32043204
"label": "Show status page only with OOBE setup",
3205-
"default": true
3205+
"defaultValue": true
32063206
},
32073207
{
32083208
"type": "switch",
32093209
"name": "standards.AutopilotStatusPage.BlockDevice",
32103210
"label": "Block device usage during setup",
3211-
"default": true
3211+
"defaultValue": true
32123212
},
32133213
{
32143214
"type": "switch",
32153215
"name": "standards.AutopilotStatusPage.AllowRetry",
32163216
"label": "Allow retry",
3217-
"default": true
3217+
"defaultValue": true
32183218
},
32193219
{
32203220
"type": "switch",
32213221
"name": "standards.AutopilotStatusPage.AllowReset",
32223222
"label": "Allow reset",
3223-
"default": true
3223+
"defaultValue": true
32243224
},
32253225
{
32263226
"type": "switch",
32273227
"name": "standards.AutopilotStatusPage.AllowFail",
32283228
"label": "Allow users to use device if setup fails",
3229-
"default": true
3229+
"defaultValue": true
32303230
}
32313231
],
32323232
"label": "Enable Autopilot Status Page",
@@ -3278,55 +3278,55 @@
32783278
"type": "switch",
32793279
"name": "standards.AutopilotProfile.CollectHash",
32803280
"label": "Convert all targeted devices to Autopilot",
3281-
"default": true
3281+
"defaultValue": true
32823282
},
32833283
{
32843284
"type": "switch",
32853285
"name": "standards.AutopilotProfile.AssignToAllDevices",
32863286
"label": "Assign to all devices",
3287-
"default": true
3287+
"defaultValue": true
32883288
},
32893289
{
32903290
"type": "switch",
32913291
"name": "standards.AutopilotProfile.SelfDeployingMode",
32923292
"label": "Enable Self-deploying Mode",
3293-
"default": true
3293+
"defaultValue": true
32943294
},
32953295
{
32963296
"type": "switch",
32973297
"name": "standards.AutopilotProfile.HideTerms",
32983298
"label": "Hide Terms and Conditions",
3299-
"default": true
3299+
"defaultValue": true
33003300
},
33013301
{
33023302
"type": "switch",
33033303
"name": "standards.AutopilotProfile.HidePrivacy",
33043304
"label": "Hide Privacy Settings",
3305-
"default": true
3305+
"defaultValue": true
33063306
},
33073307
{
33083308
"type": "switch",
33093309
"name": "standards.AutopilotProfile.HideChangeAccount",
33103310
"label": "Hide Change Account Options",
3311-
"default": true
3311+
"defaultValue": true
33123312
},
33133313
{
33143314
"type": "switch",
33153315
"name": "standards.AutopilotProfile.NotLocalAdmin",
33163316
"label": "Setup user as a standard user (not local admin)",
3317-
"default": true
3317+
"defaultValue": true
33183318
},
33193319
{
33203320
"type": "switch",
33213321
"name": "standards.AutopilotProfile.AllowWhiteGlove",
33223322
"label": "Allow White Glove OOBE",
3323-
"default": true
3323+
"defaultValue": true
33243324
},
33253325
{
33263326
"type": "switch",
33273327
"name": "standards.AutopilotProfile.AutoKeyboard",
33283328
"label": "Automatically configure keyboard",
3329-
"default": true
3329+
"defaultValue": true
33303330
}
33313331
],
33323332
"label": "Enable Autopilot Profile",

0 commit comments

Comments
 (0)