Просмотр исходного кода

Revert "Merge branch 'create-radio-button-under-subordinated-page-button' into feat/bulk-export-pages-for-merge"

This reverts commit 1dcc0632b5612739c9078f228db9671992352443, reversing
changes made to c6114b862873d031e9da8bc0c75710b8974e15ed.
zahmis 5 лет назад
Родитель
Сommit
53c2ba4525

+ 0 - 2
resource/locales/en_US/translation.json

@@ -54,8 +54,6 @@
   "Include Attachment File": "Include Attachment File",
   "Include Comment": "Include Comment",
   "Include Subordinated Page": "Include Subordinated Page",
-  "All Subordinated Page": "All Subordinated Page",
-  "Specify Hierarchy": "Specify Hierarchy",
   "username": "Username",
   "Created": "Created",
   "Last updated": "Updated",

+ 0 - 2
resource/locales/ja_JP/translation.json

@@ -54,8 +54,6 @@
   "Include Attachment File": "添付ファイルも含める",
   "Include Comment": "コメントも含める",
   "Include Subordinated Page": "配下ページも含める",
-  "All Subordinated Page": "全ての配下ページ",
-  "Specify Hierarchy": "階層の深さを指定",
   "username": "ユーザー名",
   "Created": "作成日",
   "Last updated": "最終更新",

+ 6 - 70
src/client/js/components/ArchiveCreateModal.jsx

@@ -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>