Skip to content

Commit

Permalink
remove sites from flatpage in RA
Browse files Browse the repository at this point in the history
  • Loading branch information
viktoria.brezinova committed Dec 13, 2024
1 parent 9a41294 commit bf26907
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {FormTab, NumberInput, required, TabbedForm, TextInput} from 'react-admin

import {FlatpagePreview} from '@/components/Admin/custom/FlatpagePreview'
import {MyCreate} from '@/components/Admin/custom/MyCreate'
import {SitesCheckboxInput} from '@/components/Admin/custom/SitesCheckboxInput'

export const FlatpageCreate: FC = () => (
<MyCreate>
Expand All @@ -13,7 +12,6 @@ export const FlatpageCreate: FC = () => (
<TextInput source="url" fullWidth validate={required()} />
<TextInput source="title" fullWidth validate={required()} />
<TextInput source="content" multiline fullWidth validate={required()} />
<SitesCheckboxInput source="sites" validate={required()} />
</FormTab>
<FormTab label="preview">
<FlatpagePreview />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {FormTab, NumberInput, required, TabbedForm, TextInput} from 'react-admin

import {FlatpagePreview} from '@/components/Admin/custom/FlatpagePreview'
import {MyEdit} from '@/components/Admin/custom/MyEdit'
import {SitesCheckboxInput} from '@/components/Admin/custom/SitesCheckboxInput'

export const FlatpageEdit: FC = () => (
<MyEdit>
Expand All @@ -13,7 +12,6 @@ export const FlatpageEdit: FC = () => (
<TextInput source="url" fullWidth validate={required()} />
<TextInput source="title" fullWidth validate={required()} />
<TextInput source="content" multiline fullWidth validate={required()} />
<SitesCheckboxInput source="sites" validate={required()} />
</FormTab>
<FormTab label="preview">
<FlatpagePreview />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {FC} from 'react'
import {Datagrid, List, NumberField, TextField} from 'react-admin'

import {SitesArrayField} from '@/components/Admin/custom/SitesArrayField'
import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField'

export const FlatpageList: FC = () => (
Expand All @@ -11,7 +10,6 @@ export const FlatpageList: FC = () => (
<TextField source="url" />
<TextField source="title" />
<TruncatedTextField source="content" maxTextWidth={30} />
<SitesArrayField source="sites" />
</Datagrid>
</List>
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {FC} from 'react'
import {NumberField, Show, SimpleShowLayout, TextField} from 'react-admin'

import {MyShowActions} from '@/components/Admin/custom/MyShowActions'
import {SitesArrayField} from '@/components/Admin/custom/SitesArrayField'
import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField'

export const FlatpageShow: FC = () => (
Expand All @@ -12,7 +11,6 @@ export const FlatpageShow: FC = () => (
<TextField source="url" />
<TextField source="title" />
<TruncatedTextField source="content" maxTextWidth={200} expandable />
<SitesArrayField source="sites" />
</SimpleShowLayout>
</Show>
)

0 comments on commit bf26907

Please sign in to comment.