ソースを参照

fix rename appended to attachment

zahmis 5 年 前
コミット
b87481fa3a

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

@@ -12,7 +12,7 @@ import { toastSuccess, toastError } from '../util/apiNotification';
 const ArchiveCreateModal = (props) => {
   const { t, appContainer } = props;
   const [isCommentDownload, setIsCommentDownload] = useState(false);
-  const [isAppendedFileDownload, setIsAppendedFileDownload] = useState(false);
+  const [isAttachmentFileDownload, setIsAttachmentFileDownload] = useState(false);
   const [isSubordinatedPageDownload, setIsSubordinatedPageDownload] = useState(false);
   const [fileType, setFileType] = useState('markDown');
   const [hierarchyType, setHierarchyType] = useState('allSubordinatedPage');
@@ -22,8 +22,8 @@ const ArchiveCreateModal = (props) => {
     setIsCommentDownload(!isCommentDownload);
   }
 
-  function changeIsAppendedFileDownloadHandler() {
-    setIsAppendedFileDownload(!isAppendedFileDownload);
+  function changeIsAttachmentFileDownloadHandler() {
+    setIsAttachmentFileDownload(!isAttachmentFileDownload);
   }
 
   function changeIsSubordinatedPageDownloadHandler() {
@@ -58,7 +58,7 @@ const ArchiveCreateModal = (props) => {
     try {
       await appContainer.apiv3Post('/page/archive', {
         isCommentDownload,
-        isAppendedFileDownload,
+        isAttachmentFileDownload,
         isSubordinatedPageDownload,
         fileType,
         hierarchyType,
@@ -140,8 +140,8 @@ const ArchiveCreateModal = (props) => {
             className="custom-control-input"
             id="downloadFile"
             type="checkbox"
-            checked={isAppendedFileDownload}
-            onChange={changeIsAppendedFileDownloadHandler}
+            checked={isAttachmentFileDownload}
+            onChange={changeIsAttachmentFileDownloadHandler}
           />
           <label className="custom-control-label" htmlFor="downloadFile">
             {t('Include Attachment File')}

+ 3 - 3
src/server/routes/apiv3/page.js

@@ -127,7 +127,7 @@ module.exports = (crowi) => {
 
     archive: [
       body('isCommentDownload').isBoolean(),
-      body('isAppendedFileDownload').isBoolean(),
+      body('isAttachmentFileDownload').isBoolean(),
       body('isSubordinatedPageDownload').isBoolean(),
       body('fileType').isString().isIn(['pdf', 'markDown']),
       body('hierarchyType').isString().isIn(['allSubordinatedPage', 'decideHierarchy']),
@@ -195,7 +195,7 @@ module.exports = (crowi) => {
 
     const {
       isCommentDownload,
-      isAppendedFileDownload,
+      isAttachmentFileDownload,
       isSubordinatedPageDownload,
       fileType,
       hierarchyType,
@@ -204,7 +204,7 @@ module.exports = (crowi) => {
 
 
     console.log(isCommentDownload);
-    console.log(isAppendedFileDownload);
+    console.log(isAttachmentFileDownload);
     console.log(fileType);
     console.log(isSubordinatedPageDownload);
     console.log(hierarchyType);