Add goback and checkout buttons to preview job

This commit is contained in:
Berkeley Martinez
2015-10-12 17:12:38 -07:00
parent 1f16d6f5d9
commit 4577a007f2
4 changed files with 43 additions and 5 deletions

View File

@ -143,7 +143,7 @@ export default contain({
// sanitize user output
const jobValues = {
position: inHTMLData(position.value),
location: inHTMLData(locale.value),
locale: inHTMLData(locale.value),
description: inHTMLData(description.value),
email: inHTMLData(email.value),
phone: inHTMLData(phone.value),

View File

@ -1,4 +1,6 @@
// import React, { PropTypes } from 'react';
import React, { PropTypes } from 'react';
import { History } from 'react-router';
import { Well, Button, Row } from 'react-bootstrap';
import { contain } from 'thundercats-react';
import ShowJob from './ShowJob.jsx';
@ -10,5 +12,37 @@ export default contain(
return { job };
}
},
ShowJob
React.createClass({
displayName: 'Preview',
mixins: [History],
propTypes: {
job: PropTypes.object
},
render() {
const { job } = this.props;
const { history } = this;
return (
<div>
<ShowJob job={ job } />
<Row>
<Well>
<Button
block={ true }
className='signup-btn' >
Looks great! Let's Check Out
</Button>
<Button
block={ true }
onClick={ () => history.goBack() } >
Head back and make edits
</Button>
</Well>
</Row>
</div>
);
}
})
);

View File

@ -57,7 +57,6 @@ export default Actions({
saveForm: null,
getSavedForm: null,
setForm(form) {
form.locale = form.location;
return { form };
}
})

View File

@ -36,8 +36,13 @@
"country": {
"type": "string"
},
"locale": {
"type": "string",
"description": "format: city, state"
},
"location": {
"type": "geopoint"
"type": "geopoint",
"description": "location in lat, long"
},
"description": {
"type": "string"