Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
d14213e9
Commit
d14213e9
authored
Dec 03, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pseudo verification
parent
5c14292c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
Register.vue
frontend/src/views/Register.vue
+5
-11
No files found.
frontend/src/views/Register.vue
View file @
d14213e9
...
...
@@ -9,7 +9,7 @@
<pwd-input
id=
"password2"
label=
"Confirmer"
/>
<error-message
id=
"error-password"
errormessage=
"Les mots de passe ne correspondent pas."
v-show=
"this.showPwdError"
/>
<error-message
id=
"error-mail"
errormessage=
"Le mail rentré n'est pas valide"
v-show=
"this.showMailError"
/>
<error-message
id=
"error-back"
errormessage=
"Ce
t email ou ce pseudo est déjà pris."
v-show=
"this.showBack
Error"
/>
<error-message
id=
"error-back"
errormessage=
"Ce
pseudo est déjà pris."
v-show=
"this.showPseudo
Error"
/>
<error-message
id=
"error-back"
errormessage=
"Tous les champs obligatoires ne sont pas remplis."
v-show=
"this.showNotFilledError"
/>
</div>
...
...
@@ -38,15 +38,12 @@ export default {
data
()
{
return
{
showPwdError
:
false
,
showBackError
:
false
,
showMailError
:
false
,
showPseudoError
:
false
,
showNotFilledError
:
false
,
}
},
methods
:
{
updateShowBackError
:
function
(){
this
.
showBackError
=
false
;
//TODO
},
onSubmit
:
async
function
(){
// If we press back, we go back
if
(
event
.
submitter
.
id
==
'back'
)
{
...
...
@@ -76,12 +73,6 @@ export default {
return
;
}
// Test if Email exist/Pseudo exist
this
.
showBackError
=
false
;
//TODO
if
(
this
.
showBackError
)
{
return
;
}
// Post new user if all tests are ok
if
(
event
.
submitter
.
id
==
'validate'
)
{
let
request
=
await
fetch
(
this
.
$apiRoot
+
'/user'
,
...
...
@@ -105,6 +96,9 @@ export default {
let
response
=
await
request
;
if
(
response
.
ok
){
this
.
$router
.
push
(
'lobby'
);
}
else
if
(
response
.
status
==
422
){
// Test if Email exist/Pseudo exist
this
.
showPseudoError
=
true
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment