fix checkbox field
This commit is contained in:
@@ -73,14 +73,8 @@ export const FiltersList = ({ categories, filters, selectedSources }: Props) =>
|
|||||||
<Controller
|
<Controller
|
||||||
name={id}
|
name={id}
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox {...field} title={name} disabled={isSelected} />
|
||||||
name={id}
|
|
||||||
title={name}
|
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={isSelected}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{renderIcons(iconsData)}
|
{renderIcons(iconsData)}
|
||||||
|
|||||||
@@ -193,14 +193,8 @@ const Form = ({ processing, initialValues, onSubmit }: Props) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="edns_cs_enabled"
|
name="edns_cs_enabled"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox {...field} title={t('edns_enable')} disabled={processing} />
|
||||||
name={name}
|
|
||||||
title={t('edns_enable')}
|
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -211,12 +205,10 @@ const Form = ({ processing, initialValues, onSubmit }: Props) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="edns_cs_use_custom"
|
name="edns_cs_use_custom"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={t('edns_use_custom_ip')}
|
title={t('edns_use_custom_ip')}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing || !edns_cs_enabled}
|
disabled={processing || !edns_cs_enabled}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -243,13 +235,11 @@ const Form = ({ processing, initialValues, onSubmit }: Props) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name={name}
|
name={name}
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={placeholder}
|
title={placeholder}
|
||||||
subtitle={subtitle}
|
subtitle={subtitle}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -273,13 +273,11 @@ const Form = ({ initialValues, onSubmit }: FormProps) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="use_private_ptr_resolvers"
|
name="use_private_ptr_resolvers"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={t('use_private_ptr_resolvers_title')}
|
title={t('use_private_ptr_resolvers_title')}
|
||||||
subtitle={t('use_private_ptr_resolvers_desc')}
|
subtitle={t('use_private_ptr_resolvers_desc')}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processingSetConfig}
|
disabled={processingSetConfig}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -295,13 +293,11 @@ const Form = ({ initialValues, onSubmit }: FormProps) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="resolve_clients"
|
name="resolve_clients"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={t('resolve_clients_title')}
|
title={t('resolve_clients_title')}
|
||||||
subtitle={t('resolve_clients_desc')}
|
subtitle={t('resolve_clients_desc')}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processingSetConfig}
|
disabled={processingSetConfig}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -60,12 +60,10 @@ export const FiltersConfig = ({ initialValues, setFiltersConfig, processing }: P
|
|||||||
<Controller
|
<Controller
|
||||||
name="enabled"
|
name="enabled"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={t('block_domain_use_filters_and_hosts')}
|
title={t('block_domain_use_filters_and_hosts')}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -91,15 +91,7 @@ export const Form = ({ initialValues, processing, processingReset, onSubmit, onR
|
|||||||
<Controller
|
<Controller
|
||||||
name="enabled"
|
name="enabled"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => <Checkbox {...field} title={t('query_log_enable')} disabled={processing} />}
|
||||||
<Checkbox
|
|
||||||
name={name}
|
|
||||||
title={t('query_log_enable')}
|
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -107,13 +99,11 @@ export const Form = ({ initialValues, processing, processingReset, onSubmit, onR
|
|||||||
<Controller
|
<Controller
|
||||||
name="anonymize_client_ip"
|
name="anonymize_client_ip"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name={name}
|
{...field}
|
||||||
title={t('anonymize_client_ip')}
|
title={t('anonymize_client_ip')}
|
||||||
subtitle={t('anonymize_client_ip_desc')}
|
subtitle={t('anonymize_client_ip_desc')}
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
disabled={processing}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -87,15 +87,7 @@ export const Form = ({ initialValues, processing, processingReset, onSubmit, onR
|
|||||||
<Controller
|
<Controller
|
||||||
name="enabled"
|
name="enabled"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { name, value, onChange } }) => (
|
render={({ field }) => <Checkbox {...field} title={t('statistics_enable')} disabled={processing} />}
|
||||||
<Checkbox
|
|
||||||
name={name}
|
|
||||||
title={t('statistics_enable')}
|
|
||||||
value={value}
|
|
||||||
onChange={(value) => onChange(value)}
|
|
||||||
disabled={processing}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user