Fix Registration
This commit is contained in:
@@ -1401,6 +1401,7 @@
|
||||
</div>
|
||||
<div v-else>
|
||||
<CMySingleEvent
|
||||
v-if="mysingleevent"
|
||||
:myevent="mysingleevent"
|
||||
calendarView="month"
|
||||
:iseditable="editable"
|
||||
|
||||
@@ -30,6 +30,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
noButtAdd: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<CTitlePage :ind="ind" :table="table">
|
||||
<CTitlePage :ind="ind" :table="table" :showBarSelection="showBarSelection">
|
||||
<div class="bi-border-all">
|
||||
<div class="q-ma-xs q-gutter-xs">
|
||||
<div v-if="showFilterPersonal" class="text-center">
|
||||
|
||||
@@ -31,6 +31,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
circuit: {
|
||||
type: Object as PropType<ICircuit | null>,
|
||||
required: false,
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
/>
|
||||
</div>
|
||||
<div v-if="finder" class="">
|
||||
<div v-if="modelValue === costanti.FIND_CIRCUIT || listcircuitsfiltered.length === 0">
|
||||
<div
|
||||
v-if="
|
||||
modelValue === costanti.FIND_CIRCUIT ||
|
||||
listcircuitsfiltered.length === 0
|
||||
"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -26,24 +31,24 @@
|
||||
|
||||
<q-btn label="test" @click="userStore.my.profile.mycircuits = [...userStore.my.profile.mycircuits, {circuitname: 'prova'}]; circuitStore.listcircuits = [...circuitStore.listcircuits, {name: 'prova', path: 'prova'}]"></q-btn>
|
||||
-->
|
||||
<q-list>
|
||||
<span v-for="(circuit, index) in listcircuitsfiltered" :key="index" class="q-my-sm" clickable>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="modelValue">
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit :mycircuit="circuit" :visu="modelValue"> </CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyCircuit
|
||||
:mycircuit="mycircuit"
|
||||
:visu="visu">
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyCircuit :mycircuit="mycircuit" :visu="visu"> </CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.REGISTRATION">
|
||||
<div v-if="editOn" class="elemEdit">Registrazione</div>
|
||||
|
||||
<div v-if="isAppRunning || $q.screen.gt.xs">
|
||||
<div v-if="true">
|
||||
<CRegistration />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,11 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
mygrp: {
|
||||
type: Object as PropType<IMyGroup | null>,
|
||||
required: false,
|
||||
|
||||
@@ -20,24 +20,23 @@
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list>
|
||||
<span v-for="(grp, index) in listgroupsfiltered" :key="index" class="q-my-sm" clickable>
|
||||
<CMyGroup
|
||||
:mygrp="grp"
|
||||
:visu="modelValue">
|
||||
</CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup :mygrp="grp" :visu="modelValue"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-list class="width-container">
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyGroup
|
||||
:mygrp="mygrp"
|
||||
:visu="visu">
|
||||
</CMyGroup>
|
||||
</span>
|
||||
<span class="q-my-sm" clickable>
|
||||
<CMyGroup :mygrp="mygrp" :visu="visu"> </CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<q-item-label lines="4" v-if="myrec.descr">{{ myrec.descr }}<br>
|
||||
</q-item-label>
|
||||
<q-item-label lines="2" style="text-align: right" class="text_user_city">
|
||||
<span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
|
||||
<span class="text-weight-bold">{{ tools.getNameToShow(myrec) }}</span> -
|
||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})</span>
|
||||
</q-item-label>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<q-icon name="fas fa-lock"></q-icon></span>
|
||||
<span v-if="myrec.visibility.includes(shared_consts.Visibility_Group.HIDDEN)" class="q-mr-xs">
|
||||
<q-icon name="fas fa-eye-slash"></q-icon></span>
|
||||
<span class="text-weight-bold">{{ getNameToShow(myrec) }}</span> -
|
||||
<span class="text-weight-bold">{{ tools.getNameToShow(myrec) }}</span> -
|
||||
<span v-for="(rec, ind) of myrec.mycities" :key="ind"><span v-if="ind > 0">, </span>{{ rec.comune }}</span>
|
||||
</q-item-label>
|
||||
|
||||
|
||||
@@ -141,10 +141,6 @@
|
||||
|
||||
<div>
|
||||
<div v-if="!tools.isLogged()" style="margin: 5px; padding: 5px;" class="home">
|
||||
<q-btn
|
||||
v-if="site.confpages.enableReg && site.confpages.enableRegByBot"
|
||||
type="a" rounded size="lg" color="primary" href="/bot" :label="$t('reg.submit')" class="buttreg">
|
||||
</q-btn>
|
||||
<q-btn
|
||||
rounded size="lg" color="primary" @click="PagLogin"
|
||||
class="btn-start">
|
||||
|
||||
@@ -23,6 +23,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
signupform: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
@@ -59,7 +64,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function regEventEmail() {
|
||||
emit('regEventEmail', props.invited)
|
||||
if (props.signupform) {
|
||||
emit('regEventEmail', props.invited)
|
||||
} else {
|
||||
$router.push('/signup')
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
:class="`text-white bg-primary shadow-1 rounded-borders`"
|
||||
>
|
||||
<q-carousel-slide name="start" class="column no-wrap flex-center">
|
||||
<q-icon name="fas fa-user" size="56px" />
|
||||
<q-icon name="fas fa-user-plus" size="56px" />
|
||||
<div class="q-mt-md text-center">
|
||||
<span class="text-h6 text-white"> {{ $t('reg.invitante') }}</span>
|
||||
<q-card class="dialog_card q-mb-lg">
|
||||
@@ -91,8 +91,8 @@
|
||||
gruppo.<br />
|
||||
</div>
|
||||
<div v-else-if="chooseReg">
|
||||
<div class="text-center">
|
||||
<q-icon name="fas fa-user" size="23px" />
|
||||
<div class="row justify-center items-center">
|
||||
<q-icon name="fas fa-user-plus" size="27px" class="q-mx-md" />
|
||||
<span class="text-h6 text-white"> {{ $t('reg.page_title') }}</span>
|
||||
<q-card class="q-mt-sm dialog_card q-mb-sm">
|
||||
<q-card-section>
|
||||
@@ -108,19 +108,18 @@
|
||||
` text-h7`
|
||||
"
|
||||
>Chiedi alla persona che ti ha invitato su RISO il suo
|
||||
Username e poi :</span
|
||||
<strong>Username</strong></span
|
||||
>
|
||||
<div class="row items-center">
|
||||
<div class="col-12">
|
||||
<q-btn
|
||||
rounded
|
||||
:type="invited ? 'a' : 'button'"
|
||||
type="a"
|
||||
class="flex-item-btn"
|
||||
icon="fab fa-telegram"
|
||||
size="md"
|
||||
color="primary"
|
||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : ``"
|
||||
to="/bot"
|
||||
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : `/bot`"
|
||||
:label="$t('reg.bytelegram')"
|
||||
>
|
||||
<q-badge color="red" align="bottom" floating
|
||||
|
||||
@@ -36,3 +36,11 @@
|
||||
color: red;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.cosa_chiedere{
|
||||
font-weight: bold;
|
||||
color: blue;
|
||||
font-size: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,27 @@ export default defineComponent({
|
||||
const visubuttBOT = ref(false)
|
||||
const isalreadyReg = ref(false)
|
||||
const needTelegram = ref(false)
|
||||
const slide = ref('1')
|
||||
const inputEmail = ref(<any>null)
|
||||
const inputUsername = ref(<any>null)
|
||||
const inputPassword = ref(<any>null)
|
||||
const inputPassword2 = ref(<any>null)
|
||||
|
||||
const checkifDisabled = computed(() => {
|
||||
let ret = true
|
||||
if (slide.value === '1') {
|
||||
// Invitante + Email
|
||||
ret = !signup.email || !v$.value.aportador_solidario || v$.value.aportador_solidario.$invalid || (inputEmail.value && inputEmail.value.hasError)
|
||||
} else if (slide.value === '2') {
|
||||
// Username
|
||||
ret = !signup.username || (inputUsername.value && inputUsername.value.hasError)
|
||||
} else if (slide.value === '3') {
|
||||
// Password
|
||||
ret = !signup.password || (!inputPassword.value && inputPassword.value.hasError) || (!inputPassword2.value && inputPassword2.value.hasError)
|
||||
}
|
||||
|
||||
return ret
|
||||
})
|
||||
|
||||
const typePassword = ref('password')
|
||||
|
||||
@@ -253,9 +274,6 @@ export default defineComponent({
|
||||
countryname.value = name
|
||||
}
|
||||
|
||||
function inputUsername(value: string) {
|
||||
signup.username = value.trim()
|
||||
}
|
||||
|
||||
async function created() {
|
||||
|
||||
@@ -308,11 +326,16 @@ export default defineComponent({
|
||||
// --> content is NOT valid, no error message
|
||||
// resolve(error_message)
|
||||
// --> content is NOT valid, we have error message
|
||||
tools.registeredemail(val).then((ris) => {
|
||||
let risp = !!ris || t('reg.err.duplicate_email')
|
||||
if (ris) {
|
||||
tools.registeredemail(val).then((emailOk) => {
|
||||
let risp = !!emailOk || t('reg.err.duplicate_email')
|
||||
if (emailOk) {
|
||||
risp = tools.isEmail(val) || t('reg.err.invalid_email')
|
||||
emailOk = emailOk && tools.isEmail(val)
|
||||
}
|
||||
if (emailOk) {
|
||||
risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro')
|
||||
}
|
||||
|
||||
resolve(risp)
|
||||
|
||||
})
|
||||
@@ -330,7 +353,8 @@ export default defineComponent({
|
||||
typePassword.value = typePassword.value === 'password' ? 'text' : 'password'
|
||||
}
|
||||
|
||||
function regEventEmail() {
|
||||
function regEventEmail(invited: boolean) {
|
||||
console.log('EVENT RECEIVED: regEventEmail', invited)
|
||||
// reg
|
||||
visubuttBOT.value = false
|
||||
needTelegram.value = false
|
||||
@@ -343,7 +367,6 @@ export default defineComponent({
|
||||
changeemail,
|
||||
changeusername,
|
||||
submitOk,
|
||||
inputUsername,
|
||||
selectcountry,
|
||||
intcode_change,
|
||||
tools,
|
||||
@@ -364,6 +387,12 @@ export default defineComponent({
|
||||
ap_iniziale,
|
||||
regEventEmail,
|
||||
needTelegram,
|
||||
slide,
|
||||
checkifDisabled,
|
||||
inputEmail,
|
||||
inputUsername,
|
||||
inputPassword,
|
||||
inputPassword2,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -44,36 +44,14 @@
|
||||
</div>
|
||||
|
||||
<div v-if="visubuttBOT && needTelegram" class="q-gutter-md">
|
||||
<q-banner
|
||||
rounded
|
||||
class="bg-green-5 text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="q-ma-md">
|
||||
<CRegistration
|
||||
:invited="signup.aportador_solidario"
|
||||
:regexpire="regexpire"
|
||||
@regEventEmail="regEventEmail"
|
||||
/>
|
||||
|
||||
<!--<q-btn
|
||||
rounded
|
||||
color="primary"
|
||||
icon="fab fa-telegram"
|
||||
:label="
|
||||
$t('components.authentication.telegram.regbot', {
|
||||
botname: tools.getBotName(),
|
||||
})
|
||||
"
|
||||
type="a"
|
||||
:href="
|
||||
tools.getLinkBotTelegram(signup.aportador_solidario, regexpire)
|
||||
"
|
||||
target="_blank"
|
||||
></q-btn>-->
|
||||
<br />
|
||||
</div>
|
||||
</q-banner>
|
||||
<div class="q-ma-md">
|
||||
<CRegistration
|
||||
:invited="signup.aportador_solidario"
|
||||
:regexpire="regexpire"
|
||||
@regEventEmail="regEventEmail"
|
||||
:signupform="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="!isalreadyReg" class="q-gutter-sm q-mt-sm">
|
||||
@@ -94,202 +72,235 @@
|
||||
<br /><br />
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-input
|
||||
v-if="
|
||||
showaportador &&
|
||||
signup.aportador_solidario !== tools.APORTADOR_NONE
|
||||
"
|
||||
bg-color="lightblue"
|
||||
:readonly="!!ap_iniziale"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded
|
||||
outlined
|
||||
@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')"
|
||||
<q-carousel
|
||||
v-model="slide"
|
||||
ref="carousel"
|
||||
transition-prev="slide-right"
|
||||
transition-next="slide-left"
|
||||
animated
|
||||
swipeable
|
||||
:class="`shadow-1`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!--<q-input
|
||||
v-model="signup.email"
|
||||
rounded outlined
|
||||
@blur="v$.email.$touch"
|
||||
@update:model-value="changeemail()"
|
||||
:error="v$.email.$invalid"
|
||||
:error-message="tools.errorMsg( 'email', v$.email)"
|
||||
maxlength="50"
|
||||
debounce="2000"
|
||||
:label="$t('reg.email')">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email"/>
|
||||
</template>
|
||||
|
||||
</q-input> -->
|
||||
|
||||
<q-input
|
||||
v-model="signup.email"
|
||||
rounded
|
||||
outlined
|
||||
@update:model-value="changeemail()"
|
||||
maxlength="50"
|
||||
debounce="3000"
|
||||
:rules="[myRuleEmail]"
|
||||
lazy-rules
|
||||
:label="$t('reg.email_reg')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
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()"
|
||||
maxlength="20"
|
||||
debounce="1000"
|
||||
: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
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
: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
|
||||
v-model="signup.surname"
|
||||
rounded
|
||||
outlined
|
||||
:error="v$.surname.$error"
|
||||
@blur="v$.surname.$touch"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('surname', v$.surname)"
|
||||
:label="$t('reg.surname_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
v-model="signup.password"
|
||||
:type="typePassword"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.password.$touch"
|
||||
:error="v$.password.$error"
|
||||
:error-message="`${tools.errorMsg('password', v$.password)}`"
|
||||
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"
|
||||
<template v-slot:control>
|
||||
<q-carousel-control
|
||||
position="bottom-right"
|
||||
:offset="[18, 18]"
|
||||
class="q-gutter-xs"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="slide !== '1'"
|
||||
push
|
||||
text-color="black"
|
||||
icon="arrow_left"
|
||||
label="Indietro"
|
||||
@click="$refs.carousel.previous()"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="slide !== '4'"
|
||||
push
|
||||
color="primary"
|
||||
icon="arrow_right"
|
||||
label="Avanti"
|
||||
:disabled="checkifDisabled"
|
||||
@click="$refs.carousel.next()"
|
||||
/>
|
||||
</q-carousel-control>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
<q-carousel-slide name="1">
|
||||
<div class="">
|
||||
<q-input
|
||||
v-if="
|
||||
showaportador &&
|
||||
signup.aportador_solidario !== tools.APORTADOR_NONE
|
||||
"
|
||||
bg-color="lightblue"
|
||||
:readonly="!!ap_iniziale"
|
||||
v-model="signup.aportador_solidario"
|
||||
rounded
|
||||
outlined
|
||||
@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
|
||||
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
|
||||
)}`"
|
||||
:label="$t('reg.repeatPassword')"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-btn
|
||||
tabindex="-1"
|
||||
:icon="
|
||||
typePassword === `password`
|
||||
? `fas fa-eye-slash`
|
||||
: `fas fa-eye`
|
||||
<q-input
|
||||
ref="inputEmail"
|
||||
v-model="signup.email"
|
||||
rounded
|
||||
outlined
|
||||
@update:model-value="changeemail()"
|
||||
maxlength="50"
|
||||
debounce="2000"
|
||||
:rules="[myRuleEmail]"
|
||||
:label="$t('reg.email_reg')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="email" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="2">
|
||||
<div class="cosa_chiedere">{{ $t('reg.scegli_username') }}</div>
|
||||
<q-input
|
||||
ref="inputUsername"
|
||||
v-model="signup.username"
|
||||
:readonly="
|
||||
tools.getAskToVerifyReg() &&
|
||||
!site.confpages.enableRegMultiChoice
|
||||
"
|
||||
@click="showPassword"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.username.$touch"
|
||||
@update:model-value="changeusername"
|
||||
:error="v$.username.$error"
|
||||
@keydown.space="(event) => event.preventDefault()"
|
||||
maxlength="20"
|
||||
debounce="500"
|
||||
:error-message="
|
||||
tools.errorMsg('username', v$.username) ||
|
||||
(isalreadyReg ? 'L\'Username è gia stato registrato!' : '')
|
||||
"
|
||||
:label="$t('reg.username_reg')"
|
||||
>
|
||||
</q-btn>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="vpn_key" />
|
||||
</template>
|
||||
</q-input>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-input
|
||||
v-if="shownationality"
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded
|
||||
outlined
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<vue-country-code
|
||||
<div v-if="show_namesurname">
|
||||
<q-input
|
||||
v-model="signup.name"
|
||||
rounded
|
||||
outlined
|
||||
@blur="v$.name.$touch"
|
||||
:error="v$.name.$error"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
: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
|
||||
v-model="signup.surname"
|
||||
rounded
|
||||
outlined
|
||||
:error="v$.surname.$error"
|
||||
@blur="v$.surname.$touch"
|
||||
maxlength="30"
|
||||
debounce="1000"
|
||||
:error-message="tools.errorMsg('surname', v$.surname)"
|
||||
:label="$t('reg.surname_opt')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="person" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="3">
|
||||
<div class="cosa_chiedere">{{ $t('reg.scegli_password') }}</div>
|
||||
<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)}`"
|
||||
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>
|
||||
|
||||
<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
|
||||
)}`"
|
||||
: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>
|
||||
</q-carousel-slide>
|
||||
<q-carousel-slide name="4">
|
||||
<q-input
|
||||
v-if="shownationality"
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded
|
||||
outlined
|
||||
debounce="1000"
|
||||
:label="$t('reg.nationality')"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<!--<vue-country-code
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }"
|
||||
>
|
||||
|
||||
</vue-country-code>-->
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!--<vue-tel-input
|
||||
<!--<vue-tel-input
|
||||
v-if="showcell"
|
||||
@country-changed="intcode_change()"
|
||||
:value="signup.profile.cell"
|
||||
@@ -300,84 +311,104 @@
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>-->
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn label="Mostra Privacy" @click="showpolicy = true"></q-btn>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showpolicy">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title> Privacy Policy </q-toolbar-title>
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
label="Mostra Privacy"
|
||||
@click="showpolicy = true"
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<PagePolicy
|
||||
v-if="site.policy"
|
||||
:owneremail="site.policy.owneremail"
|
||||
:siteName="site.policy.siteName"
|
||||
:ownerDataName="site.policy.ownerDataName"
|
||||
:managerData="site.policy.managerData"
|
||||
:includeData="site.policy.includeData"
|
||||
:url="site.policy.url"
|
||||
:lastdataupdate="site.policy.lastdataupdate"
|
||||
:country="site.policy.country"
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showpolicy">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title> Privacy Policy </q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<PagePolicy
|
||||
v-if="site.policy"
|
||||
:owneremail="site.policy.owneremail"
|
||||
:siteName="site.policy.siteName"
|
||||
:ownerDataName="site.policy.ownerDataName"
|
||||
:managerData="site.policy.managerData"
|
||||
:includeData="site.policy.includeData"
|
||||
:url="site.policy.url"
|
||||
:lastdataupdate="site.policy.lastdataupdate"
|
||||
:country="site.policy.country"
|
||||
>
|
||||
</PagePolicy>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
color="secondary"
|
||||
@blur="v$.terms.$touch"
|
||||
:error="v$.terms.$error"
|
||||
:error-message="`${tools.errorMsg('terms', v$.terms)}`"
|
||||
:label="$t('reg.terms')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<q-checkbox
|
||||
v-if="showadultcheck"
|
||||
v-model="iamadult"
|
||||
color="secondary"
|
||||
:label="$t('reg.onlyadult')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<div v-if="showadultcheck">
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div class="column">
|
||||
<q-btn
|
||||
rounded
|
||||
size="lg"
|
||||
color="positive"
|
||||
@click="submitOk"
|
||||
:disabled="!allowSubmit()"
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
</PagePolicy>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</q-btn>
|
||||
</div>
|
||||
<br />
|
||||
<!--
|
||||
Già registrato?
|
||||
<q-btn
|
||||
class="q-ma-sm"
|
||||
text-color="black"
|
||||
color="white"
|
||||
icon="fas fa-home"
|
||||
label="Accedi"
|
||||
to="/"
|
||||
size="sm"
|
||||
></q-btn>
|
||||
<br /><br /><br />
|
||||
-->
|
||||
</q-carousel-slide>
|
||||
</q-carousel>
|
||||
|
||||
<q-checkbox
|
||||
v-model="signup.terms"
|
||||
color="secondary"
|
||||
@blur="v$.terms.$touch"
|
||||
:error="v$.terms.$error"
|
||||
:error-message="`${tools.errorMsg('terms', v$.terms)}`"
|
||||
:label="$t('reg.terms')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<q-checkbox
|
||||
v-if="showadultcheck"
|
||||
v-model="iamadult"
|
||||
color="secondary"
|
||||
:label="$t('reg.onlyadult')"
|
||||
>
|
||||
</q-checkbox>
|
||||
|
||||
<div v-if="showadultcheck">
|
||||
<br />
|
||||
<div class="row justify-center">
|
||||
<q-btn-toggle
|
||||
glossy
|
||||
v-model="slide"
|
||||
:options="[
|
||||
{ label: 1, value: '1' },
|
||||
{ label: 2, value: '2' },
|
||||
{ label: 3, value: '3' },
|
||||
{ label: 4, value: '4' },
|
||||
]"
|
||||
/>
|
||||
</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?
|
||||
<q-btn
|
||||
class="q-ma-sm"
|
||||
text-color="black"
|
||||
color="white"
|
||||
icon="fas fa-home"
|
||||
label="Accedi"
|
||||
to="/"
|
||||
size="sm"
|
||||
></q-btn>
|
||||
<br /><br /><br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="isalreadyReg">
|
||||
|
||||
@@ -24,6 +24,11 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
showBarSelection: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
v-else
|
||||
>
|
||||
<CBarSelection
|
||||
v-if="showBarSelection"
|
||||
:myicon="myicon"
|
||||
:mytitle="mytitle"
|
||||
:mycolor="mycolor"
|
||||
|
||||
@@ -9,9 +9,9 @@ export default defineComponent({
|
||||
name: 'Logo',
|
||||
props: {
|
||||
mystyle: {
|
||||
type: Boolean,
|
||||
type: String,
|
||||
required: false,
|
||||
default: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user