@@ -21,6 +21,7 @@ const Filter = withLocal('filterPlaceholder')(require('../misc/Filter'));
2121const FormControl = withLocal ( 'placeholder' ) ( FormControlRB ) ;
2222
2323const ResizableModal = require ( '../misc/ResizableModal' ) ;
24+ const Portal = require ( '../misc/Portal' ) ;
2425const Message = require ( '../I18N/Message' ) ;
2526const HTML = require ( '../I18N/HTML' ) ;
2627
@@ -120,35 +121,37 @@ const StyleTemplates = ({
120121 selected : styleTemplate . styleId === selectedStyle ,
121122 disabled : loading
122123 } ) ) } />
123- < ResizableModal
124- show = { ! ! add }
125- fitContent
126- title = { < Message msgId = "styleeditor.createStyleModalTitle" /> }
127- onClose = { ( ) => onClose ( ) }
128- buttons = { [
129- {
130- text : < Message msgId = "save" /> ,
131- bsStyle : 'primary' ,
132- disabled : ! validateAlphaNumeric ( styleSettings ) ,
133- onClick : ( ) => onSave ( styleSettings )
134- }
135- ] } >
136- < Form >
137- < FormGroup controlId = "styleTitle" validationState = { ! validateAlphaNumeric ( styleSettings ) && 'error' } >
138- { formFields . map ( ( { title, placeholder, key} ) => ( < span key = { key } >
139- < ControlLabel > { title } </ ControlLabel >
140- < FormControl
141- type = "text"
142- defaultValue = { styleSettings [ key ] }
143- placeholder = { placeholder }
144- onChange = { event => onUpdate ( { ...styleSettings , [ key ] : event . target . value } ) } />
145- </ span > ) ) }
146- </ FormGroup >
147- { ! validateAlphaNumeric ( styleSettings ) && < Alert style = { { margin : 0 } } bsStyle = "danger" >
148- < HTML msgId = "styleeditor.titleRequired" />
149- </ Alert > }
150- </ Form >
151- </ ResizableModal >
124+ < Portal >
125+ < ResizableModal
126+ show = { ! ! add }
127+ fitContent
128+ title = { < Message msgId = "styleeditor.createStyleModalTitle" /> }
129+ onClose = { ( ) => onClose ( ) }
130+ buttons = { [
131+ {
132+ text : < Message msgId = "save" /> ,
133+ bsStyle : 'primary' ,
134+ disabled : ! validateAlphaNumeric ( styleSettings ) ,
135+ onClick : ( ) => onSave ( styleSettings )
136+ }
137+ ] } >
138+ < Form >
139+ < FormGroup controlId = "styleTitle" validationState = { ! validateAlphaNumeric ( styleSettings ) && 'error' } >
140+ { formFields . map ( ( { title, placeholder, key} ) => ( < span key = { key } >
141+ < ControlLabel > { title } </ ControlLabel >
142+ < FormControl
143+ type = "text"
144+ defaultValue = { styleSettings [ key ] }
145+ placeholder = { placeholder }
146+ onChange = { event => onUpdate ( { ...styleSettings , [ key ] : event . target . value } ) } />
147+ </ span > ) ) }
148+ </ FormGroup >
149+ { ! validateAlphaNumeric ( styleSettings ) && < Alert style = { { margin : 0 } } bsStyle = "danger" >
150+ < HTML msgId = "styleeditor.titleRequired" />
151+ </ Alert > }
152+ </ Form >
153+ </ ResizableModal >
154+ </ Portal >
152155 </ BorderLayout >
153156 ) ;
154157
0 commit comments