@@ -10,7 +10,6 @@ import { useNavigate } from 'react-router-dom'
10
10
11
11
import { useApiMutation , useApiQueryClient } from '@oxide/api'
12
12
13
- import { CheckboxField } from '~/components/form/fields/CheckboxField'
14
13
import { DescriptionField } from '~/components/form/fields/DescriptionField'
15
14
import { FileField } from '~/components/form/fields/FileField'
16
15
import { NameField } from '~/components/form/fields/NameField'
@@ -62,8 +61,6 @@ export function CreateIdpSideModalForm() {
62
61
} )
63
62
64
63
const form = useForm ( { defaultValues } )
65
- const signedRequestsForm = useForm ( { defaultValues : { signedRequests : false } } )
66
- const signedRequests = signedRequestsForm . watch ( 'signedRequests' )
67
64
68
65
return (
69
66
< SideModalForm
@@ -144,30 +141,24 @@ export function CreateIdpSideModalForm() {
144
141
required
145
142
control = { form . control }
146
143
/>
147
- < CheckboxField name = "signedRequests" control = { signedRequestsForm . control } >
148
- Signed requests (optional)
149
- </ CheckboxField >
150
- { signedRequests && (
151
- < >
152
- { /* We don't bother validating that you have both of these or neither even
153
- though the API requires that because we are going to change the API to
154
- always require both, at which point these become simple `required` fields */ }
155
- < FileField
156
- id = "public-cert-file-input"
157
- name = "signingKeypair.publicCert"
158
- description = "DER-encoded X.509 certificate"
159
- label = "Public cert"
160
- control = { form . control }
161
- />
162
- < FileField
163
- id = "private-key-file-input"
164
- name = "signingKeypair.privateKey"
165
- description = "DER-encoded private key"
166
- label = "Private key"
167
- control = { form . control }
168
- />
169
- </ >
170
- ) }
144
+
145
+ { /* We don't bother validating that you have both of these or neither even
146
+ though the API requires that because we are going to change the API to
147
+ always require both, at which point these become simple `required` fields */ }
148
+ < FileField
149
+ id = "public-cert-file-input"
150
+ name = "signingKeypair.publicCert"
151
+ description = "DER-encoded X.509 certificate"
152
+ label = "Public cert"
153
+ control = { form . control }
154
+ />
155
+ < FileField
156
+ id = "private-key-file-input"
157
+ name = "signingKeypair.privateKey"
158
+ description = "DER-encoded private key"
159
+ label = "Private key"
160
+ control = { form . control }
161
+ />
171
162
172
163
< FormDivider />
173
164
0 commit comments