@@ -16,6 +16,7 @@ import PropTypes from 'prop-types'
1616import { connect } from 'react-redux'
1717
1818import { getTagsWithPage } from 'actions/tickets'
19+ import { showModal , hideModal } from 'actions/common'
1920
2021import BaseModal from 'containers/Modals/BaseModal'
2122import Button from 'components/Button'
@@ -39,6 +40,14 @@ class AddTagsModal extends React.Component {
3940$ ( this . select ) . trigger ( 'chosen:updated' )
4041}
4142
43+ onCreateTagClicked ( e ) {
44+ e . preventDefault ( )
45+ this . props . hideModal ( )
46+ setTimeout ( ( ) => {
47+ this . props . showModal ( 'CREATE_TAG' )
48+ } , 300 )
49+ }
50+
4251onSubmit ( e ) {
4352e . preventDefault ( )
4453let selectedTags = $ ( e . target . tags ) . val ( )
@@ -108,7 +117,7 @@ class AddTagsModal extends React.Component {
108117</ option >
109118) ) }
110119</ select >
111- < button type = 'button' style = { { borderRadius :0 } } >
120+ < button type = 'button' style = { { borderRadius :0 } } onClick = { e => this . onCreateTagClicked ( e ) } >
112121< i className = 'material-icons' style = { { marginRight :0 } } >
113122 add
114123</ i >
@@ -151,12 +160,14 @@ AddTagsModal.propTypes = {
151160currentTags :PropTypes . array ,
152161tagsSettings :PropTypes . object . isRequired ,
153162getTagsWithPage :PropTypes . func . isRequired ,
154- socket :PropTypes . object . isRequired
163+ socket :PropTypes . object . isRequired ,
164+ showModal :PropTypes . func . isRequired ,
165+ hideModal :PropTypes . func . isRequired
155166}
156167
157168const mapStateToProps = state => ( {
158169tagsSettings :state . tagsSettings ,
159170socket :state . shared . socket
160171} )
161172
162- export default connect ( mapStateToProps , { getTagsWithPage} ) ( AddTagsModal )
173+ export default connect ( mapStateToProps , { getTagsWithPage, showModal , hideModal } ) ( AddTagsModal )