diff --git a/common/app/routes/Jobs/components/NewJob.jsx b/common/app/routes/Jobs/components/NewJob.jsx index 83f773e05d..ae1e5eab51 100644 --- a/common/app/routes/Jobs/components/NewJob.jsx +++ b/common/app/routes/Jobs/components/NewJob.jsx @@ -8,7 +8,8 @@ import { } from 'react-bootstrap'; import { isAscii, - isEmail + isEmail, + isMobilePhone } from 'validator'; const defaults = { @@ -31,13 +32,15 @@ export default contain({ position = defaultValue('string'), locale = defaultValue('string'), description = defaultValue('string'), - email = defaultValue('string') + email = defaultValue('string'), + phone = defaultValue('string') } = form; return { position, locale, description, - email + email, + phone }; } }, @@ -49,17 +52,25 @@ export default contain({ position: PropTypes.object, locale: PropTypes.object, description: PropTypes.object, - email: PropTypes.object + email: PropTypes.object, + phone: PropTypes.object + }, + + handleChange(name, validator, { target: { value } }) { + const { jobActions: { handleForm } } = this.props; + handleForm({ name, value, validator }); }, render() { const { - jobActions, position, locale, description, - email + email, + phone } = this.props; + const labelClass = 'col-sm-offset-1 col-sm-2'; + const inputClass = 'col-sm-6'; return (