diff --git a/packages/client/src/components/app/blocks/FormBlock.svelte b/packages/client/src/components/app/blocks/FormBlock.svelte deleted file mode 100644 index 3311ddd7bb..0000000000 --- a/packages/client/src/components/app/blocks/FormBlock.svelte +++ /dev/null @@ -1,242 +0,0 @@ - - - - {#if fields?.length} - - - - - {#if renderHeader} - - - {#if renderButtons} - - {#if renderDeleteButton} - - {/if} - {#if renderSaveButton} - - {/if} - - {/if} - - {/if} - - {#each fields as field, idx} - {#if getComponentForField(field)} - - {/if} - {/each} - - - - - - {:else} - - {/if} - diff --git a/packages/client/src/components/app/blocks/form/FormBlock.svelte b/packages/client/src/components/app/blocks/form/FormBlock.svelte new file mode 100644 index 0000000000..9ec587519f --- /dev/null +++ b/packages/client/src/components/app/blocks/form/FormBlock.svelte @@ -0,0 +1,101 @@ + + + + {#if actionType === "Create"} + + + + {:else} + + + + + + {/if} + diff --git a/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte new file mode 100644 index 0000000000..948584120b --- /dev/null +++ b/packages/client/src/components/app/blocks/form/InnerFormBlock.svelte @@ -0,0 +1,192 @@ + + +{#if fields?.length} + + + {#if renderHeader} + + + {#if renderButtons} + + {#if renderDeleteButton} + + {/if} + {#if renderSaveButton} + + {/if} + + {/if} + + {/if} + + {#each fields as field, idx} + {#if getComponentForField(field)} + + {/if} + {/each} + + + +{:else} + +{/if} diff --git a/packages/client/src/components/app/blocks/index.js b/packages/client/src/components/app/blocks/index.js index 734bff2c0f..0f05890fef 100644 --- a/packages/client/src/components/app/blocks/index.js +++ b/packages/client/src/components/app/blocks/index.js @@ -1,5 +1,5 @@ export { default as tableblock } from "./TableBlock.svelte" export { default as cardsblock } from "./CardsBlock.svelte" export { default as repeaterblock } from "./RepeaterBlock.svelte" -export { default as formblock } from "./FormBlock.svelte" +export { default as formblock } from "./form/FormBlock.svelte" export { default as chartblock } from "./ChartBlock.svelte"