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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -63,7 +63,7 @@
</header> </header>
<div class="root"> <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} {#each events as event, index}
{#if event.handlers.length > 0} {#if event.handlers.length > 0}
<div <div

View File

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

View File

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