|
|
@@ -46,7 +46,12 @@ class UserInviteModal extends React.Component {
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- <label> {t('admin:user_management.invite_modal.emails')}</label>
|
|
|
+ <label>{t('admin:user_management.invite_modal.emails')}</label>
|
|
|
+ <p>
|
|
|
+ {t('admin:user_management.invite_modal.description1')}
|
|
|
+ <br />
|
|
|
+ {t('admin:user_management.invite_modal.description2')}
|
|
|
+ </p>
|
|
|
<textarea
|
|
|
className="form-control"
|
|
|
placeholder="e.g. user1@growi.org user2@growi.org"
|
|
|
@@ -74,15 +79,25 @@ class UserInviteModal extends React.Component {
|
|
|
}
|
|
|
|
|
|
renderModalFooter() {
|
|
|
- const { t } = this.props;
|
|
|
+ const { t, appContainer } = this.props;
|
|
|
+ const { isMailerSetup } = appContainer.config;
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
<div className="col text-left custom-control custom-checkbox custom-checkbox-info text-left" onChange={this.handleCheckBox}>
|
|
|
- <input type="checkbox" id="sendEmail" className="custom-control-input" name="sendEmail" defaultChecked={this.state.sendEmail} />
|
|
|
+ <input
|
|
|
+ type="checkbox"
|
|
|
+ id="sendEmail"
|
|
|
+ className="custom-control-input"
|
|
|
+ name="sendEmail"
|
|
|
+ defaultChecked={this.state.sendEmail}
|
|
|
+ disabled={!isMailerSetup}
|
|
|
+ />
|
|
|
<label className="custom-control-label" htmlFor="sendEmail">
|
|
|
{t('admin:user_management.invite_modal.invite_thru_email')}
|
|
|
</label>
|
|
|
+ {/* eslint-disable-next-line react/no-danger */}
|
|
|
+ {!isMailerSetup && <p className="form-text text-muted" dangerouslySetInnerHTML={{ __html: t('admin:mailer_setup_required') }} />}
|
|
|
</div>
|
|
|
<div>
|
|
|
<button
|
|
|
@@ -90,7 +105,7 @@ class UserInviteModal extends React.Component {
|
|
|
className="btn btn-outline-secondary mr-2"
|
|
|
onClick={this.onToggleModal}
|
|
|
>
|
|
|
- Cancel
|
|
|
+ {t('Cancel')}
|
|
|
</button>
|
|
|
|
|
|
<button
|
|
|
@@ -99,7 +114,7 @@ class UserInviteModal extends React.Component {
|
|
|
onClick={this.handleSubmit}
|
|
|
disabled={!this.validEmail()}
|
|
|
>
|
|
|
- Invite
|
|
|
+ {t('admin:user_management.invite_modal.issue')}
|
|
|
</button>
|
|
|
</div>
|
|
|
</>
|
|
|
@@ -119,7 +134,7 @@ class UserInviteModal extends React.Component {
|
|
|
className="btn btn-outline-secondary"
|
|
|
onClick={this.onToggleModal}
|
|
|
>
|
|
|
- Close
|
|
|
+ {t('Close')}
|
|
|
</button>
|
|
|
</>
|
|
|
);
|