From 41933a83604a4ebb0bcbca577b68e4cc378fe227 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 14 Sep 2015 17:31:48 -0700 Subject: [PATCH] initial job form and job form nav --- .../routes/Jobs/components/CreateJobModal.jsx | 11 +++- common/app/routes/Jobs/components/NewJob.jsx | 56 +++++++++++++++++++ common/app/routes/Jobs/index.js | 4 ++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 common/app/routes/Jobs/components/NewJob.jsx diff --git a/common/app/routes/Jobs/components/CreateJobModal.jsx b/common/app/routes/Jobs/components/CreateJobModal.jsx index d3e6d34581..8a02400293 100644 --- a/common/app/routes/Jobs/components/CreateJobModal.jsx +++ b/common/app/routes/Jobs/components/CreateJobModal.jsx @@ -1,13 +1,21 @@ import React, { PropTypes } from 'react'; +import { History } from 'react-router'; import { Button, Modal } from 'react-bootstrap'; export default React.createClass({ displayName: 'CreateJobsModal', + propTypes: { onHide: PropTypes.func, showModal: PropTypes.bool }, + mixins: [History], + + goToNewJob() { + this.history.pushState(null, '/jobs/new'); + }, + render() { const { showModal, @@ -23,7 +31,8 @@ export default React.createClass({

We post jobs specifically target to our junior developers.

diff --git a/common/app/routes/Jobs/components/NewJob.jsx b/common/app/routes/Jobs/components/NewJob.jsx new file mode 100644 index 0000000000..a412ff6d7d --- /dev/null +++ b/common/app/routes/Jobs/components/NewJob.jsx @@ -0,0 +1,56 @@ +import React, { PropTypes } from 'react'; +import { contain } from 'thundercats-react'; +import { + Col, + Input, + Row, + Well +} from 'react-bootstrap'; + +export default contain({ + actions: 'jobActions', + store: 'jobsStore', + map({ form = {} }) { + return form; + } + }, + React.createClass({ + displayName: 'NewJob', + propTypes: { + jobActions: PropTypes.object + }, + render() { + return ( +
+ + + +

Create You Job Post

+
+ + + +
+
+ +
+
+ ); + } + }) +); diff --git a/common/app/routes/Jobs/index.js b/common/app/routes/Jobs/index.js index ac6b07f866..3564332d32 100644 --- a/common/app/routes/Jobs/index.js +++ b/common/app/routes/Jobs/index.js @@ -1,4 +1,5 @@ import Jobs from './components/Jobs.jsx'; +import NewJob from './components/NewJob.jsx'; import Show from './components/Show.jsx'; /* @@ -11,6 +12,9 @@ export default { childRoutes: [{ path: '/jobs', component: Jobs + }, { + path: 'jobs/new', + component: NewJob }, { path: 'jobs/:id', component: Show