mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix lint
This commit is contained in:
parent
a93d70b2d6
commit
d9e65597ce
@ -13,15 +13,10 @@
|
||||
<div
|
||||
v-for="(slider, index) in sliderData.sliders"
|
||||
:key="slider.name"
|
||||
:class="[
|
||||
'Sliders__slider-selection',
|
||||
index < sliderIndex && '--confirmed',
|
||||
]"
|
||||
:class="['Sliders__slider-selection', index < sliderIndex && '--confirmed']"
|
||||
>
|
||||
<base-button
|
||||
:class="[
|
||||
'selection-dot',
|
||||
]"
|
||||
:class="['selection-dot']"
|
||||
style="float: left"
|
||||
:circle="true"
|
||||
size="small"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
<ds-form class="create-user-account" v-model="formData" :schema="formSchema" @submit="submit">
|
||||
<template v-slot="{ errors }">
|
||||
<!-- <template> -->
|
||||
<!-- <template> -->
|
||||
<ds-input
|
||||
id="name"
|
||||
model="name"
|
||||
@ -108,7 +108,10 @@
|
||||
></label>
|
||||
</ds-text>
|
||||
<!-- this is neccessary to have the 'errors' status as 'formErrors' in Javascript. I didn't found another way yet -->
|
||||
<watch-scoped-slots-callback :scopedData="{ errors }" :changeCallback="watchScopedSlotsCallback"></watch-scoped-slots-callback>
|
||||
<watch-scoped-slots-callback
|
||||
:scopedData="{ errors }"
|
||||
:changeCallback="watchScopedSlotsCallback"
|
||||
></watch-scoped-slots-callback>
|
||||
<!-- <base-button
|
||||
style="float: right"
|
||||
icon="check"
|
||||
@ -150,8 +153,6 @@ export default {
|
||||
},
|
||||
props: {
|
||||
sliderData: { type: Object, required: true },
|
||||
// nonce: { type: String, required: true },
|
||||
// email: { type: String, required: true },
|
||||
},
|
||||
data() {
|
||||
const passwordForm = PasswordForm({ translate: this.$t })
|
||||
@ -161,13 +162,7 @@ export default {
|
||||
formData: {
|
||||
name: '',
|
||||
about: '',
|
||||
// name: this.sliderData.collectedInputData.name ? this.sliderData.collectedInputData.name : '',
|
||||
// about: this.sliderData.collectedInputData.about ? this.sliderData.collectedInputData.about : '',
|
||||
...passwordForm.formData,
|
||||
// ...{
|
||||
// password: this.sliderData.collectedInputData.password ? this.sliderData.collectedInputData.password : '',
|
||||
// passwordConfirmation: this.sliderData.collectedInputData.passwordConfirmation ? this.sliderData.collectedInputData.passwordConfirmation : '',
|
||||
// }
|
||||
},
|
||||
formSchema: {
|
||||
name: {
|
||||
@ -182,7 +177,6 @@ export default {
|
||||
...passwordForm.formSchema,
|
||||
},
|
||||
formErrors: null,
|
||||
// Wolle disabled: true,
|
||||
response: null,
|
||||
// TODO: Our styleguide does not support checkmarks.
|
||||
// Integrate termsAndConditionsConfirmed into `this.formData` once we
|
||||
@ -192,41 +186,51 @@ export default {
|
||||
minimumAge: false,
|
||||
noCommercial: false,
|
||||
noPolitical: false,
|
||||
// TODO: Our styleguide does not support checkmarks.
|
||||
// Integrate termsAndConditionsConfirmed into `this.formData` once we
|
||||
// have checkmarks available.
|
||||
// termsAndConditionsConfirmed: this.sliderData.collectedInputData.termsAndConditionsConfirmed ? this.sliderData.collectedInputData.termsAndConditionsConfirmed : false,
|
||||
// dataPrivacy: this.sliderData.collectedInputData.dataPrivacy ? this.sliderData.collectedInputData.dataPrivacy : false,
|
||||
// minimumAge: this.sliderData.collectedInputData.minimumAge ? this.sliderData.collectedInputData.minimumAge : false,
|
||||
// noCommercial: this.sliderData.collectedInputData.noCommercial ? this.sliderData.collectedInputData.noCommercial : false,
|
||||
// noPolitical: this.sliderData.collectedInputData.noPolitical ? this.sliderData.collectedInputData.noPolitical : false,
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.$nextTick(function () {
|
||||
// Code that will run only after the
|
||||
// entire view has been rendered
|
||||
// Code that will run only after the entire view has been rendered
|
||||
console.log('mounted !!! ')
|
||||
this.formData.name = this.sliderData.collectedInputData.name ? this.sliderData.collectedInputData.name : '',
|
||||
this.formData.about = this.sliderData.collectedInputData.about ? this.sliderData.collectedInputData.about : '',
|
||||
this.formData.password = this.sliderData.collectedInputData.password ? this.sliderData.collectedInputData.password : ''
|
||||
this.formData.passwordConfirmation = this.sliderData.collectedInputData.passwordConfirmation ? this.sliderData.collectedInputData.passwordConfirmation : ''
|
||||
this.termsAndConditionsConfirmed = this.sliderData.collectedInputData.termsAndConditionsConfirmed ? this.sliderData.collectedInputData.termsAndConditionsConfirmed : false
|
||||
this.dataPrivacy = this.sliderData.collectedInputData.dataPrivacy ? this.sliderData.collectedInputData.dataPrivacy : false
|
||||
this.minimumAge = this.sliderData.collectedInputData.minimumAge ? this.sliderData.collectedInputData.minimumAge : false
|
||||
this.noCommercial = this.sliderData.collectedInputData.noCommercial ? this.sliderData.collectedInputData.noCommercial : false
|
||||
this.noPolitical = this.sliderData.collectedInputData.noPolitical ? this.sliderData.collectedInputData.noPolitical : false
|
||||
;(this.formData.name = this.sliderData.collectedInputData.name
|
||||
? this.sliderData.collectedInputData.name
|
||||
: ''),
|
||||
(this.formData.about = this.sliderData.collectedInputData.about
|
||||
? this.sliderData.collectedInputData.about
|
||||
: ''),
|
||||
(this.formData.password = this.sliderData.collectedInputData.password
|
||||
? this.sliderData.collectedInputData.password
|
||||
: '')
|
||||
this.formData.passwordConfirmation = this.sliderData.collectedInputData.passwordConfirmation
|
||||
? this.sliderData.collectedInputData.passwordConfirmation
|
||||
: ''
|
||||
this.termsAndConditionsConfirmed = this.sliderData.collectedInputData
|
||||
.termsAndConditionsConfirmed
|
||||
? this.sliderData.collectedInputData.termsAndConditionsConfirmed
|
||||
: false
|
||||
this.dataPrivacy = this.sliderData.collectedInputData.dataPrivacy
|
||||
? this.sliderData.collectedInputData.dataPrivacy
|
||||
: false
|
||||
this.minimumAge = this.sliderData.collectedInputData.minimumAge
|
||||
? this.sliderData.collectedInputData.minimumAge
|
||||
: false
|
||||
this.noCommercial = this.sliderData.collectedInputData.noCommercial
|
||||
? this.sliderData.collectedInputData.noCommercial
|
||||
: false
|
||||
this.noPolitical = this.sliderData.collectedInputData.noPolitical
|
||||
? this.sliderData.collectedInputData.noPolitical
|
||||
: false
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
valid() {
|
||||
// console.log('valid !!! this.formData: ', this.formData, ' this.formData.password === this.formData.passwordConfirmation: ', this.formData.password === this.formData.passwordConfirmation)
|
||||
// console.log('this.formData.name.length: ', this.formData.name.length, ' this.formData.password.length: ', this.formData.password.length)
|
||||
const isValid =
|
||||
const isValid =
|
||||
// !this.formErrors &&
|
||||
(this.formData.name.length >= 3) &&
|
||||
(this.formData.password.length >= 1) &&
|
||||
(this.formData.password === this.formData.passwordConfirmation) &&
|
||||
this.formData.name.length >= 3 &&
|
||||
this.formData.password.length >= 1 &&
|
||||
this.formData.password === this.formData.passwordConfirmation &&
|
||||
this.termsAndConditionsConfirmed &&
|
||||
this.dataPrivacy &&
|
||||
this.minimumAge &&
|
||||
@ -237,14 +241,6 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// formData: {
|
||||
// handler() {
|
||||
// console.log('formData: ', this.formData)
|
||||
// this.sendValidation()
|
||||
// },
|
||||
// deep: true,
|
||||
// immediate: true,
|
||||
// },
|
||||
formData() {
|
||||
console.log('formData: ', this.formData)
|
||||
this.sendValidation()
|
||||
@ -266,7 +262,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
watchScopedSlotsCallback({errors}) {
|
||||
watchScopedSlotsCallback({ errors }) {
|
||||
this.formErrors = errors
|
||||
console.log('watchScopedSlotsCallback !!! this.formErrors: ', this.formErrors)
|
||||
},
|
||||
|
||||
@ -32,7 +32,9 @@ export default {
|
||||
return {
|
||||
formData: {
|
||||
// inviteCode: this.inviteCode ? this.inviteCode : '',
|
||||
inviteCode: this.sliderData.collectedInputData.inviteCode ? this.sliderData.collectedInputData.inviteCode : '',
|
||||
inviteCode: this.sliderData.collectedInputData.inviteCode
|
||||
? this.sliderData.collectedInputData.inviteCode
|
||||
: '',
|
||||
},
|
||||
formSchema: {
|
||||
inviteCode: {
|
||||
@ -55,7 +57,7 @@ export default {
|
||||
const { inviteCode } = this.formData
|
||||
// validate in backend
|
||||
// toaster
|
||||
this.sliderData.validateCallback(true, { /* email, */inviteCode })
|
||||
this.sliderData.validateCallback(true, { /* email, */ inviteCode })
|
||||
},
|
||||
handleSubmitVerify() {
|
||||
// Wolle const { nonce } = this.formData
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
</template>
|
||||
|
||||
<!-- <template #enter-email> -->
|
||||
<!-- Wolle !!! may create same source with 'webapp/pages/registration/signup.vue' -->
|
||||
<!-- <signup v-if="publicRegistration" :invitation="false" @submit="handleSubmitted"> -->
|
||||
<!-- <signup :invitation="false" @submit="handleSubmitted">
|
||||
<!-- Wolle !!! may create same source with 'webapp/pages/registration/signup.vue' -->
|
||||
<!-- <signup v-if="publicRegistration" :invitation="false" @submit="handleSubmitted"> -->
|
||||
<!-- <signup :invitation="false" @submit="handleSubmitted">
|
||||
<ds-space centered margin-top="large">
|
||||
<nuxt-link to="/login">{{ $t('site.back-to-login') }}</nuxt-link>
|
||||
</ds-space>
|
||||
</signup> -->
|
||||
<!-- <ds-space v-else centered>
|
||||
<!-- <ds-space v-else centered>
|
||||
<hc-empty icon="events" :message="$t('components.registration.signup.unavailable')" />
|
||||
<nuxt-link to="/login">{{ $t('site.back-to-login') }}</nuxt-link>
|
||||
</ds-space> -->
|
||||
@ -41,9 +41,9 @@
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<ds-space margin-bottom="xxx-small" margin-top="small" centered>
|
||||
<nuxt-link to="/login">{{ $t('site.back-to-login') }}</nuxt-link>
|
||||
</ds-space>
|
||||
<ds-space margin-bottom="xxx-small" margin-top="small" centered>
|
||||
<nuxt-link to="/login">{{ $t('site.back-to-login') }}</nuxt-link>
|
||||
</ds-space>
|
||||
</template>
|
||||
</component-slider>
|
||||
|
||||
@ -109,13 +109,13 @@ export default {
|
||||
},
|
||||
// {
|
||||
// name: 'enter-email',
|
||||
// validated: false,
|
||||
// title: 'E-Mail', // Wolle
|
||||
// button: {
|
||||
// title: 'Next', // Wolle
|
||||
// icon: :icon="(sliderIndex < sliderData.sliders.length - 1 && 'arrow-right') || (sliderIndex === sliderData.sliders.length - 1 && 'check')"
|
||||
// callback: this.buttonCallback,
|
||||
// },
|
||||
// validated: false,
|
||||
// title: 'E-Mail', // Wolle
|
||||
// button: {
|
||||
// title: 'Next', // Wolle
|
||||
// icon: :icon="(sliderIndex < sliderData.sliders.length - 1 && 'arrow-right') || (sliderIndex === sliderData.sliders.length - 1 && 'check')"
|
||||
// callback: this.buttonCallback,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
name: 'create-user-account',
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<template>
|
||||
</template>
|
||||
<template></template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
@ -22,7 +21,7 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// Wolle
|
||||
@ -30,5 +29,4 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
<style lang="scss"></style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user