|
|
@@ -26,6 +26,8 @@ const PageDuplicateModal = (props) => {
|
|
|
const [errorCode, setErrorCode] = useState(null);
|
|
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
|
|
|
|
+ const [isDuplicateWithChild, SetIsDuplicateWithChild] = useState(false);
|
|
|
+
|
|
|
/**
|
|
|
* change pageNameInput for PagePathAutoComplete
|
|
|
* @param {string} value
|
|
|
@@ -42,6 +44,10 @@ const PageDuplicateModal = (props) => {
|
|
|
setPageNameInput(value);
|
|
|
}
|
|
|
|
|
|
+ function changeIsDuplicateWithChildHandler() {
|
|
|
+ SetIsDuplicateWithChild(!isDuplicateWithChild);
|
|
|
+ }
|
|
|
+
|
|
|
async function duplicate() {
|
|
|
try {
|
|
|
setErrorCode(null);
|
|
|
@@ -96,6 +102,20 @@ const PageDuplicateModal = (props) => {
|
|
|
/>
|
|
|
)}
|
|
|
</div>
|
|
|
+
|
|
|
+ <div className="custom-control custom-checkbox custom-checkbox-warning">
|
|
|
+ <input
|
|
|
+ className="custom-control-input"
|
|
|
+ name="dupicateWithChild"
|
|
|
+ id="dupicateWithChild"
|
|
|
+ type="checkbox"
|
|
|
+ checked={isDuplicateWithChild}
|
|
|
+ onChange={changeIsDuplicateWithChildHandler}
|
|
|
+ />
|
|
|
+ <label className="form-group" htmlFor="duplicatePageName">
|
|
|
+ { t(' modal_duplicate.Duplicate with child') }
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</ModalBody>
|