mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-06 22:08:52 +00:00
Fix various validations and errors
This commit is contained in:
parent
bd2d1817f8
commit
89ec974dfc
11 changed files with 20 additions and 41 deletions
enterprise/web-frontend/modules/baserow_enterprise/components/admin
premium/web-frontend/modules/baserow_premium/components/license
web-frontend/modules
core
components
locales
pages
database/components
|
@ -3,7 +3,7 @@
|
||||||
<FormGroup
|
<FormGroup
|
||||||
small-label
|
small-label
|
||||||
required
|
required
|
||||||
:error="fieldHasErrors('domain')"
|
:error="fieldHasErrors('domain') || !!serverErrors.domain"
|
||||||
class="margin-bottom-2"
|
class="margin-bottom-2"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -21,13 +21,15 @@
|
||||||
ref="domain"
|
ref="domain"
|
||||||
v-model="v$.values.domain.$model"
|
v-model="v$.values.domain.$model"
|
||||||
size="large"
|
size="large"
|
||||||
:error="fieldHasErrors('domain') || serverErrors.domain"
|
:error="fieldHasErrors('domain') || !!serverErrors.domain"
|
||||||
:placeholder="$t('samlSettingsForm.domainPlaceholder')"
|
:placeholder="$t('samlSettingsForm.domainPlaceholder')"
|
||||||
@input="onDomainInput()"
|
@input="onDomainInput()"
|
||||||
@blur="v$.values.domain.$touch"
|
@blur="v$.values.domain.$touch"
|
||||||
></FormInput>
|
></FormInput>
|
||||||
<template #error>
|
<template #error>
|
||||||
{{ v$.values.domain.$errors[0]?.$message }}
|
{{
|
||||||
|
v$.values.domain.$errors[0]?.$message || serverErrors.domain[0].error
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
@ -42,14 +44,17 @@
|
||||||
ref="metadata"
|
ref="metadata"
|
||||||
v-model="v$.values.metadata.$model"
|
v-model="v$.values.metadata.$model"
|
||||||
:rows="12"
|
:rows="12"
|
||||||
:error="fieldHasErrors('metadata') || serverErrors.metadata"
|
:error="fieldHasErrors('metadata') || !!serverErrors.metadata"
|
||||||
:placeholder="$t('samlSettingsForm.metadataPlaceholder')"
|
:placeholder="$t('samlSettingsForm.metadataPlaceholder')"
|
||||||
@input="onMetadataInput()"
|
@input="onMetadataInput()"
|
||||||
@blur="v$.values.metadata.$touch"
|
@blur="v$.values.metadata.$touch"
|
||||||
></FormTextarea>
|
></FormTextarea>
|
||||||
|
|
||||||
<template #error>
|
<template #error>
|
||||||
{{ v$.values.metadata.$errors[0]?.$message }}
|
{{
|
||||||
|
v$.values.metadata.$errors[0]?.$message ||
|
||||||
|
serverErrors.metadata[0].error
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
<DownloadLink
|
<DownloadLink
|
||||||
:url="finishedJob.url"
|
:url="finishedJob.url"
|
||||||
:filename="getExportedFilename(finishedJob)"
|
:filename="getExportedFilename(finishedJob)"
|
||||||
|
loading-class="button-icon--loading"
|
||||||
>
|
>
|
||||||
<template #default="{ loading: downloadLoading }">
|
<template #default="{ loading: downloadLoading }">
|
||||||
<div v-if="downloadLoading" class="loading"></div>
|
<div v-if="downloadLoading" class="loading"></div>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
v-model="v$.values.license.$model"
|
v-model="v$.values.license.$model"
|
||||||
:error="fieldHasErrors('license')"
|
:error="fieldHasErrors('license')"
|
||||||
:rows="6"
|
:rows="6"
|
||||||
|
@blur="v$.values.license.$touch()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template #error>
|
<template #error>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
:label="$t('changePasswordForm.newPassword')"
|
:label="$t('changePasswordForm.newPassword')"
|
||||||
class="margin-bottom-2"
|
class="margin-bottom-2"
|
||||||
>
|
>
|
||||||
{{ v$.values }}
|
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
v-model="values.password"
|
v-model="values.password"
|
||||||
:validation-state="v$.values.password"
|
:validation-state="v$.values.password"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
v-model="v$.values.url.$model"
|
v-model="v$.values.url.$model"
|
||||||
size="large"
|
size="large"
|
||||||
:error="v$.values.url.$error"
|
:error="v$.values.url.$error"
|
||||||
|
@blur="v$.values.url.$touch()"
|
||||||
>
|
>
|
||||||
</FormInput>
|
</FormInput>
|
||||||
|
|
||||||
|
|
|
@ -477,10 +477,7 @@
|
||||||
"passwordPlaceholder": "Enter your password..",
|
"passwordPlaceholder": "Enter your password..",
|
||||||
"passwordRepeatPlaceholder": "Confirm your password..",
|
"passwordRepeatPlaceholder": "Confirm your password..",
|
||||||
"loginText": "Already have an account?",
|
"loginText": "Already have an account?",
|
||||||
"login": "Login",
|
"login": "Login"
|
||||||
"agreeTerms": "By creating an account, you agree to the {0} {1} {2}",
|
|
||||||
"terms": "Terms of Service",
|
|
||||||
"privacyPolicy": "Privacy Policy"
|
|
||||||
},
|
},
|
||||||
"forgotPassword": {
|
"forgotPassword": {
|
||||||
"title": "Forgot password",
|
"title": "Forgot password",
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
v-for="(status, checkName) in healthChecks"
|
v-for="(status, checkName) in healthChecks"
|
||||||
:key="status"
|
:key="checkName"
|
||||||
class="admin-health__check-item"
|
class="admin-health__check-item"
|
||||||
>
|
>
|
||||||
<div class="admin-health__check-item-label">
|
<div class="admin-health__check-item-label">
|
||||||
|
|
|
@ -167,7 +167,7 @@ export default {
|
||||||
const token = this.$route.params.token
|
const token = this.$route.params.token
|
||||||
await AuthService(this.$client).resetPassword(
|
await AuthService(this.$client).resetPassword(
|
||||||
token,
|
token,
|
||||||
this.state.password
|
this.account.password
|
||||||
)
|
)
|
||||||
this.success = true
|
this.success = true
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
|
@ -36,11 +36,7 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="loginButtons.length">
|
<template v-if="loginButtons.length">
|
||||||
<LoginButtons
|
<LoginButtons :invitation="invitation" :hide-if-no-buttons="true" />
|
||||||
:invitation="invitation"
|
|
||||||
:original="original"
|
|
||||||
:hide-if-no-buttons="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div class="auth__separator">
|
<div class="auth__separator">
|
||||||
{{ $t('common.or') }}
|
{{ $t('common.or') }}
|
||||||
|
@ -57,25 +53,7 @@
|
||||||
<LoginActions
|
<LoginActions
|
||||||
v-if="!shouldShowAdminSignupPage"
|
v-if="!shouldShowAdminSignupPage"
|
||||||
:invitation="invitation"
|
:invitation="invitation"
|
||||||
>
|
></LoginActions>
|
||||||
<!-- <li class="auth__action-link">
|
|
||||||
<i18n path="signup.agreeTerms" tag="span">
|
|
||||||
<a
|
|
||||||
href="https://baserow.io/terms-and-conditions"
|
|
||||||
target="_blank"
|
|
||||||
@click.stop
|
|
||||||
>{{ $t('signup.terms') }}
|
|
||||||
</a>
|
|
||||||
{{ $t('common.and') }}
|
|
||||||
<a
|
|
||||||
href="https://baserow.io/privacy-policy"
|
|
||||||
target="_blank"
|
|
||||||
@click.stop
|
|
||||||
>{{ $t('signup.privacyPolicy') }}
|
|
||||||
</a>
|
|
||||||
</i18n>
|
|
||||||
</li> -->
|
|
||||||
</LoginActions>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -135,11 +113,6 @@ export default {
|
||||||
loginButtons: 'authProvider/getAllLoginButtons',
|
loginButtons: 'authProvider/getAllLoginButtons',
|
||||||
passwordLoginEnabled: 'authProvider/getPasswordLoginEnabled',
|
passwordLoginEnabled: 'authProvider/getPasswordLoginEnabled',
|
||||||
}),
|
}),
|
||||||
termsofServiceURL() {
|
|
||||||
return this.$nuxt.$router.resolve({
|
|
||||||
name: 'terms',
|
|
||||||
}).href
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
next(params) {
|
next(params) {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
v-model="v$.values.name.$model"
|
v-model="v$.values.name.$model"
|
||||||
:error="fieldHasErrors('name')"
|
:error="fieldHasErrors('name')"
|
||||||
:placeholder="$t('fieldForm.name')"
|
:placeholder="$t('fieldForm.name')"
|
||||||
|
@blur="v$.values.name.$touch()"
|
||||||
@input="isPrefilledWithSuggestedFieldName = false"
|
@input="isPrefilledWithSuggestedFieldName = false"
|
||||||
@keydown.enter="handleKeydownEnter($event)"
|
@keydown.enter="handleKeydownEnter($event)"
|
||||||
></FormInput>
|
></FormInput>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
v-model="v$.values.name.$model"
|
v-model="v$.values.name.$model"
|
||||||
size="large"
|
size="large"
|
||||||
:error="fieldHasErrors('name')"
|
:error="fieldHasErrors('name')"
|
||||||
|
@blur="v$.values.name.$touch()"
|
||||||
>
|
>
|
||||||
</FormInput>
|
</FormInput>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue