Skip to content

Commit 83c846f

Browse files
committed
Added display name and some css.
1 parent 68b9921 commit 83c846f

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

WebService/src/main/java/net/mahmutkocas/user/UserEntity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class UserEntity {
1414

1515
@Id
1616
private String username;
17+
18+
private String displayName;
1719
private String password;
1820
private String mail;
1921
}

frontend/src/bootstrap-override.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
$primary: rgb(11, 131, 125);
2+
.form-group {
3+
margin-bottom: 1rem;
4+
}
5+
6+
.form-inline .form-control {
7+
display: inline-block;
8+
width: auto;
9+
vertical-align: middle;
10+
}
11+
12+
.form-row {
13+
display: flex;
14+
flex-wrap: wrap;
15+
margin-right: -5px;
16+
margin-left: -5px;
17+
}
18+
19+
.form-row > .col {
20+
padding-left: 5px;
21+
padding-right: 5px;
22+
}
23+
24+
label {
25+
margin-bottom: 0.5rem;
26+
}
227

328
@import '~bootstrap/scss/bootstrap.scss';

frontend/src/pages/registerUser.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class UserRegisterPage extends React.Component {
1515

1616
state = {
1717
username: null,
18+
displayName: null,
1819
mail: null,
1920
password: null,
2021
repeatPassword: null,
@@ -31,14 +32,15 @@ class UserRegisterPage extends React.Component {
3132
onRegister = event => {
3233
event.preventDefault();
3334

34-
const { username, mail, password, repeatPassword } = this.state;
35+
const { username, displayName, mail, password, repeatPassword } = this.state;
3536

3637
if(repeatPassword !== password) {
3738
return;
3839
}
3940

4041
const reqBody = {
4142
username,
43+
displayName,
4244
mail,
4345
password
4446
};
@@ -64,6 +66,7 @@ class UserRegisterPage extends React.Component {
6466
<h1 className="text-center">Register</h1>
6567
<form>
6668
{createInputField("Username", "username", "text", this.onFieldChange)}
69+
{createInputField("Display Name", "displayName", "text", this.onFieldChange)}
6770
{createInputField("E-Mail", "mail", "mail", this.onFieldChange)}
6871
{createInputField("Password", "password", "password", this.onFieldChange)}
6972
{createInputField("Repeat Password", "repeatPassword", "password", this.onFieldChange)}
@@ -74,8 +77,7 @@ class UserRegisterPage extends React.Component {
7477
</div>
7578
</form>
7679
</div>
77-
)
78-
;
80+
);
7981
}
8082

8183
}

0 commit comments

Comments
 (0)