Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove sites from flat pages in RA #516

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
)
Loading