Registrazione: far comparire tutti i campi una volta inseriti... cosi comparirà l'errore
This commit is contained in:
@@ -442,7 +442,7 @@
|
|||||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.REGISTRATION">
|
<div v-else-if="myel.type === shared_consts.ELEMTYPE.REGISTRATION">
|
||||||
<div v-if="editOn" class="elemEdit">Registrazione</div>
|
<div v-if="editOn" class="elemEdit">Registrazione</div>
|
||||||
|
|
||||||
<div v-if="true">
|
<div>
|
||||||
<CRegistration />
|
<CRegistration />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
:label="$t('reg.submit')"
|
:label="$t('reg.submit')"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
color="blue"
|
||||||
|
label="pippo"
|
||||||
|
type="a"
|
||||||
|
size="sm"
|
||||||
|
href="http://pippo.it"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-carousel
|
<q-carousel
|
||||||
v-if="start"
|
v-if="start"
|
||||||
@@ -99,45 +108,38 @@
|
|||||||
<div
|
<div
|
||||||
v-if="site.confpages.enableRegMultiChoice"
|
v-if="site.confpages.enableRegMultiChoice"
|
||||||
style=""
|
style=""
|
||||||
class="row q-ma-sm centermydiv2 q-pa-sm justify-center"
|
class="column q-ma-sm centermydiv2 q-pa-sm justify-center"
|
||||||
>
|
>
|
||||||
<span
|
|
||||||
v-if="!invited"
|
|
||||||
:class="
|
|
||||||
($q.dark.isActive ? `text-white` : `text-black`) +
|
|
||||||
` text-h7`
|
|
||||||
"
|
|
||||||
>Chiedi alla persona che ti ha invitato su RISO il suo
|
|
||||||
<strong>Username</strong></span
|
|
||||||
>
|
|
||||||
<div class="row items-center">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-btn
|
<q-btn
|
||||||
rounded
|
rounded
|
||||||
type="a"
|
type="a"
|
||||||
class="flex-item-btn"
|
class="col-xs-12 col-sm-6 flex-item-btn items-center"
|
||||||
icon="fab fa-telegram"
|
icon="fab fa-telegram"
|
||||||
size="md"
|
size="md"
|
||||||
color="primary"
|
color="primary"
|
||||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : `/bot`"
|
:href="
|
||||||
|
invited
|
||||||
|
? tools.getLinkBotTelegram(invited, regexpire)
|
||||||
|
: `/bot`
|
||||||
|
"
|
||||||
:label="$t('reg.bytelegram')"
|
:label="$t('reg.bytelegram')"
|
||||||
>
|
>
|
||||||
<q-badge color="red" align="bottom" floating
|
<q-badge color="red" align="bottom" floating
|
||||||
>Consigliato</q-badge
|
>Consigliato</q-badge
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
$q.dark.isActive ? `text-white` : `text-black` + ` col-12`
|
$q.dark.isActive
|
||||||
|
? `text-white`
|
||||||
|
: `text-black` + ` col-12 text-center`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
oppure se non riesci ad installare Telegram:
|
se non riesci ad installare Telegram:
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
rounded
|
rounded
|
||||||
class="flex-item-btn"
|
class="flex-item-btn col-xs-12 col-sm-6"
|
||||||
outline
|
outline
|
||||||
icon="fas fa-envelope"
|
icon="fas fa-envelope"
|
||||||
size="md"
|
size="md"
|
||||||
|
|||||||
@@ -119,13 +119,13 @@ export default defineComponent({
|
|||||||
const site = computed(() => globalStore.site)
|
const site = computed(() => globalStore.site)
|
||||||
|
|
||||||
const signup = reactive(<ISignupOptions>{
|
const signup = reactive(<ISignupOptions>{
|
||||||
email: process.env.TEST_EMAIL || '',
|
email: '',
|
||||||
username: process.env.TEST_USERNAME || '',
|
username: '',
|
||||||
name: '',
|
name: '',
|
||||||
surname: '',
|
surname: '',
|
||||||
password: process.env.TEST_PASSWORD || '',
|
password: '',
|
||||||
repeatPassword: process.env.TEST_PASSWORD || '',
|
repeatPassword: '',
|
||||||
terms: !process.env.PROD,
|
terms: false,
|
||||||
profile: DefaultProfile,
|
profile: DefaultProfile,
|
||||||
aportador_solidario: '',
|
aportador_solidario: '',
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -71,6 +71,203 @@
|
|||||||
></q-btn>
|
></q-btn>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div v-if="signup.terms">
|
||||||
|
<q-input
|
||||||
|
v-if="
|
||||||
|
showaportador &&
|
||||||
|
signup.aportador_solidario !== tools.APORTADOR_NONE
|
||||||
|
"
|
||||||
|
ref="inputAportador"
|
||||||
|
bg-color="lightblue"
|
||||||
|
:readonly="!!ap_iniziale"
|
||||||
|
v-model="signup.aportador_solidario"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@keyup.enter="
|
||||||
|
v$.aportador_solidario.$touch && !v$.aportador_solidario.$error
|
||||||
|
? $refs.inputEmail.focus()
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
@blur="v$.aportador_solidario.$touch"
|
||||||
|
:error="v$.aportador_solidario.$error"
|
||||||
|
:error-message="
|
||||||
|
tools.errorMsg('aportador_solidario', v$.aportador_solidario)
|
||||||
|
"
|
||||||
|
maxlength="20"
|
||||||
|
debounce="1000"
|
||||||
|
:label="$t('reg.aportador_solidario')"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="person" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<div style="margin-top: 5px"></div>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
ref="inputEmail"
|
||||||
|
v-model="signup.email"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@update:model-value="changeemail()"
|
||||||
|
maxlength="50"
|
||||||
|
v-on:keyup.enter="!checkifDisabled ? $refs.carousel.next() : null"
|
||||||
|
debounce="2000"
|
||||||
|
:rules="[myRuleEmail]"
|
||||||
|
:label="$t('reg.email_reg')"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="email" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
ref="inputUsername"
|
||||||
|
v-model="signup.username"
|
||||||
|
:readonly="
|
||||||
|
tools.getAskToVerifyReg() &&
|
||||||
|
!site.confpages.enableRegMultiChoice
|
||||||
|
"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@blur="v$.username.$touch"
|
||||||
|
@update:model-value="changeusername"
|
||||||
|
:error="v$.username.$error"
|
||||||
|
@keydown.space="(event) => event.preventDefault()"
|
||||||
|
@keyup.enter="
|
||||||
|
!v$.username.$error ? $refs.inputName.focus() : null
|
||||||
|
"
|
||||||
|
maxlength="20"
|
||||||
|
debounce="500"
|
||||||
|
:error-message="
|
||||||
|
tools.errorMsg('username', v$.username) ||
|
||||||
|
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||||
|
"
|
||||||
|
:label="$t('reg.username_reg')"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="person" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<div v-if="show_namesurname">
|
||||||
|
<q-input
|
||||||
|
ref="inputName"
|
||||||
|
v-model="signup.name"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@blur="v$.name.$touch"
|
||||||
|
:error="v$.name.$error"
|
||||||
|
maxlength="30"
|
||||||
|
debounce="1000"
|
||||||
|
@keyup.enter="$refs.inputSurname.focus()"
|
||||||
|
:error-message="tools.errorMsg('name', v$.name)"
|
||||||
|
:label="$t('reg.name_opt')"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="person" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
ref="inputSurname"
|
||||||
|
v-model="signup.surname"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
:error="v$.surname.$error"
|
||||||
|
@blur="v$.surname.$touch"
|
||||||
|
maxlength="30"
|
||||||
|
debounce="1000"
|
||||||
|
v-on:keyup.enter="
|
||||||
|
!checkifDisabled ? $refs.carousel.next() : null
|
||||||
|
"
|
||||||
|
:error-message="tools.errorMsg('surname', v$.surname)"
|
||||||
|
:label="$t('reg.surname_opt')"
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="person" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-input
|
||||||
|
ref="inputPassword"
|
||||||
|
v-model="signup.password"
|
||||||
|
:type="typePassword"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@blur="v$.password.$touch"
|
||||||
|
:error="v$.password.$error"
|
||||||
|
:error-message="`${tools.errorMsg('password', v$.password)}`"
|
||||||
|
@keyup.enter="
|
||||||
|
!v$.password.$error ? $refs.inputPassword2.focus() : null
|
||||||
|
"
|
||||||
|
maxlength="30"
|
||||||
|
debounce="1000"
|
||||||
|
:label="$t('reg.password_reg')"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-btn
|
||||||
|
tabindex="-1"
|
||||||
|
:icon="
|
||||||
|
typePassword === `password`
|
||||||
|
? `fas fa-eye-slash`
|
||||||
|
: `fas fa-eye`
|
||||||
|
"
|
||||||
|
@click="showPassword"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</template>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="vpn_key" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
ref="inputPassword2"
|
||||||
|
v-model="signup.repeatPassword"
|
||||||
|
:type="typePassword"
|
||||||
|
maxlength="30"
|
||||||
|
rounded
|
||||||
|
outlined
|
||||||
|
@blur="v$.repeatPassword.$touch"
|
||||||
|
:error="v$.repeatPassword.$error"
|
||||||
|
:error-message="`${tools.errorMsg(
|
||||||
|
'repeatpassword',
|
||||||
|
v$.repeatPassword
|
||||||
|
)}`"
|
||||||
|
v-on:keyup.enter="!checkifDisabled ? $refs.carousel.next() : null"
|
||||||
|
:label="$t('reg.repeatPassword')"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-btn
|
||||||
|
tabindex="-1"
|
||||||
|
:icon="
|
||||||
|
typePassword === `password`
|
||||||
|
? `fas fa-eye-slash`
|
||||||
|
: `fas fa-eye`
|
||||||
|
"
|
||||||
|
@click="showPassword"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
</template>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<q-icon name="vpn_key" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
|
||||||
|
<div class="column">
|
||||||
|
<q-btn
|
||||||
|
rounded
|
||||||
|
size="lg"
|
||||||
|
color="positive"
|
||||||
|
@click="submitOk"
|
||||||
|
:disabled="!allowSubmit()"
|
||||||
|
:label="$t('reg.submit')"
|
||||||
|
>
|
||||||
|
</q-btn>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<q-carousel
|
<q-carousel
|
||||||
v-model="slide"
|
v-model="slide"
|
||||||
@@ -120,7 +317,8 @@
|
|||||||
rounded
|
rounded
|
||||||
outlined
|
outlined
|
||||||
@keyup.enter="
|
@keyup.enter="
|
||||||
v$.aportador_solidario.$touch && !v$.aportador_solidario.$error
|
v$.aportador_solidario.$touch &&
|
||||||
|
!v$.aportador_solidario.$error
|
||||||
? $refs.inputEmail.focus()
|
? $refs.inputEmail.focus()
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
@@ -393,18 +591,6 @@
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column">
|
|
||||||
<q-btn
|
|
||||||
rounded
|
|
||||||
size="lg"
|
|
||||||
color="positive"
|
|
||||||
@click="submitOk"
|
|
||||||
:disabled="!allowSubmit()"
|
|
||||||
:label="$t('reg.submit')"
|
|
||||||
>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<!--
|
<!--
|
||||||
Già registrato?
|
Già registrato?
|
||||||
<q-btn
|
<q-btn
|
||||||
@@ -420,9 +606,11 @@
|
|||||||
-->
|
-->
|
||||||
</q-carousel-slide>
|
</q-carousel-slide>
|
||||||
</q-carousel>
|
</q-carousel>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<q-btn-toggle
|
<q-btn-toggle
|
||||||
|
v-if="!signup.terms"
|
||||||
glossy
|
glossy
|
||||||
v-model="slide"
|
v-model="slide"
|
||||||
:options="[
|
:options="[
|
||||||
|
|||||||
Reference in New Issue
Block a user