Skip to content

🔥 The free & Open Source DocuSign alternative

fix: modal design of signature validation in both flow signyour-self and request-sign

RaktimaNXG0a5653f53d42
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index d082df880..fbda16dad 100644
--- a/apps/OpenSign/src/pages/PlaceHolderSign.js
+++ b/apps/OpenSign/src/pages/PlaceHolderSign.js
@@ -845,7 +845,7 @@ function PlaceHolderSign() {
});
}
}
- let notExistSignature = false; // variable is used to check a signature widget exit or not then execute other code
+ let isSignatureExist = true; // variable is used to check a signature widget exit or not then execute other code
//for loop is used to check signature widget exist or not
for (let item of filterPrefill) {
let signatureExist = false; // Reset for each iteration
@@ -860,7 +860,7 @@ function PlaceHolderSign() {
}
}
if (!signatureExist) {
- notExistSignature = true;
+ isSignatureExist = false;
const alert = {
mssg: "sure",
alert: true
@@ -875,7 +875,7 @@ function PlaceHolderSign() {
alert: true
};
setIsSendAlert(alert);
- } else if (!notExistSignature) {
+ } else if (isSignatureExist) {
if (filterPrefill.length === signersdata.length) {
const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId);
if (IsSignerNotExist && IsSignerNotExist?.length > 0) {
@@ -1713,8 +1713,8 @@ function PlaceHolderSign() {
>
{isSendAlert.mssg === "sure" ? (
<span>
- Please add at least one signature field for all
- recipients.
+ Please ensure there&apos;s at least one signature widget
+ added for all recipients.
</span>
) : isSendAlert.mssg === textWidget ? (
<p>Please confirm that you have filled the text field.</p>
diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js
index 63fb8e8b7..cafb5da33 100644
--- a/apps/OpenSign/src/pages/SignyourselfPdf.js
+++ b/apps/OpenSign/src/pages/SignyourselfPdf.js
@@ -637,6 +637,7 @@ function SignYourSelf() {
}
if (xyPostion.length === 0 || !isSignatureExist) {
setIsAlert({
+ header: "Fields required",
isShow: true,
alertMessage:
"Please ensure there's at least one signature widget added"
@@ -1170,7 +1171,7 @@ function SignYourSelf() {
<ModalUi
headerColor={"#dc3545"}
isOpen={isAlert.isShow}
- title={"Alert"}
+ title={isAlert?.header || "Alert"}
handleClose={() => {
setIsAlert({
isShow: false,
@@ -1190,18 +1191,6 @@ function SignYourSelf() {
marginBottom: "15px"
}}
></div>
- <button
- onClick={() => {
- setIsAlert({
- isShow: false,
- alertMessage: ""
- });
- }}
- type="button"
- className="finishBtn cancelBtn"
- >
- Ok
- </button>
</div>
</ModalUi>