diff options
Diffstat (limited to 'webapp/components/invite_member_modal.jsx')
-rw-r--r-- | webapp/components/invite_member_modal.jsx | 114 |
1 files changed, 59 insertions, 55 deletions
diff --git a/webapp/components/invite_member_modal.jsx b/webapp/components/invite_member_modal.jsx index 4ac620f08..96a9eb75d 100644 --- a/webapp/components/invite_member_modal.jsx +++ b/webapp/components/invite_member_modal.jsx @@ -6,7 +6,7 @@ import * as utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; const ActionTypes = Constants.ActionTypes; import Client from 'utils/web_client.jsx'; -import * as GlobalActions from 'action_creators/global_actions.jsx'; +import * as GlobalActions from 'actions/global_actions.jsx'; import ModalStore from 'stores/modal_store.jsx'; import UserStore from 'stores/user_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; @@ -258,15 +258,17 @@ class InviteMemberModal extends React.Component { var removeButton = null; if (index) { - removeButton = (<div> - <button - type='button' - className='btn btn-link remove__member' - onClick={this.removeInviteFields.bind(this, index)} - > - <span className='fa fa-trash'></span> - </button> - </div>); + removeButton = ( + <div> + <button + type='button' + className='btn btn-link remove__member' + onClick={this.removeInviteFields.bind(this, index)} + > + <span className='fa fa-trash'></span> + </button> + </div> + ); } var emailClass = 'form-group invite'; if (emailError) { @@ -283,54 +285,56 @@ class InviteMemberModal extends React.Component { if (lastNameError) { lastNameClass += ' has-error'; } - nameFields = (<div className='row--invite'> - <div className='col-sm-6'> - <div className={firstNameClass}> - <input - type='text' - className='form-control' - ref={'first_name' + index} - placeholder={formatMessage(holders.firstname)} - maxLength='64' - disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} - spellCheck='false' - /> - {firstNameError} - </div> - </div> - <div className='col-sm-6'> - <div className={lastNameClass}> - <input - type='text' - className='form-control' - ref={'last_name' + index} - placeholder={formatMessage(holders.lastname)} - maxLength='64' - disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} - spellCheck='false' - /> - {lastNameError} - </div> - </div> - </div>); + nameFields = ( + <div className='row--invite'> + <div className='col-sm-6'> + <div className={firstNameClass}> + <input + type='text' + className='form-control' + ref={'first_name' + index} + placeholder={formatMessage(holders.firstname)} + maxLength='64' + disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} + spellCheck='false' + /> + {firstNameError} + </div> + </div> + <div className='col-sm-6'> + <div className={lastNameClass}> + <input + type='text' + className='form-control' + ref={'last_name' + index} + placeholder={formatMessage(holders.lastname)} + maxLength='64' + disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} + spellCheck='false' + /> + {lastNameError} + </div> + </div> + </div> + ); inviteSections[index] = ( <div key={'key' + index}> - {removeButton} - <div className={emailClass}> - <input - onKeyUp={this.displayNameKeyUp} - type='text' - ref={'email' + index} - className='form-control' - placeholder='email@domain.com' - maxLength='64' - disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} - spellCheck='false' - /> - {emailError} - </div> - {nameFields} + {removeButton} + <div className={emailClass}> + <input + onKeyUp={this.displayNameKeyUp} + type='text' + ref={'email' + index} + className='form-control' + placeholder='email@domain.com' + maxLength='64' + disabled={!this.state.emailEnabled || !this.state.userCreationEnabled} + spellCheck='false' + /> + {emailError} + </div> + {nameFields} </div> ); } |