update forms to not submit on button click

This commit is contained in:
kevmodrome 2020-04-13 15:46:16 +02:00
parent 67e223f777
commit d99bc6a9d4
12 changed files with 13 additions and 16 deletions

View File

@ -79,7 +79,7 @@
<ErrorsBox {errors} />
<form class="uk-form-horizontal">
<form on:submit|preventDefault class="uk-form-horizontal">
<Textbox label="Access Level Name" bind:text={clonedLevel.name} />

View File

@ -68,7 +68,7 @@
<ErrorsBox {errors} />
<form class="uk-form-horizontal">
<form on:submit|preventDefault class="uk-form-horizontal">
<Textbox label="Name" bind:text={clonedAction.name} />
<Textbox

View File

@ -22,10 +22,7 @@
let cancel = () => onFinished()
let save = () => {
const newTriggersList = [
...pipe(
allTriggers,
[filter(t => t !== trigger)]
),
...pipe(allTriggers, [filter(t => t !== trigger)]),
clonedTrigger,
]
@ -43,7 +40,7 @@
<ErrorsBox {errors} style="margin-bottom:20px" />
<form class="uk-form-horizontal">
<form on:submit|preventDefault class="uk-form-horizontal">
<Dropdown
label="Event"

View File

@ -67,7 +67,7 @@
<ErrorsBox {errors} />
<form class="uk-form-stacked">
<form on:submit|preventDefault class="uk-form-stacked">
<Textbox label="Name" bind:text={clonedField.name} />
<Dropdown
label="Type"

View File

@ -54,7 +54,7 @@
<i class="ri-eye-line button--toggled" />
<h3 class="budibase__title--3">Create / Edit View</h3>
</heading>
<form class="uk-form-stacked root">
<form on:submit|preventDefault class="uk-form-stacked root">
<h4 class="budibase__label--big">Settings</h4>
{#if $store.errors && $store.errors.length > 0}
<ErrorsBox errors={$store.errors} />

View File

@ -70,7 +70,7 @@
<div class="actions">
<h4 class="budibase__title--4">Create / Edit Record</h4>
<ErrorsBox {errors} />
<form class="uk-form-stacked">
<form on:submit|preventDefault class="uk-form-stacked">
{#if !record}
<div class="uk-margin">
<label class="uk-form-label" for="form-stacked-text">Model</label>

View File

@ -28,7 +28,7 @@
}
</script>
<form class="uk-form-stacked">
<form on:submit|preventDefault class="uk-form-stacked">
<div>
<label class="uk-form-label" for="form-stacked-text">Username</label>
<input class="uk-input" type="text" bind:value={username} />

View File

@ -117,7 +117,7 @@
<ErrorsBox errors={$store.errors} />
{/if}
<form class="uk-form-stacked">
<form on:submit|preventDefault class="uk-form-stacked">
<Textbox label="Name" bind:text={record.name} on:change={nameChanged} />
{#if isChildModel}

View File

@ -13,7 +13,7 @@
<div class="root">
<form class="uk-search uk-search-large">
<form on:submit|preventDefault class="uk-search uk-search-large">
<span uk-search-icon />
<input
class="uk-search-input"

View File

@ -63,7 +63,7 @@
</header>
<div class="root">
<form class="uk-form-stacked form-root">
<form on:submit|preventDefault class="uk-form-stacked form-root">
{#each events as event, index}
{#if event.handlers.length > 0}
<div

View File

@ -35,7 +35,7 @@
<h3>{$store.currentPageName}</h3>
<form class="uk-form-horizontal">
<form on:submit|preventDefault class="uk-form-horizontal">
<Textbox bind:text={title} label="Title" hasError={!title} />
<div class="help-text">
The title of your page, displayed in the bowser tab

View File

@ -24,7 +24,7 @@
<div class="root">
<form class="uk-form-stacked form-root">
<form on:submit|preventDefault class="uk-form-stacked form-root">
{#if componentDef}
{#each Object.entries(componentDef.props) as [prop_name, prop_def], index}
<div class="prop-container">