- {children}
+ {
+ id: 'main.color',
+ component: AutoFormColorPicker,
+ label: t('create_edit.color'),
+ },
+ {
+ id: 'content.files_allow_upload',
+ component: AutoFormSwitch,
+ label: t('create_edit.files.allow_upload'),
+ },
+ {
+ id: 'content.files_total_max_storage',
+ component: AutoFormInput,
+ componentProps: {
+ type: 'number',
+ className: 'max-w-32',
+ min: 0,
+ disabled: values.content?.files_total_max_storage === -1,
+ } as AutoFormInputProps,
+ label: t('create_edit.files.total_max_storage'),
+ className: 'flex flex-wrap items-center gap-2',
+ childComponent: ({ field }) => {
+ return (
+ <>
{t('create_edit.in_kb')}
{tCore('or')}
@@ -130,7 +125,7 @@ export const CreateEditFormGroupsMembersAdmin = ({
id="content.files_total_max_storage.unlimited"
onClick={() => {
if (field.value === -1) {
- field.onChange(10000);
+ field.onChange(0);
return;
}
@@ -142,14 +137,24 @@ export const CreateEditFormGroupsMembersAdmin = ({
{tCore('unlimited')}
-
- ),
+ >
+ );
},
- files_max_storage_for_submit: {
- label: t('create_edit.files.max_storage_for_submit.label'),
- renderParent: ({ children, field }: FieldRenderParentProps) => (
-
- {children}
+ },
+ {
+ id: 'content.files_max_storage_for_submit',
+ component: AutoFormInput,
+ componentProps: {
+ type: 'number',
+ className: 'max-w-32',
+ min: 0,
+ disabled: values.content?.files_max_storage_for_submit === -1,
+ } as AutoFormInputProps,
+ label: t('create_edit.files.max_storage_for_submit.label'),
+ className: 'flex flex-wrap items-center gap-2',
+ childComponent: ({ field }) => {
+ return (
+ <>
{t('create_edit.in_kb')}
{tCore('or')}
@@ -158,7 +163,7 @@ export const CreateEditFormGroupsMembersAdmin = ({
id="content.files_max_storage_for_submit.unlimited"
onClick={() => {
if (field.value === -1) {
- field.onChange(10000);
+ field.onChange(0);
return;
}
@@ -170,26 +175,14 @@ export const CreateEditFormGroupsMembersAdmin = ({
{tCore('unlimited')}
-
- ),
- fieldType: (props: AutoFormInputComponentProps) => {
- const value = props.autoFormProps.field.value;
-
- return (
-