fix page reload on submit

This commit is contained in:
hay-kot 2021-03-28 09:48:52 -08:00
commit b21a6f54d5
7 changed files with 13 additions and 21 deletions

View file

@ -39,7 +39,7 @@
<v-spacer></v-spacer>
</v-app-bar>
<v-form ref="newGroup" @submit="createGroup">
<v-form ref="newGroup" @submit.prevent="createGroup">
<v-card-text>
<v-text-field
v-model="newGroupName"
@ -53,7 +53,7 @@
<v-btn color="grey" text @click="groupDialog = false">
{{ $t("general.cancel") }}
</v-btn>
<v-btn color="primary" type="submit" @click.prevent="createGroup">
<v-btn color="primary" type="submit">
{{ $t("general.create") }}
</v-btn>
</v-card-actions>

View file

@ -40,7 +40,7 @@
<v-spacer></v-spacer>
</v-app-bar>
<v-form ref="newUser" @submit="save">
<v-form ref="newUser" @submit.prevent="save">
<v-card-text>
<v-row class="justify-center mt-3">
<v-text-field
@ -62,7 +62,7 @@
<v-btn color="grey" text @click="close">
{{ $t("general.cancel") }}
</v-btn>
<v-btn color="primary" type="submit" @click.prevent="save">
<v-btn color="primary" type="submit">
{{ $t("general.save") }}
</v-btn>
</v-card-actions>

View file

@ -48,7 +48,7 @@
{{ $t("user.user-id-with-value", { id: editedItem.id }) }}
</v-toolbar-title>
</v-app-bar>
<v-form ref="newUser" @submit="save">
<v-form ref="newUser" @submit.prevent="save">
<v-card-text>
<v-row>
<v-col cols="12" sm="12" md="6">
@ -97,7 +97,7 @@
<v-btn color="grey" text @click="close">
{{ $t("general.cancel") }}
</v-btn>
<v-btn color="primary" type="submit" @click.prevent="save">
<v-btn color="primary" type="submit">
{{ $t("general.save") }}
</v-btn>
</v-card-actions>

View file

@ -17,7 +17,7 @@
<v-spacer></v-spacer>
</v-app-bar>
<v-card-title> </v-card-title>
<v-form @submit="select">
<v-form @submit.prevent="select">
<v-card-text>
<v-text-field
:label="$t('settings.theme.theme-name')"
@ -30,7 +30,7 @@
<v-btn color="grey" text @click="dialog = false">
{{ $t("general.cancel") }}
</v-btn>
<v-btn color="success" text type="submit" @click.prevent="select" :disabled="!themeName">
<v-btn color="success" text type="submit" :disabled="!themeName">
{{ $t("general.create") }}
</v-btn>
</v-card-actions>

View file

@ -17,7 +17,7 @@
<v-spacer></v-spacer>
</v-app-bar>
<v-form @submit="login">
<v-form @submit.prevent="login">
<v-card-text>
<v-text-field
v-if="!options.isLoggingIn"
@ -47,14 +47,12 @@
<v-card-actions>
<v-btn
v-if="options.isLoggingIn"
@click.prevent="login"
dark
color="primary"
block="block"
type="submit"
>{{ $t("user.sign-in") }}
</v-btn
>
</v-btn>
</v-card-actions>
<v-alert v-if="error" outlined class="mt-3 mb-0" type="error">

View file

@ -21,7 +21,7 @@
have a valid invitation link. If you haven't recieved an invitation you
are unable to sign-up. To recieve a link, contact the sites administrator.
<v-divider class="mt-3"></v-divider>
<v-form ref="signUpForm" @submit="signUp">
<v-form ref="signUpForm" @submit.prevent="signUp">
<v-text-field
v-model="user.name"
light="light"
@ -66,7 +66,6 @@
<v-card-actions>
<v-btn
v-if="options.isLoggingIn"
@click.prevent="signUp"
dark
color="primary"
block="block"

View file

@ -21,7 +21,7 @@
<v-spacer></v-spacer>
</v-app-bar>
<v-form ref="urlForm" @submit="createRecipe">
<v-form ref="urlForm" @submit.prevent="createRecipe">
<v-card-text>
<v-text-field
v-model="recipeURL"
@ -47,12 +47,7 @@
<v-btn color="grey" text @click="reset">
{{ $t("general.close") }}
</v-btn>
<v-btn
color="success"
text
@click.prevent="createRecipe"
:loading="processing"
>
<v-btn color="success" text type="submit" :loading="processing">
{{ $t("general.submit") }}
</v-btn>
</v-card-actions>