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
3b680c7c
Commit
3b680c7c
authored
Dec 02, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now check if everything is ok
parent
6221fdfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Register.vue
frontend/src/views/Register.vue
+13
-1
No files found.
frontend/src/views/Register.vue
View file @
3b680c7c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<error-message
id=
"error-password"
errormessage=
"Les mots de passe ne correspondent pas."
v-show=
"this.showPwdError"
/>
<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-mail"
errormessage=
"Le mail rentré n'est pas valide"
v-show=
"this.showMailError"
/>
<error-message
id=
"error-back"
errormessage=
"Cet email ou ce pseudo est déjà pris."
v-show=
"this.showBackError"
/>
<error-message
id=
"error-back"
errormessage=
"Cet email ou ce pseudo est déjà pris."
v-show=
"this.showBackError"
/>
<error-message
id=
"error-back"
errormessage=
"Tous les champs obligatoires ne sont pas remplis."
v-show=
"this.showNotFilledError"
/>
</div>
</div>
<svg-button
id=
"back"
svg=
"/icons/back.svg"
/>
<svg-button
id=
"back"
svg=
"/icons/back.svg"
/>
...
@@ -39,6 +39,7 @@ export default {
...
@@ -39,6 +39,7 @@ export default {
showPwdError
:
false
,
showPwdError
:
false
,
showBackError
:
false
,
showBackError
:
false
,
showMailError
:
false
,
showMailError
:
false
,
showNotFilledError
:
false
,
}
}
},
},
methods
:
{
methods
:
{
...
@@ -51,6 +52,17 @@ export default {
...
@@ -51,6 +52,17 @@ export default {
this
.
$router
.
push
(
'/'
);
this
.
$router
.
push
(
'/'
);
}
}
// Test if all fields are filled
this
.
showNotFilledError
=
(
document
.
getElementById
(
'pseudo'
).
value
==
''
||
document
.
getElementById
(
'mail'
).
value
==
''
||
document
.
getElementById
(
'password1'
).
value
==
''
||
document
.
getElementById
(
'password2'
).
value
==
''
);
if
(
this
.
showNotFilledError
)
{
return
;
}
// Test if password match the confirm password
// Test if password match the confirm password
this
.
showPwdError
=
(
document
.
getElementById
(
'password1'
).
value
!==
document
.
getElementById
(
'password2'
).
value
);
this
.
showPwdError
=
(
document
.
getElementById
(
'password1'
).
value
!==
document
.
getElementById
(
'password2'
).
value
);
if
(
this
.
showPwdError
)
{
if
(
this
.
showPwdError
)
{
...
...
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