add visible field to form
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
Group,
|
||||
Modal,
|
||||
NumberInput,
|
||||
@@ -33,6 +34,7 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
|
||||
productor_id: currentForm?.productor?.id.toString() ?? "",
|
||||
referer_id: currentForm?.referer?.id.toString() ?? "",
|
||||
minimum_shipment_value: currentForm?.minimum_shipment_value ?? null,
|
||||
visible: currentForm?.visible ?? false
|
||||
},
|
||||
validate: {
|
||||
name: (value) =>
|
||||
@@ -136,6 +138,11 @@ export default function FormModal({ opened, onClose, currentForm, handleSubmit }
|
||||
radius="sm"
|
||||
{...form.getInputProps("minimum_shipment_value")}
|
||||
/>
|
||||
<Checkbox mt="lg"
|
||||
label={t("visible", {capfirst: true})}
|
||||
description={t("by checking this option the form will be accessible publicly on the home page, only check it if everything is fine with your form", {capfirst: true})}
|
||||
{...form.getInputProps("visible", {type: "checkbox"})}
|
||||
/>
|
||||
<Group mt="sm" justify="space-between">
|
||||
<Button
|
||||
variant="filled"
|
||||
|
||||
Reference in New Issue
Block a user