Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
5f857c42
Commit
5f857c42
authored
4 years ago
by
William Enright
Committed by
Larbi Gharib
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed user profile fields being marked as required
Change-Id: I4b15e1d4dc4641dd997c1ea1a4dfe27c1f30bd21
parent
2f89cea3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-react-client/src/views/UserProfile/EditCreateUserProfile.js
+8
-19
8 additions, 19 deletions
...act-client/src/views/UserProfile/EditCreateUserProfile.js
with
8 additions
and
19 deletions
jams-react-client/src/views/UserProfile/EditCreateUserProfile.js
+
8
−
19
View file @
5f857c42
...
...
@@ -299,14 +299,6 @@ export default function EditCreateUserProfile(props) {
*
* */
const
validateFieldInput
=
fieldinput
=>
{
let
error
;
if
(
!
fieldinput
)
{
error
=
'
Required
'
;
}
return
error
;
}
const
validateUsername
=
usernamevalue
=>
{
handleUserExists
(
usernamevalue
)
let
error
;
...
...
@@ -318,10 +310,7 @@ export default function EditCreateUserProfile(props) {
const
validateEmail
=
emailvalue
=>
{
let
error
;
if
(
!
emailvalue
)
{
error
=
'
Required
'
;
}
else
if
(
!
/^
[
A-Z0-9._%+-
]
+@
[
A-Z0-9.-
]
+
\.[
A-Z
]{2,4}
$/i
.
test
(
emailvalue
))
{
if
(
!
/^
[
A-Z0-9._%+-
]
+@
[
A-Z0-9.-
]
+
\.[
A-Z
]{2,4}
$/i
.
test
(
emailvalue
))
{
error
=
'
Invalid email address
'
;
}
return
error
;
...
...
@@ -482,7 +471,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
firstname
"
>
First
Name
<
/InputLabel
>
<
Field
name
=
"
firstname
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
firstname
"
>
{({
field
})
=>
(
<
Input
id
=
"
firstname
"
...
...
@@ -504,7 +493,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
lastname
"
>
Last
Name
<
/InputLabel
>
<
Field
name
=
"
lastname
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
lastname
"
>
{({
field
})
=>
(
<
Input
id
=
"
lastname
"
...
...
@@ -548,7 +537,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
organization
"
>
Organisation
<
/InputLabel
>
<
Field
name
=
"
organization
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
organization
"
>
{({
field
})
=>
(
<
Input
id
=
"
organization
"
...
...
@@ -570,7 +559,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
phonenumber
"
>
Phone
Number
<
/InputLabel
>
<
Field
name
=
"
phonenumber
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
phonenumber
"
>
{({
field
})
=>
(
<
Input
id
=
"
phonenumber
"
...
...
@@ -592,7 +581,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
extension
"
>
Extension
<
/InputLabel
>
<
Field
name
=
"
extension
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
extension
"
>
{({
field
})
=>
(
<
Input
id
=
"
extension
"
...
...
@@ -614,7 +603,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
faxnumber
"
>
Fax
Number
<
/InputLabel
>
<
Field
name
=
"
faxnumber
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
faxnumber
"
>
{({
field
})
=>
(
<
Input
id
=
"
faxnumber
"
...
...
@@ -636,7 +625,7 @@ export default function EditCreateUserProfile(props) {
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
FormControl
className
=
{
classes
.
margin
}
fullWidth
>
<
InputLabel
htmlFor
=
"
mobilephonenumber
"
>
Mobile
Phonenumber
<
/InputLabel
>
<
Field
name
=
"
mobilephonenumber
"
validate
=
{
validateFieldInput
}
>
<
Field
name
=
"
mobilephonenumber
"
>
{({
field
})
=>
(
<
Input
id
=
"
mobilephonenumber
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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