mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-05 01:07:39 +02:00
Compare commits
2
Commits
main
...
raktima-patch-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e71924a264 | ||
|
|
4ae9748004 |
@@ -51,6 +51,7 @@ import LoaderWithMsg from "../primitives/LoaderWithMsg";
|
|||||||
import DownloadPdfZip from "../primitives/DownloadPdfZip";
|
import DownloadPdfZip from "../primitives/DownloadPdfZip";
|
||||||
import Loader from "../primitives/Loader";
|
import Loader from "../primitives/Loader";
|
||||||
import PdfDeclineModal from "../primitives/PdfDeclineModal";
|
import PdfDeclineModal from "../primitives/PdfDeclineModal";
|
||||||
|
import Agreement from "../primitives/Agreement";
|
||||||
|
|
||||||
function PdfRequestFiles(props) {
|
function PdfRequestFiles(props) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -137,6 +138,8 @@ function PdfRequestFiles(props) {
|
|||||||
const isHeader = useSelector((state) => state.showHeader);
|
const isHeader = useSelector((state) => state.showHeader);
|
||||||
const divRef = useRef(null);
|
const divRef = useRef(null);
|
||||||
const [isDownloadModal, setIsDownloadModal] = useState(false);
|
const [isDownloadModal, setIsDownloadModal] = useState(false);
|
||||||
|
const [isAgree, setIsAgree] = useState(false);
|
||||||
|
const [isAgreeTour, setIsAgreeTour] = useState(false);
|
||||||
|
|
||||||
const isMobile = window.innerWidth < 767;
|
const isMobile = window.innerWidth < 767;
|
||||||
|
|
||||||
@@ -1672,6 +1675,17 @@ function PdfRequestFiles(props) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
const AgreementTour = [
|
||||||
|
{
|
||||||
|
selector: '[data-tut="IsAgree"]',
|
||||||
|
content: "Please agree & continue to start signing",
|
||||||
|
position: "top",
|
||||||
|
style: { fontSize: "13px" }
|
||||||
|
}
|
||||||
|
];
|
||||||
|
const handleCloseAgreeTour = () => {
|
||||||
|
setIsAgreeTour(false);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<DndProvider backend={HTML5Backend}>
|
<DndProvider backend={HTML5Backend}>
|
||||||
<Title title={props.templateId ? "Public Sign" : "Request Sign"} />
|
<Title title={props.templateId ? "Public Sign" : "Request Sign"} />
|
||||||
@@ -1694,7 +1708,23 @@ function PdfRequestFiles(props) {
|
|||||||
) : handleError ? (
|
) : handleError ? (
|
||||||
<HandleError handleError={handleError} />
|
<HandleError handleError={handleError} />
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div onClick={() => !isAgree && setIsAgreeTour(true)}>
|
||||||
|
{!isAgree && (
|
||||||
|
<Agreement
|
||||||
|
setIsAgree={setIsAgree}
|
||||||
|
setIsAgreeTour={setIsAgreeTour}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<Tour
|
||||||
|
showNumber={false}
|
||||||
|
showNavigation={false}
|
||||||
|
showNavigationNumber={false}
|
||||||
|
onRequestClose={handleCloseAgreeTour}
|
||||||
|
steps={AgreementTour}
|
||||||
|
isOpen={isAgreeTour}
|
||||||
|
rounded={5}
|
||||||
|
closeWithMask={false}
|
||||||
|
/>
|
||||||
{isUiLoading && (
|
{isUiLoading && (
|
||||||
<div className="absolute h-[100vh] w-full flex flex-col justify-center items-center z-[999] bg-[#e6f2f2] bg-opacity-80">
|
<div className="absolute h-[100vh] w-full flex flex-col justify-center items-center z-[999] bg-[#e6f2f2] bg-opacity-80">
|
||||||
<Loader />
|
<Loader />
|
||||||
@@ -1713,6 +1743,7 @@ function PdfRequestFiles(props) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
pointerEvents:
|
pointerEvents:
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
|
function Agreement(props) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [isChecked, setIsChecked] = useState(false);
|
||||||
|
return (
|
||||||
|
<div className="flex justify-between mx-2 mb-2 pt-1" data-tut="IsAgree">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<input
|
||||||
|
className="mr-3 op-checkbox op-checkbox-m"
|
||||||
|
type="checkbox"
|
||||||
|
value={isChecked}
|
||||||
|
onChange={(e) => {
|
||||||
|
setIsChecked(e.target.checked);
|
||||||
|
if (e.target.checked) {
|
||||||
|
props.setIsAgreeTour(false);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
I confirm that I have read and understood the 'Electronic Record
|
||||||
|
and Signature Disclosure' and consent to use electronic records and
|
||||||
|
signatures.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex">
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
if (isChecked) {
|
||||||
|
props.setIsAgreeTour(false);
|
||||||
|
props.setIsAgree(true);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
className="op-btn op-btn-primary op-btn-sm"
|
||||||
|
>
|
||||||
|
Agree & Continue
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Agreement;
|
||||||
Reference in New Issue
Block a user