Skip to content

Commit

Permalink
fix: submit
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Aug 23, 2023
1 parent 48c0a30 commit 44e109d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion targets/frontend/src/components/glossary/TermForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ export const TermForm = ({ term = {} }) => {
<Box
sx={{ alignItems: "center", mt: theme.space.medium, display: "flex" }}
>
<Button disabled={hasError || loading}>{buttonLabel}</Button>
<Button disabled={hasError || loading} type="submit">
{buttonLabel}
</Button>
<Link href="/glossary" style={{ marginLeft: theme.space.small }}>
Annuler
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ValidationBar = ({
}}
>
{/* @ts-ignore */}
<Button variant="secondary" disabled={loading || !isDirty}>
<Button variant="secondary" disabled={loading || !isDirty} type="submit">
{isDirty && (
<IoMdCheckmark
style={{
Expand Down
4 changes: 3 additions & 1 deletion targets/frontend/src/components/themes/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ const ThemeForm = ({ parentId, onSubmit, loading = false, theme = {} }) => {
<Box
sx={{ alignItems: "center", mt: th.space.medium, display: "flex" }}
>
<Button disabled={hasError || loading}>{buttonLabel}</Button>
<Button type="submit" disabled={hasError || loading}>
{buttonLabel}
</Button>
<Link
href={backLink}
passHref
Expand Down
4 changes: 3 additions & 1 deletion targets/frontend/src/pages/contenus/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export function DocumentPage() {
<Inline>
{/*
// @ts-ignore */}
<Button disabled={!hasChanged}>Enregistrer</Button>
<Button type="submit" disabled={!hasChanged}>
Enregistrer
</Button>
<Link
href="/contenus"
passHref
Expand Down
1 change: 1 addition & 0 deletions targets/frontend/src/pages/kali/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function CcnBlocks({ id, blocks, onChange }) {
disabled={!dirty}
onClick={onSaveClick}
style={{ margin: "20px" }}
type="submit"
>
<>
<IoMdSave
Expand Down

0 comments on commit 44e109d

Please sign in to comment.