Format the error messages for registering
This commit is contained in:
parent
4490cd0774
commit
f97fc23a4c
|
|
@ -21,9 +21,9 @@ import {
|
||||||
} from '../js/api';
|
} from '../js/api';
|
||||||
|
|
||||||
import '../static/everypage.css';
|
import '../static/everypage.css';
|
||||||
|
import '../static/css/errormessages.css';
|
||||||
|
|
||||||
export default class RegisterPage extends React.Component {
|
export default class RegisterPage extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="main generic-fullpage-bg">
|
<div className="main generic-fullpage-bg">
|
||||||
|
|
@ -42,7 +42,6 @@ export default class RegisterPage extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Register extends React.Component {
|
class Register extends React.Component {
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
clearErrors();
|
clearErrors();
|
||||||
}
|
}
|
||||||
|
|
@ -69,11 +68,9 @@ class RegisterErrorList extends React.Component {
|
||||||
const { error, errorMessages } = this.props;
|
const { error, errorMessages } = this.props;
|
||||||
if(error) {
|
if(error) {
|
||||||
return (
|
return (
|
||||||
<ul className='text-danger mt-3'>
|
<ul className="mt-3 error-box">
|
||||||
{ errorMessages.map((message, index) =>
|
{ errorMessages.map((message, index) =>
|
||||||
<li key={index}>
|
<li key={index}>{message}</li>
|
||||||
{message}
|
|
||||||
</li>
|
|
||||||
) }
|
) }
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
|
|
@ -93,7 +90,6 @@ const VisibleRegisterErrorList = connect(
|
||||||
)(RegisterErrorList);
|
)(RegisterErrorList);
|
||||||
|
|
||||||
class RegisterForm extends React.Component {
|
class RegisterForm extends React.Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
.error-box {
|
||||||
|
border: 2px solid #dc3545;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
padding-right: 16px;
|
||||||
|
padding-left: 16px;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-box > li {
|
||||||
|
color: #dc3545;
|
||||||
|
margin-right: 36px;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-box > li:last-child {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue