Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
arsnova-lite
Commits
73becce4
Verified
Commit
73becce4
authored
7 years ago
by
Lukas Maximilian Kimpel
Browse files
Options
Downloads
Patches
Plain Diff
Implement check of data before committing them to the service
parent
30f203f7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!51
Resolve "login screen - register component logic"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/register/register.component.ts
+4
-2
4 additions, 2 deletions
src/app/register/register.component.ts
with
4 additions
and
2 deletions
src/app/register/register.component.ts
+
4
−
2
View file @
73becce4
...
@@ -56,7 +56,9 @@ export class RegisterComponent implements OnInit {
...
@@ -56,7 +56,9 @@ export class RegisterComponent implements OnInit {
}
}
register
(
username
:
string
,
password1
:
string
,
password2
:
string
):
void
{
register
(
username
:
string
,
password1
:
string
,
password2
:
string
):
void
{
if
(
username
&&
password1
&&
password2
&&
password1
===
password2
)
{
if
(
!
this
.
usernameFormControl
.
hasError
(
'
required
'
)
&&
!
this
.
usernameFormControl
.
hasError
(
'
email
'
)
&&
!
this
.
password1FormControl
.
hasError
(
'
required
'
)
&&
!
this
.
password2FormControl
.
hasError
(
'
required
'
)
&&
!
this
.
password2FormControl
.
hasError
(
'
passwordIsEqual
'
))
{
this
.
authenticationService
.
register
(
username
,
password1
).
subscribe
(
result
=>
{
this
.
authenticationService
.
register
(
username
,
password1
).
subscribe
(
result
=>
{
if
(
result
)
{
if
(
result
)
{
this
.
notificationService
.
show
(
'
Successfully registered. Please check your mail!
'
);
this
.
notificationService
.
show
(
'
Successfully registered. Please check your mail!
'
);
...
@@ -66,7 +68,7 @@ export class RegisterComponent implements OnInit {
...
@@ -66,7 +68,7 @@ export class RegisterComponent implements OnInit {
}
}
});
});
}
else
{
}
else
{
this
.
notificationService
.
show
(
'
Could not register. Please check your data
.
'
);
this
.
notificationService
.
show
(
'
Please fit the requirements shown above
.
'
);
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment