mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2024-12-22 04:53:17 +00:00
Rename save to onSubmit in SimpleForm
https: //marmelab.com/react-admin/Upgrade.html#the-form-components-save-prop-has-been-renamed-to-onsubmit Change-Id: Iaf2c0b665c8058336d4df6326531780a2790e71d
This commit is contained in:
parent
b8a0b4bef5
commit
6430aca02b
2 changed files with 6 additions and 10 deletions
|
@ -23,7 +23,7 @@ import {
|
|||
DialogTitle,
|
||||
} from "@mui/material";
|
||||
|
||||
const ServerNoticeDialog = ({ open, loading, onClose, onSend }) => {
|
||||
const ServerNoticeDialog = ({ open, loading, onClose, onSubmit }) => {
|
||||
const translate = useTranslate();
|
||||
|
||||
const ServerNoticeToolbar = props => (
|
||||
|
@ -50,7 +50,7 @@ const ServerNoticeDialog = ({ open, loading, onClose, onSend }) => {
|
|||
<SimpleForm
|
||||
toolbar={<ServerNoticeToolbar />}
|
||||
redirect={false}
|
||||
onSubmit={onSend}
|
||||
onSubmit={onSubmit}
|
||||
>
|
||||
<TextInput
|
||||
source="body"
|
||||
|
@ -105,7 +105,7 @@ export const ServerNoticeButton = () => {
|
|||
<ServerNoticeDialog
|
||||
open={open}
|
||||
onClose={handleDialogClose}
|
||||
onSend={handleSend}
|
||||
onSubmit={handleSend}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
@ -150,7 +150,7 @@ export const ServerNoticeBulkButton = () => {
|
|||
<ServerNoticeDialog
|
||||
open={open}
|
||||
onClose={handleDialogClose}
|
||||
onSend={handleSend}
|
||||
onSubmit={handleSend}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -29,7 +29,7 @@ import LockIcon from "@mui/icons-material/Lock";
|
|||
import LockOpenIcon from "@mui/icons-material/LockOpen";
|
||||
import { alpha, useTheme } from "@mui/material/styles";
|
||||
|
||||
const DeleteMediaDialog = ({ open, loading, onClose, onSend }) => {
|
||||
const DeleteMediaDialog = ({ open, loading, onClose, onSubmit }) => {
|
||||
const translate = useTranslate();
|
||||
|
||||
const dateParser = v => {
|
||||
|
@ -61,11 +61,7 @@ const DeleteMediaDialog = ({ open, loading, onClose, onSend }) => {
|
|||
<DialogContentText>
|
||||
{translate("resources.delete_media.helper.send")}
|
||||
</DialogContentText>
|
||||
<SimpleForm
|
||||
toolbar={<DeleteMediaToolbar />}
|
||||
redirect={false}
|
||||
save={onSend}
|
||||
>
|
||||
<SimpleForm toolbar={<DeleteMediaToolbar />} onSubmit={onSubmit}>
|
||||
<DateTimeInput
|
||||
fullWidth
|
||||
source="before_ts"
|
||||
|
|
Loading…
Reference in a new issue