From d5dff4681675441eda6f621347ebaaca44028cc9 Mon Sep 17 00:00:00 2001 From: Michael Schramm Date: Sat, 15 May 2021 17:30:49 +0200 Subject: [PATCH] add form layouts --- CHANGELOG.md | 2 + components/form/admin/design.tab.tsx | 16 +- components/form/layouts/card/field.tsx | 63 ++++++++ .../form/layouts/card/index.module.scss | 0 components/form/layouts/card/index.tsx | 139 ++++++++++++++++++ components/form/layouts/card/page.tsx | 65 ++++++++ components/form/layouts/layout.props.ts | 7 + components/form/layouts/page.buttons.tsx | 34 +++++ .../form/{ => layouts/slider}/field.tsx | 22 +-- components/form/layouts/slider/index.tsx | 97 ++++++++++++ .../form/layouts/slider/page.module.scss | 0 components/form/{ => layouts/slider}/page.tsx | 45 +++--- components/form/page.module.scss | 19 --- components/use.submission.ts | 8 +- graphql/fragment/form.fragment.ts | 2 + graphql/fragment/form.public.fragment.ts | 22 +-- locales/en/form.json | 10 ++ pages/form/[id]/index.tsx | 116 ++------------- schema.graphql | 3 + 19 files changed, 498 insertions(+), 172 deletions(-) create mode 100644 components/form/layouts/card/field.tsx create mode 100644 components/form/layouts/card/index.module.scss create mode 100644 components/form/layouts/card/index.tsx create mode 100644 components/form/layouts/card/page.tsx create mode 100644 components/form/layouts/layout.props.ts create mode 100644 components/form/layouts/page.buttons.tsx rename components/form/{ => layouts/slider}/field.tsx (81%) create mode 100644 components/form/layouts/slider/index.tsx create mode 100644 components/form/layouts/slider/page.module.scss rename components/form/{ => layouts/slider}/page.tsx (56%) delete mode 100644 components/form/page.module.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index d077cd8..860abb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - add environment list in [doc](doc/environment.md) - show error message on homepage in case there is a problem with api connection - new slider field type +- new card layout for forms ### Changed @@ -26,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - links at the bottom for new users - fixes for hide contrib setting - fix problem with node-prune on production build +- translation for prev / continue during form submission ### Security diff --git a/components/form/admin/design.tab.tsx b/components/form/admin/design.tab.tsx index b6263f7..0d3cc90 100644 --- a/components/form/admin/design.tab.tsx +++ b/components/form/admin/design.tab.tsx @@ -1,4 +1,4 @@ -import { Form, Input, Tabs } from 'antd' +import { Form, Input, Select, Tabs } from 'antd' import { TabPaneProps } from 'antd/lib/tabs' import React from 'react' import { useTranslation } from 'react-i18next' @@ -12,6 +12,20 @@ export const DesignTab: React.FC = (props) => { + +