|
|
@@ -11,14 +11,13 @@ const ArchiveCreateModal = (props) => {
|
|
|
const [isCommentDownload, setIsCommentDownload] = useState(false);
|
|
|
const [isFileDownload, setIsFileDownload] = useState(false);
|
|
|
const [isSubordinatedPageDownload, setIsSubordinatedPageDownload] = useState(false);
|
|
|
+
|
|
|
const [fileType, setFileType] = useState('markDown');
|
|
|
- const [hierarchyType, setHierarchyType] = useState('allSubordinatedPage');
|
|
|
- const [hierarchyValue, setHierarchyValue] = useState(1);
|
|
|
+
|
|
|
|
|
|
function changeIsCommentDownloadHandler() {
|
|
|
setIsCommentDownload(!isCommentDownload);
|
|
|
}
|
|
|
-
|
|
|
function changeIsFileDownloadHandler() {
|
|
|
setIsFileDownload(!isFileDownload);
|
|
|
}
|
|
|
@@ -42,17 +41,9 @@ const ArchiveCreateModal = (props) => {
|
|
|
[],
|
|
|
);
|
|
|
|
|
|
- function handleChangeSubordinatedType(hierarchyType) {
|
|
|
- setHierarchyType(hierarchyType);
|
|
|
- }
|
|
|
-
|
|
|
- function handleHierarchyDepth(hierarchyValue) {
|
|
|
- setHierarchyValue(hierarchyValue);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
return (
|
|
|
- <Modal isOpen={props.isOpen} toggle={closeModalHandler}>
|
|
|
+ <Modal size="lg" isOpen={props.isOpen} toggle={closeModalHandler}>
|
|
|
<ModalHeader tag="h4" toggle={closeModalHandler} className="bg-primary text-white">
|
|
|
{t('Create Archive Page')}
|
|
|
</ModalHeader>
|
|
|
@@ -102,7 +93,7 @@ const ArchiveCreateModal = (props) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div className="my-1 custom-control custom-checkbox custom-checkbox-info">
|
|
|
+ <div className="custom-control custom-checkbox custom-checkbox-warning">
|
|
|
<input
|
|
|
className="custom-control-input"
|
|
|
name="comment"
|
|
|
@@ -115,7 +106,7 @@ const ArchiveCreateModal = (props) => {
|
|
|
{t('Include Comment')}
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="my-1 custom-control custom-checkbox custom-checkbox-info">
|
|
|
+ <div className="custom-control custom-checkbox custom-checkbox-warning">
|
|
|
<input
|
|
|
className="custom-control-input"
|
|
|
id="downloadFile"
|
|
|
@@ -127,7 +118,7 @@ const ArchiveCreateModal = (props) => {
|
|
|
{t('Include Attachment File')}
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div className="my-1 custom-control custom-checkbox custom-checkbox-info">
|
|
|
+ <div className="custom-control custom-checkbox custom-checkbox-warning">
|
|
|
<input
|
|
|
className="custom-control-input"
|
|
|
id="subordinatedFile"
|
|
|
@@ -138,61 +129,6 @@ const ArchiveCreateModal = (props) => {
|
|
|
<label className="custom-control-label" htmlFor="subordinatedFile">
|
|
|
{t('Include Subordinated Page')}
|
|
|
</label>
|
|
|
- {isSubordinatedPageDownload && (
|
|
|
- <>
|
|
|
- <div className="FormGroup">
|
|
|
- <div className="my-1 custom-control custom-radio custom-control-inline ">
|
|
|
- <input
|
|
|
- type="radio"
|
|
|
- className="custom-control-input"
|
|
|
- id="customRadio3"
|
|
|
- name="isSubordinatedType"
|
|
|
- value="customRadio3"
|
|
|
- disabled={!isSubordinatedPageDownload}
|
|
|
- checked={hierarchyType === 'allSubordinatedPage'}
|
|
|
- onChange={() => {
|
|
|
- handleChangeSubordinatedType('allSubordinatedPage');
|
|
|
- }}
|
|
|
- />
|
|
|
- <label className="custom-control-label" htmlFor="customRadio3">
|
|
|
- {t('All Subordinated Page')}
|
|
|
- </label>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div className="FormGroup">
|
|
|
- <div className="my-1 custom-control custom-radio custom-control-inline">
|
|
|
- <input
|
|
|
- type="radio"
|
|
|
- className="custom-control-input"
|
|
|
- id="customRadio4"
|
|
|
- name="isSubordinatedType"
|
|
|
- value="customRadio4"
|
|
|
- disabled={!isSubordinatedPageDownload}
|
|
|
- checked={hierarchyType === 'decideHierarchy'}
|
|
|
- onChange={() => {
|
|
|
- handleChangeSubordinatedType('decideHierarchy');
|
|
|
- }}
|
|
|
- />
|
|
|
- <label className="my-1 custom-control-label" htmlFor="customRadio4">
|
|
|
- {t('Specify Hierarchy')}
|
|
|
- </label>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div className="my-1 custom-control costom-control-inline">
|
|
|
- <input
|
|
|
- type="number"
|
|
|
- min="0"
|
|
|
- max="10"
|
|
|
- disabled={hierarchyType === 'allSubordinatedPage'}
|
|
|
- value={hierarchyValue}
|
|
|
- placeholder="1"
|
|
|
- onChange={(e) => {
|
|
|
- handleHierarchyDepth(e.target.value);
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>
|
|
|
- </>
|
|
|
- )}
|
|
|
</div>
|
|
|
</ModalBody>
|
|
|
<ModalFooter>
|