mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 18:26:40 +00:00
add each form control it's own form field/item/control
This commit is contained in:
@@ -274,6 +274,7 @@ export default function CreateDomainForm({
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{domainType === "wildcard" && (
|
{domainType === "wildcard" && (
|
||||||
|
<>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="certResolver"
|
name="certResolver"
|
||||||
@@ -310,8 +311,17 @@ export default function CreateDomainForm({
|
|||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
{field.value !== null && field.value !== "default" && (
|
</FormItem>
|
||||||
<div className="space-y-2 mt-2">
|
)}
|
||||||
|
/>
|
||||||
|
{form.watch("certResolver") !== null &&
|
||||||
|
form.watch("certResolver") !== "default" && (
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="certResolver"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>{t("customResolver")}</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("enterCustomResolver")}
|
placeholder={t("enterCustomResolver")}
|
||||||
@@ -319,6 +329,14 @@ export default function CreateDomainForm({
|
|||||||
onChange={(e) => field.onChange(e.target.value)}
|
onChange={(e) => field.onChange(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{form.watch("certResolver") !== null &&
|
||||||
|
form.watch("certResolver") !== "default" && (
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="preferWildcardCert"
|
name="preferWildcardCert"
|
||||||
@@ -339,11 +357,8 @@ export default function CreateDomainForm({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</FormItem>
|
</>
|
||||||
)}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Reference in New Issue
Block a user