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

add check box delete_recursively

itizawa 5 лет назад
Родитель
Сommit
4a6d97d792

+ 1 - 1
resource/locales/en-US/translation.json

@@ -281,7 +281,7 @@
     "delete_recursively": "Delete child pages recursively.",
     "delete_completely": "Delete completely",
     "delete_completely_restriction": "You don't have the authority to delete pages completely.",
-    "recursively": "Delete children of <code>%s</code> recursively.",
+    "recursively": "Delete pages under this path recursively.",
     "completely": "Delete completely instead of putting it into trash."
   },
   "modal_empty":{

+ 1 - 1
resource/locales/ja/translation.json

@@ -279,7 +279,7 @@
     "delete_recursively": "全ての子ページも削除",
     "delete_completely": "完全削除",
     "delete_completely_restriction": "完全削除をするための権限がありません。",
-    "recursively": "<code>%s</code> 配下のページも削除します",
+    "recursively": "配下のページも削除します",
     "completely": "ゴミ箱を経由せず、完全に削除します"
   },
   "modal_empty":{

+ 7 - 0
src/client/js/components/PageDeleteModal.jsx

@@ -42,6 +42,13 @@ const PageDeleteModal = (props) => {
           <label>{ t('modal_delete.deleting_page') }:</label><br />
           <code>{ path }</code>
         </div>
+        <div className="custom-control custom-checkbox custom-checkbox-warning">
+          <input className="custom-control-input" name="recursively" id="cbDeleteRecursively" value="1" type="checkbox" checked />
+          <label className="custom-control-label" htmlFor="cbDeleteRecursively">
+            { t('modal_delete.delete_recursively') }
+            <p className="form-text text-muted mt-0"><code>{path}</code> { t('modal_delete.recursively') }</p>
+          </label>
+        </div>
       </ModalBody>
       <ModalFooter>
         <button type="button" className={`m-l-10 btn btn-${deleteIconAndKey[deleteMode].color}`} onClick={onClickSubmit}>