Browse Source

add disable

takeru0001 5 years ago
parent
commit
cc67f10f54
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/client/js/components/PageRenameModal.jsx

+ 7 - 1
src/client/js/components/PageRenameModal.jsx

@@ -226,7 +226,13 @@ const PageRenameModal = (props) => {
       </ModalBody>
       <ModalFooter>
         <ApiErrorMessageList errs={errs} targetPath={pageNameInput} />
-        <button type="button" className="btn btn-primary" onClick={rename}>Rename</button>
+        <button
+          type="button"
+          className="btn btn-primary"
+          onClick={rename}
+          disabled={(isRenameRecursively && isRenameRecursivelyWithoutExistPath && existingPaths.length !== 0)}
+        >Rename
+        </button>
       </ModalFooter>
     </Modal>
   );