Fix eslint issues

This commit is contained in:
Ramon Wenger 2020-05-27 16:24:37 +02:00
parent 93d7a3f959
commit 7f118a9161
10 changed files with 288 additions and 186 deletions

View File

@ -25,11 +25,26 @@
</div> </div>
<div class="default-footer__section"> <div class="default-footer__section">
<div class="default-footer__links"> <div class="default-footer__links">
<a href="https://www.myskillbox.ch/datenschutz" target="_blank" class="default-footer__link">Datenschutz</a> <a
<a href="https://www.myskillbox.ch/impressum" target="_blank" class="default-footer__link">Impressum</a> href="https://www.myskillbox.ch/datenschutz"
<a href="https://www.hep-verlag.ch/agb" target="_blank" class="default-footer__link">AGB</a> target="_blank"
<a href="https://www.hep-verlag.ch/kontakt-verlag" target="_blank" class="default-footer__link">Kontakt</a> class="default-footer__link">Datenschutz</a>
<a href="https://www.hep-verlag.ch/kundenservice" target="_blank" class="default-footer__link">Hilfe</a> <a
href="https://www.myskillbox.ch/impressum"
target="_blank"
class="default-footer__link">Impressum</a>
<a
href="https://www.hep-verlag.ch/agb"
target="_blank"
class="default-footer__link">AGB</a>
<a
href="https://www.hep-verlag.ch/kontakt-verlag"
target="_blank"
class="default-footer__link">Kontakt</a>
<a
href="https://www.hep-verlag.ch/kundenservice"
target="_blank"
class="default-footer__link">Hilfe</a>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="layout layout--public public"> <div class="layout layout--public public">
<div class="public__logo"> <div class="public__logo">
<logo></logo> <logo/>
</div> </div>
<router-view class="public__content layout__content"></router-view> <router-view class="public__content layout__content"/>
<default-footer class="skillbox__footer public__footer footer"></default-footer> <default-footer class="skillbox__footer public__footer footer"/>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,69 +1,85 @@
<template> <template>
<div class="login public-page"> <div class="login public-page">
<h1 class="login__title public-page__title">Melden Sie sich jetzt an</h1> <h1 class="login__title public-page__title">Melden Sie sich jetzt an</h1>
<form class="login__form login-form" novalidate @submit.prevent="validateBeforeSubmit"> <form
class="login__form login-form"
novalidate
@submit.prevent="validateBeforeSubmit">
<div class="login-form__field skillboxform-input"> <div class="login-form__field skillboxform-input">
<label for="email" class="skillboxform-input__label">E-Mail</label> <label
for="email"
class="skillboxform-input__label">E-Mail</label>
<input <input
id="email"
name="email"
type="text"
v-model="email" v-model="email"
v-validate="'required'" v-validate="'required'"
data-vv-as="E-Mail"
:class="{ 'skillboxform-input__input--error': errors.has('email') }" :class="{ 'skillboxform-input__input--error': errors.has('email') }"
name="email"
type="text"
data-vv-as="E-Mail"
class="change-form__email skillbox-input skillboxform-input__input" class="change-form__email skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="email-input" data-cy="email-input"
/> id="email"
>
<small <small
v-if="errors.has('email') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="email-local-errors" data-cy="email-local-errors"
v-if="errors.has('email') && submitted"
>{{ errors.first('email') }}</small> >{{ errors.first('email') }}</small>
<small <small
v-for="error in emailErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="email-remote-errors" data-cy="email-remote-errors"
v-for="error in emailErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="pw" class="skillboxform-input__label">Passwort</label> <label
for="pw"
class="skillboxform-input__label">Passwort</label>
<input <input
id="pw"
name="password"
type="password"
data-vv-as="Passwort"
v-model="password" v-model="password"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('password') }" :class="{ 'skillboxform-input__input--error': errors.has('password') }"
name="password"
type="password"
data-vv-as="Passwort"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="password-input" data-cy="password-input"
/> id="pw"
>
<small <small
v-if="errors.has('password') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="password-local-errors" data-cy="password-local-errors"
v-if="errors.has('password') && submitted"
>{{ errors.first('password') }}</small> >{{ errors.first('password') }}</small>
<small <small
v-for="error in passwordErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="password-remote-errors" data-cy="password-remote-errors"
v-for="error in passwordErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="skillboxform-input"> <div class="skillboxform-input">
<small class="skillboxform-input__error" data-cy="login-error" v-if="loginError">{{loginError}}</small> <small
class="skillboxform-input__error"
data-cy="login-error"
v-if="loginError">{{ loginError }}</small>
</div> </div>
<div class="actions"> <div class="actions">
<button class="button button--primary button--big actions__submit" data-cy="login-button">Anmelden</button> <button
<a class="actions__reset text-link" href="/accounts/password_reset/">Passwort vergessen?</a> class="button button--primary button--big actions__submit"
data-cy="login-button">Anmelden</button>
<a
class="actions__reset text-link"
href="/accounts/password_reset/">Passwort vergessen?</a>
</div> </div>
<div class="account-link"> <div class="account-link">
<p class="account-link__text">Haben Sie noch kein Konto?</p> <p class="account-link__text">Haben Sie noch kein Konto?</p>
<router-link class="account-link__link text-link" :to="{name: 'registration'}">Jetzt registrieren <router-link
:to="{name: 'registration'}"
class="account-link__link text-link">Jetzt registrieren
</router-link> </router-link>
</div> </div>
</form> </form>
@ -76,6 +92,17 @@ import BETA_LOGIN_MUTATION from '@/graphql/gql/mutations/betaLogin.gql';
export default { export default {
components: {}, components: {},
data() {
return {
email: '',
password: '',
emailErrors: [],
passwordErrors: [],
loginError: '',
submitted: false
};
},
methods: { methods: {
validateBeforeSubmit() { validateBeforeSubmit() {
this.$validator.validate().then(result => { this.$validator.validate().then(result => {
@ -130,17 +157,6 @@ export default {
this.$validator.reset(); this.$validator.reset();
} }
}, },
data() {
return {
email: '',
password: '',
emailErrors: [],
passwordErrors: [],
loginError: '',
submitted: false
};
}
}; };
</script> </script>

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="check-email"> <div class="check-email">
<main class="check-email__content content" data-cy="email-check"> <main
class="check-email__content content"
data-cy="email-check">
<p class="content__instructions">Eine Email ist auf dem Weg, bitte überprüfen sie ihre E-mail Konto.</p> <p class="content__instructions">Eine Email ist auf dem Weg, bitte überprüfen sie ihre E-mail Konto.</p>
</main> </main>

View File

@ -2,8 +2,12 @@
<div class="emailconfirmation public-page"> <div class="emailconfirmation public-page">
<h1 class="emailconfirmation__title public-page__title">Überprüfung der E-Mail Adresse</h1> <h1 class="emailconfirmation__title public-page__title">Überprüfung der E-Mail Adresse</h1>
<p v-if="loading">Der Verifikationscode wird überprüft.</p> <p v-if="loading">Der Verifikationscode wird überprüft.</p>
<p v-if="showOkMessage" data-cy="code-ok-msg">Der Verifikationscode ist gültig. Sie werden weitergeleitet.</p> <p
<p v-if="showErrorMessage" data-cy="code-nok-msg">{{errorMessage}}</p> data-cy="code-ok-msg"
v-if="showOkMessage">Der Verifikationscode ist gültig. Sie werden weitergeleitet.</p>
<p
data-cy="code-nok-msg"
v-if="showErrorMessage">{{ errorMessage }}</p>
</div> </div>
</template> </template>

View File

@ -1,15 +1,21 @@
<template> <template>
<div class="forgot-password public-page"> <div class="forgot-password public-page">
<header class="info-header"> <header class="info-header">
<h1 class="forgot-password__title public-page__title" data-cy="forgot-password">Passwort vergessen?</h1> <h1
class="forgot-password__title public-page__title"
data-cy="forgot-password">Passwort vergessen?</h1>
</header> </header>
<section class="forgot-password__section forgot-password__text"> <section class="forgot-password__section forgot-password__text">
<p class="forgot-info">Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslicht auf <p class="forgot-info">Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslicht auf
<a class="hep-link" href="https://www.hep-verlag.ch">www.hep-verlag.ch</a> verwaltet werden.</p> <a
class="hep-link"
href="https://www.hep-verlag.ch">www.hep-verlag.ch</a> verwaltet werden.</p>
<p class="forgot-info">Melden Sie sich mit der gleichen E-Mail-Adresse und dem gleichen </p> <p class="forgot-info">Melden Sie sich mit der gleichen E-Mail-Adresse und dem gleichen </p>
</section> </section>
<section class="forgot-password__section forgot-password__link"> <section class="forgot-password__section forgot-password__link">
<a class="button button--primary button--big actions__submit" href="https://www.hep-verlag.ch">Hep Verlag Webseite besuchen</a> <a
class="button button--primary button--big actions__submit"
href="https://www.hep-verlag.ch">Hep Verlag Webseite besuchen</a>
</section> </section>
</div> </div>
</template> </template>

View File

@ -1,31 +1,40 @@
<template> <template>
<div class="hello public-page"> <div class="hello public-page">
<h1 class="hello__title public-page__title" data-cy="hello-title">Wollen sie mySkillbox jetzt im Unterricht verwenden?</h1> <h1
<form class="hello__form hello-form" novalidate @submit.prevent="validateBeforeSubmit"> class="hello__title public-page__title"
data-cy="hello-title">Wollen sie mySkillbox jetzt im Unterricht verwenden?</h1>
<form
class="hello__form hello-form"
novalidate
@submit.prevent="validateBeforeSubmit">
<div class="hello-form__field skillboxform-input"> <div class="hello-form__field skillboxform-input">
<label for="email" class="skillboxform-input__label">E-Mail</label> <label
for="email"
class="skillboxform-input__label">E-Mail</label>
<input <input
id="email"
name="email"
type="email"
v-model="email" v-model="email"
v-validate="'required'" v-validate="'required'"
data-vv-as="E-Mail"
:class="{ 'skillboxform-input__input--error': errors.has('email') }" :class="{ 'skillboxform-input__input--error': errors.has('email') }"
name="email"
type="email"
data-vv-as="E-Mail"
class="change-form__email skillbox-input skillboxform-input__input" class="change-form__email skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="email-input" data-cy="email-input"
placeholder="E-Mail eingeben" placeholder="E-Mail eingeben"
tabindex="0" tabindex="0"
/> id="email"
>
<small <small
v-if="errors.has('email') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="email-local-errors" data-cy="email-local-errors"
v-if="errors.has('email') && submitted"
>{{ errors.first('email') }}</small> >{{ errors.first('email') }}</small>
</div> </div>
<div class="actions"> <div class="actions">
<button class="button button--primary button--big actions__submit" data-cy="hello-button">Los geht's</button> <button
class="button button--primary button--big actions__submit"
data-cy="hello-button">Los geht's</button>
</div> </div>
</form> </form>
</div> </div>
@ -39,6 +48,13 @@ import HELLO_EMAIL_MUTATION from '@/graphql/gql/local/mutations/helloEmail.gql';
export default { export default {
components: {}, components: {},
data() {
return {
email: '',
submitted: false
};
},
methods: { methods: {
validateBeforeSubmit() { validateBeforeSubmit() {
this.$validator.validate().then(result => { this.$validator.validate().then(result => {
@ -69,13 +85,6 @@ export default {
this.$validator.reset(); this.$validator.reset();
} }
}, },
data() {
return {
email: '',
submitted: false
};
},
}; };
</script> </script>

View File

@ -1,49 +1,60 @@
<template> <template>
<div class="license-activation public-page"> <div class="license-activation public-page">
<header class="info-header"> <header class="info-header">
<p class="info-header__text small-emph">Für <span class="info-header__emph">{{me.email}}</span> haben wir keine gültige Lizenz gefunden</p> <p class="info-header__text small-emph">Für <span class="info-header__emph">{{ me.email }}</span> haben wir keine gültige Lizenz gefunden</p>
</header> </header>
<section class="coupon"> <section class="coupon">
<form class="license-activation__form license-activation-form" novalidate @submit.prevent="validateBeforeSubmit"> <form
class="license-activation__form license-activation-form"
novalidate
@submit.prevent="validateBeforeSubmit">
<h2>Geben Sie einen Coupon-Code ein</h2> <h2>Geben Sie einen Coupon-Code ein</h2>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="coupon" class="skillboxform-input__label">Coupon-Code</label> <label
for="coupon"
class="skillboxform-input__label">Coupon-Code</label>
<input <input
id="coupon"
name="coupon"
type="coupon"
data-vv-as="Coupon"
v-model="coupon" v-model="coupon"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('coupon') }" :class="{ 'skillboxform-input__input--error': errors.has('coupon') }"
name="coupon"
type="coupon"
data-vv-as="Coupon"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="coupon-input" data-cy="coupon-input"
tabindex="0" tabindex="0"
/> id="coupon"
>
<small <small
v-if="errors.has('coupon') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="coupon-local-errors" data-cy="coupon-local-errors"
v-if="errors.has('coupon') && submitted"
>{{ errors.first('coupon') }}</small> >{{ errors.first('coupon') }}</small>
<small <small
v-for="error in couponErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="coupon-remote-errors" data-cy="coupon-remote-errors"
v-for="error in couponErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="actions"> <div class="actions">
<button class="button button--primary button--big actions__submit" data-cy="coupon-button">Coupon abschicken</button> <button
class="button button--primary button--big actions__submit"
data-cy="coupon-button">Coupon abschicken</button>
</div> </div>
</form> </form>
</section> </section>
<section class="get-license"> <section class="get-license">
<h2>Oder, kaufen Sie eine Lizenz</h2> <h2>Oder, kaufen Sie eine Lizenz</h2>
<ul class="license-links"> <ul class="license-links">
<li class="license-links__item"><a :href="teacherEditionUrl" class="hep-link">mySkillobx für Lehrpersonen</a></li> <li class="license-links__item"><a
<li class="license-links__item"><a :href="studentEditionUrl" class="hep-link">mySkillobx für Lernende</a></li> :href="teacherEditionUrl"
</ul> class="hep-link">mySkillobx für Lehrpersonen</a></li>
<li class="license-links__item"><a
:href="studentEditionUrl"
class="hep-link">mySkillobx für Lernende</a></li>
</ul>
</section> </section>
</div> </div>
</template> </template>
@ -56,6 +67,20 @@ import ME_QUERY from '@/graphql/gql/meQuery.gql';
export default { export default {
mixins: [me], mixins: [me],
data() {
return {
coupon: '',
couponErrors: [],
loginError: '',
submitted: false,
me: {
email: ''
},
teacherEditionUrl: `${process.env.HEP_URL}/myskillbox-lehrpersonen`,
studentEditionUrl: `${process.env.HEP_URL}/myskillbox-fur-lernende`
};
},
methods: { methods: {
validateBeforeSubmit() { validateBeforeSubmit() {
this.$validator.validate().then(result => { this.$validator.validate().then(result => {
@ -99,20 +124,6 @@ export default {
this.$validator.reset(); this.$validator.reset();
} }
}, },
data() {
return {
coupon: '',
couponErrors: [],
loginError: '',
submitted: false,
me: {
email: ''
},
teacherEditionUrl: `${process.env.HEP_URL}/myskillbox-lehrpersonen`,
studentEditionUrl: `${process.env.HEP_URL}/myskillbox-fur-lernende`
};
},
}; };
</script> </script>

View File

@ -2,10 +2,15 @@
<div class="login public-page"> <div class="login public-page">
<header class="info-header"> <header class="info-header">
<p class="info-header__text small-emph">Super wir haben für <span <p class="info-header__text small-emph">Super wir haben für <span
class="info-header__emph">{{helloEmail.email}}</span> ein Hep Konto gefunden</p> class="info-header__emph">{{ helloEmail.email }}</span> ein Hep Konto gefunden</p>
<h1 class="login__title public-page__title" data-cy="login-title">Bitte geben Sie das passende Passwort ein</h1> <h1
class="login__title public-page__title"
data-cy="login-title">Bitte geben Sie das passende Passwort ein</h1>
</header> </header>
<form class="login__form login-form" novalidate @submit.prevent="validateBeforeSubmit"> <form
class="login__form login-form"
novalidate
@submit.prevent="validateBeforeSubmit">
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label <label
for="password" for="password"
@ -14,7 +19,6 @@
v-model="password" v-model="password"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('password') }" :class="{ 'skillboxform-input__input--error': errors.has('password') }"
id="password"
name="password" name="password"
type="password" type="password"
data-vv-as="Passwort" data-vv-as="Passwort"
@ -22,19 +26,26 @@
autocomplete="off" autocomplete="off"
data-cy="password-input" data-cy="password-input"
tabindex="0" tabindex="0"
/> id="password"
>
<small <small
v-for="error in passwordErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="password-errors" data-cy="password-errors"
v-for="error in passwordErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="actions"> <div class="actions">
<button class="button button--primary button--big actions__submit" data-cy="login-button">Anmelden</button> <button
<router-link class="button button--big actions__submit back-button" :to="{name: 'hello'}">Abbrechen class="button button--primary button--big actions__submit"
data-cy="login-button">Anmelden</button>
<router-link
:to="{name: 'hello'}"
class="button button--big actions__submit back-button">Abbrechen
</router-link> </router-link>
<router-link class="actions__reset text-link" :to="{name: 'forgotPassword'}">Passwort vergessen?</router-link> <router-link
:to="{name: 'forgotPassword'}"
class="actions__reset text-link">Passwort vergessen?</router-link>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,203 +1,231 @@
<template> <template>
<div class="registration public-page"> <div class="registration public-page">
<header class="info-header"> <header class="info-header">
<p class="info-header__text small-emph">Für <span class="info-header__emph">{{helloEmail}}</span> haben wir kein Hep Konto gefunden.</p> <p class="info-header__text small-emph">Für <span class="info-header__emph">{{ helloEmail }}</span> haben wir kein Hep Konto gefunden.</p>
<h1 class="registration__title public-page__title" data-cy="registration-title">Damit Sie mySkillbox verwenden können, müssen Sie ein Konto erstellen.</h1> <h1
class="registration__title public-page__title"
data-cy="registration-title">Damit Sie mySkillbox verwenden können, müssen Sie ein Konto erstellen.</h1>
</header> </header>
<form class="registration__form registration-form" novalidate @submit.prevent="validateBeforeSubmit"> <form
class="registration__form registration-form"
novalidate
@submit.prevent="validateBeforeSubmit">
<div class="registration-form__field skillboxform-input"> <div class="registration-form__field skillboxform-input">
<div class="registration-form__field skillboxform-input"> <div class="registration-form__field skillboxform-input">
<label for="prefix" class="skillboxform-input__label">Anrede</label> <label
<select for="prefix"
id="prefix" class="skillboxform-input__label">Anrede</label>
name="prefix" <select
v-model="prefix" v-model="prefix"
data-vv-as="Prefix" v-validate="'required'"
v-validate="'required'" :class="{ 'skillboxform-input__input--error': errors.has('prefix') }"
:class="{ 'skillboxform-input__input--error': errors.has('prefix') }" name="prefix"
class="change-form__prefix skillbox-input skillboxform-input__input skillbox-dropdown" data-vv-as="Prefix"
autocomplete="off" class="change-form__prefix skillbox-input skillboxform-input__input skillbox-dropdown"
data-cy="prefix-selection" autocomplete="off"
> data-cy="prefix-selection"
<option value="Herr" selected>Herr</option> id="prefix"
<option value="Frau">Frau</option> >
</select> <option
</div> value="Herr"
<label for="firstname" class="skillboxform-input__label">Vorname</label> selected>Herr</option>
<option value="Frau">Frau</option>
</select>
</div>
<label
for="firstname"
class="skillboxform-input__label">Vorname</label>
<input <input
id="firstname"
name="firstname"
type="text"
v-model="firstname" v-model="firstname"
data-vv-as="Vorname"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('firstname') }" :class="{ 'skillboxform-input__input--error': errors.has('firstname') }"
name="firstname"
type="text"
data-vv-as="Vorname"
class="change-form__firstname skillbox-input skillboxform-input__input" class="change-form__firstname skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="firstname-input" data-cy="firstname-input"
/> id="firstname"
>
<small <small
v-if="errors.has('firstname') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="firstname-local-errors" data-cy="firstname-local-errors"
v-if="errors.has('firstname') && submitted"
>{{ errors.first('firstname') }}</small> >{{ errors.first('firstname') }}</small>
<small <small
v-for="error in firstnameErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="firstname-remote-errors" data-cy="firstname-remote-errors"
v-for="error in firstnameErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="lastname" class="skillboxform-input__label">Nachname</label> <label
for="lastname"
class="skillboxform-input__label">Nachname</label>
<input <input
id="lastname"
name="lastname"
type="text"
v-model="lastname" v-model="lastname"
data-vv-as="Nachname"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('lastname') }" :class="{ 'skillboxform-input__input--error': errors.has('lastname') }"
name="lastname"
type="text"
data-vv-as="Nachname"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="lastname-input" data-cy="lastname-input"
/> id="lastname"
>
<small <small
v-if="errors.has('lastname') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="lastname-local-errors" data-cy="lastname-local-errors"
v-if="errors.has('lastname') && submitted"
>{{ errors.first('lastname') }}</small> >{{ errors.first('lastname') }}</small>
<small <small
v-for="error in lastnameErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="lastname-remote-errors" data-cy="lastname-remote-errors"
v-for="error in lastnameErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="street" class="skillboxform-input__label">Strasse</label> <label
for="street"
class="skillboxform-input__label">Strasse</label>
<input <input
id="street"
name="street"
type="text"
v-model="street" v-model="street"
data-vv-as="Strasse"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('street') }" :class="{ 'skillboxform-input__input--error': errors.has('street') }"
name="street"
type="text"
data-vv-as="Strasse"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="street-input" data-cy="street-input"
/> id="street"
>
<small <small
v-if="errors.has('street') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="street-local-errors" data-cy="street-local-errors"
v-if="errors.has('street') && submitted"
>{{ errors.first('street') }}</small> >{{ errors.first('street') }}</small>
<small <small
v-for="error in streetErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="street-remote-errors" data-cy="street-remote-errors"
v-for="error in streetErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="city" class="skillboxform-input__label">Ort</label> <label
for="city"
class="skillboxform-input__label">Ort</label>
<input <input
id="city"
name="city"
type="text"
v-model="city" v-model="city"
data-vv-as="Ort"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('city') }" :class="{ 'skillboxform-input__input--error': errors.has('city') }"
name="city"
type="text"
data-vv-as="Ort"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="city-input" data-cy="city-input"
/> id="city"
>
<small <small
v-if="errors.has('city') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="city-local-errors" data-cy="city-local-errors"
v-if="errors.has('city') && submitted"
>{{ errors.first('city') }}</small> >{{ errors.first('city') }}</small>
<small <small
v-for="error in cityErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="city-remote-errors" data-cy="city-remote-errors"
v-for="error in cityErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="postcode" class="skillboxform-input__label">Postleitzahl</label> <label
for="postcode"
class="skillboxform-input__label">Postleitzahl</label>
<input <input
id="postcode"
name="postcode"
type="text"
v-model="postcode" v-model="postcode"
data-vv-as="Postleitzahl"
v-validate="'required'" v-validate="'required'"
:class="{ 'skillboxform-input__input--error': errors.has('postcode') }" :class="{ 'skillboxform-input__input--error': errors.has('postcode') }"
name="postcode"
type="text"
data-vv-as="Postleitzahl"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="postcode-input" data-cy="postcode-input"
/> id="postcode"
>
<small <small
v-if="errors.has('postcode') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="postcode-local-errors" data-cy="postcode-local-errors"
v-if="errors.has('postcode') && submitted"
>{{ errors.first('postcode') }}</small> >{{ errors.first('postcode') }}</small>
<small <small
v-for="error in postcodeErrors"
:key="error" :key="error"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="postcode-remote-errors" data-cy="postcode-remote-errors"
v-for="error in postcodeErrors"
>{{ error }}</small> >{{ error }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="password" class="skillboxform-input__label">Passwort</label> <label
for="password"
class="skillboxform-input__label">Passwort</label>
<input <input
id="password" v-model="password"
v-validate="'required|strongPassword'"
:class="{ 'skillboxform-input__input--error': errors.has('password') && submitted }"
name="password" name="password"
type="text" type="text"
v-model="password"
data-vv-as="Passwort" data-vv-as="Passwort"
v-validate="'required|strongPassword'"
:class="{ 'skillboxform-input__input--error': errors.has('password') && submitted }"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="password-input" data-cy="password-input"
id="password"
ref="password" ref="password"
/> >
<small <small
v-if="errors.has('password') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="password-local-errors" data-cy="password-local-errors"
v-if="errors.has('password') && submitted"
>{{ errors.first('password') }}</small> >{{ errors.first('password') }}</small>
</div> </div>
<div class="change-form__field skillboxform-input"> <div class="change-form__field skillboxform-input">
<label for="password2" class="skillboxform-input__label">Passwort wiederholen</label> <label
for="password2"
class="skillboxform-input__label">Passwort wiederholen</label>
<input <input
id="passwordConfirmation"
name="passwordConfirmation"
type="text"
v-model="passwordConfirmation" v-model="passwordConfirmation"
data-vv-as="Passwort wiederholen"
v-validate="'required|confirmed:password'" v-validate="'required|confirmed:password'"
:class="{ 'skillboxform-input__input--error': errors.has('passwordConfirmation') && submitted }" :class="{ 'skillboxform-input__input--error': errors.has('passwordConfirmation') && submitted }"
name="passwordConfirmation"
type="text"
data-vv-as="Passwort wiederholen"
class="change-form__new skillbox-input skillboxform-input__input" class="change-form__new skillbox-input skillboxform-input__input"
autocomplete="off" autocomplete="off"
data-cy="passwordConfirmation-input" data-cy="passwordConfirmation-input"
/> id="passwordConfirmation"
>
<small <small
v-if="errors.has('passwordConfirmation') && submitted"
class="skillboxform-input__error" class="skillboxform-input__error"
data-cy="passwordConfirmation-local-errors" data-cy="passwordConfirmation-local-errors"
v-if="errors.has('passwordConfirmation') && submitted"
>{{ errors.first('passwordConfirmation') }}</small> >{{ errors.first('passwordConfirmation') }}</small>
</div> </div>
<div class="skillboxform-input"> <div class="skillboxform-input">
<small class="skillboxform-input__error" data-cy="registration-error" v-if="registrationError">{{registrationError}}</small> <small
class="skillboxform-input__error"
data-cy="registration-error"
v-if="registrationError">{{ registrationError }}</small>
</div> </div>
<div class="actions"> <div class="actions">
<button class="button button--primary button--big actions__submit" data-cy="register-button">Konto erstellen</button> <button
class="button button--primary button--big actions__submit"
data-cy="register-button">Konto erstellen</button>
</div> </div>
</form> </form>
@ -235,6 +263,15 @@ function initialData() {
export default { export default {
components: {}, components: {},
data() {
return Object.assign(
{
helloEmail: ''
},
initialData()
);
},
methods: { methods: {
validateBeforeSubmit() { validateBeforeSubmit() {
this.$validator.validate().then(result => { this.$validator.validate().then(result => {
@ -284,15 +321,6 @@ export default {
} }
}, },
data() {
return Object.assign(
{
helloEmail: ''
},
initialData()
);
},
apollo: { apollo: {
helloEmail: { helloEmail: {
query: HELLO_EMAIL, query: HELLO_EMAIL,