-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #465 from reportportal/develop
Release Contact us form validation
- Loading branch information
Showing
12 changed files
with
76 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
src/containers/ContactUsPage/ContactUsForm/FormInput/InputField/InputField.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import omit from 'lodash/omit'; | ||
|
||
import './InputField.scss'; | ||
|
||
export const InputField = ({ | ||
className, | ||
touched, | ||
error, | ||
value, | ||
label, | ||
initialValue, | ||
initialTouched, | ||
InputElement = 'input', | ||
initialError, | ||
...props | ||
}) => ( | ||
<div | ||
className={classNames('input-field', className, { | ||
error: touched && error, | ||
error, | ||
filled: value, | ||
})} | ||
> | ||
<label> | ||
{label} | ||
<InputElement className="input" value={value} {...props} /> | ||
<InputElement | ||
className="input" | ||
value={value} | ||
{...omit(props, ['touched', 'initialValue', 'initialTouched', 'initialError'])} | ||
/> | ||
</label> | ||
{touched && error ? <div className={classNames('error-message')}>{error}</div> : null} | ||
{error ? <div className={classNames('error-message')}>{error}</div> : null} | ||
</div> | ||
); |
10 changes: 0 additions & 10 deletions
10
src/containers/ContactUsPage/ContactUsForm/SalesForceFormBase/SalesForceFormBase.tsx
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
src/containers/ContactUsPage/ContactUsForm/SalesForceFormBase/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters