|
|
@@ -3,7 +3,12 @@
|
|
|
import React from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
|
import { withTranslation } from 'react-i18next';
|
|
|
-import Modal from 'react-bootstrap/es/Modal';
|
|
|
+import {
|
|
|
+ Modal,
|
|
|
+ ModalHeader,
|
|
|
+ ModalBody,
|
|
|
+ ModalFooter,
|
|
|
+} from 'reactstrap';
|
|
|
|
|
|
import GrowiArchiveImportOption from '@commons/models/admin/growi-archive-import-option';
|
|
|
|
|
|
@@ -62,26 +67,28 @@ class ImportCollectionConfigurationModal extends React.Component {
|
|
|
/* eslint-disable react/no-unescaped-entities */
|
|
|
return (
|
|
|
<>
|
|
|
- <div className="checkbox checkbox-warning">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt4"
|
|
|
type="checkbox"
|
|
|
checked={option.isOverwriteAuthorWithCurrentUser || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ isOverwriteAuthorWithCurrentUser: !option.isOverwriteAuthorWithCurrentUser })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt4">
|
|
|
+ <label htmlFor="cbOpt4" className="form-check-label">
|
|
|
{t(`${translationBase}.overwrite_author.label`)}
|
|
|
<p className="help-block mt-0" dangerouslySetInnerHTML={{ __html: t(`${translationBase}.overwrite_author.desc`) }} />
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="checkbox checkbox-warning">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt1"
|
|
|
type="checkbox"
|
|
|
checked={option.makePublicForGrant2 || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ makePublicForGrant2: !option.makePublicForGrant2 })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt1">
|
|
|
+ <label htmlFor="cbOpt1" className="form-check-label">
|
|
|
{t(`${translationBase}.set_public_to_page.label`, { from: t('Anyone with the link') })}
|
|
|
<p
|
|
|
className="help-block mt-0"
|
|
|
@@ -89,26 +96,28 @@ class ImportCollectionConfigurationModal extends React.Component {
|
|
|
/>
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="checkbox checkbox-warning">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt2"
|
|
|
type="checkbox"
|
|
|
checked={option.makePublicForGrant4 || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ makePublicForGrant4: !option.makePublicForGrant4 })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt2">
|
|
|
+ <label htmlFor="cbOpt2" className="form-check-label">
|
|
|
{t(`${translationBase}.set_public_to_page.label`, { from: t('Just me') })}
|
|
|
<p className="help-block mt-0" dangerouslySetInnerHTML={{ __html: t(`${translationBase}.set_public_to_page.desc`, { from: t('Just me') }) }} />
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="checkbox checkbox-warning">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt3"
|
|
|
type="checkbox"
|
|
|
checked={option.makePublicForGrant5 || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ makePublicForGrant5: !option.makePublicForGrant5 })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt3">
|
|
|
+ <label htmlFor="cbOpt3" className="form-check-label">
|
|
|
{t(`${translationBase}.set_public_to_page.label`, { from: t('Only inside the group') })}
|
|
|
<p
|
|
|
className="help-block mt-0"
|
|
|
@@ -116,26 +125,28 @@ class ImportCollectionConfigurationModal extends React.Component {
|
|
|
/>
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="checkbox checkbox-default">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt5"
|
|
|
type="checkbox"
|
|
|
checked={option.initPageMetadatas || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ initPageMetadatas: !option.initPageMetadatas })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt5">
|
|
|
+ <label htmlFor="cbOpt5" className="form-check-label">
|
|
|
{t(`${translationBase}.initialize_meta_datas.label`)}
|
|
|
<p className="help-block mt-0" dangerouslySetInnerHTML={{ __html: t(`${translationBase}.initialize_meta_datas.desc`) }} />
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="checkbox checkbox-default">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt6"
|
|
|
type="checkbox"
|
|
|
checked={option.initHackmdDatas || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ initHackmdDatas: !option.initHackmdDatas })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt6">
|
|
|
+ <label htmlFor="cbOpt6" className="form-check-label">
|
|
|
{t(`${translationBase}.initialize_hackmd_related_datas.label`)}
|
|
|
<p className="help-block mt-0" dangerouslySetInnerHTML={{ __html: t(`${translationBase}.initialize_hackmd_related_datas.desc`) }} />
|
|
|
</label>
|
|
|
@@ -154,14 +165,15 @@ class ImportCollectionConfigurationModal extends React.Component {
|
|
|
/* eslint-disable react/no-unescaped-entities */
|
|
|
return (
|
|
|
<>
|
|
|
- <div className="checkbox checkbox-warning">
|
|
|
+ <div className="form-check">
|
|
|
<input
|
|
|
id="cbOpt1"
|
|
|
type="checkbox"
|
|
|
checked={option.isOverwriteAuthorWithCurrentUser || false} // add ' || false' to avoid uncontrolled input warning
|
|
|
onChange={() => this.changeHandler({ isOverwriteAuthorWithCurrentUser: !option.isOverwriteAuthorWithCurrentUser })}
|
|
|
+ className="form-check-input"
|
|
|
/>
|
|
|
- <label htmlFor="cbOpt1">
|
|
|
+ <label htmlFor="cbOpt1" className="form-check-label">
|
|
|
{t(`${translationBase}.overwrite_author.label`)}
|
|
|
<p className="help-block mt-0" dangerouslySetInnerHTML={{ __html: t(`${translationBase}.overwrite_author.desc`) }} />
|
|
|
</label>
|
|
|
@@ -188,19 +200,19 @@ class ImportCollectionConfigurationModal extends React.Component {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <Modal show={this.props.isOpen} onHide={this.props.onClose} onEnter={this.initialize}>
|
|
|
- <Modal.Header closeButton>
|
|
|
- <Modal.Title>{`'${collectionName}'`} Configuration</Modal.Title>
|
|
|
- </Modal.Header>
|
|
|
+ <Modal isOpen={this.props.isOpen} toggle={this.props.onClose} onEnter={this.initialize}>
|
|
|
+ <ModalHeader toggle={this.props.onClose}>
|
|
|
+ {`'${collectionName}'`} Configuration
|
|
|
+ </ModalHeader>
|
|
|
|
|
|
- <Modal.Body>
|
|
|
+ <ModalBody>
|
|
|
{contents}
|
|
|
- </Modal.Body>
|
|
|
+ </ModalBody>
|
|
|
|
|
|
- <Modal.Footer>
|
|
|
- <button type="button" className="btn btn-sm btn-default" onClick={this.props.onClose}>{t('Cancel')}</button>
|
|
|
+ <ModalFooter>
|
|
|
+ <button type="button" className="btn btn-sm page-link text-dark d-inline-block" onClick={this.props.onClose}>{t('Cancel')}</button>
|
|
|
<button type="button" className="btn btn-sm btn-primary" onClick={this.updateOption}>{t('Update')}</button>
|
|
|
- </Modal.Footer>
|
|
|
+ </ModalFooter>
|
|
|
</Modal>
|
|
|
);
|
|
|
}
|