Skip to content

Commit e47211a

Browse files
Merge pull request #701 from OpenSignLabs/raktima-opensignlabs-patch-1
fix: modal design of signature validation in both flow signyour-self and request-sign
2 parents 5a90a0f + 4a4c9ea commit e47211a

File tree

2 files changed

+7
-28
lines changed

2 files changed

+7
-28
lines changed

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ function PlaceHolderSign() {
845845
});
846846
}
847847
}
848-
let notExistSignature = false; // variable is used to check a signature widget exit or not then execute other code
848+
let isSignatureExist = true; // variable is used to check a signature widget exit or not then execute other code
849849
//for loop is used to check signature widget exist or not
850850
for (let item of filterPrefill) {
851851
let signatureExist = false; // Reset for each iteration
@@ -860,7 +860,7 @@ function PlaceHolderSign() {
860860
}
861861
}
862862
if (!signatureExist) {
863-
notExistSignature = true;
863+
isSignatureExist = false;
864864
const alert = {
865865
mssg: "sure",
866866
alert: true
@@ -875,7 +875,7 @@ function PlaceHolderSign() {
875875
alert: true
876876
};
877877
setIsSendAlert(alert);
878-
} else if (!notExistSignature) {
878+
} else if (isSignatureExist) {
879879
if (filterPrefill.length === signersdata.length) {
880880
const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId);
881881
if (IsSignerNotExist && IsSignerNotExist?.length > 0) {
@@ -1713,8 +1713,8 @@ function PlaceHolderSign() {
17131713
>
17141714
{isSendAlert.mssg === "sure" ? (
17151715
<span>
1716-
Please add at least one signature field for all
1717-
recipients.
1716+
Please ensure there&apos;s at least one signature widget
1717+
added for all recipients.
17181718
</span>
17191719
) : isSendAlert.mssg === textWidget ? (
17201720
<p>Please confirm that you have filled the text field.</p>

apps/OpenSign/src/pages/SignyourselfPdf.js

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ function SignYourSelf() {
637637
}
638638
if (xyPostion.length === 0 || !isSignatureExist) {
639639
setIsAlert({
640+
header: "Fields required",
640641
isShow: true,
641642
alertMessage:
642643
"Please ensure there's at least one signature widget added"
@@ -1170,7 +1171,7 @@ function SignYourSelf() {
11701171
<ModalUi
11711172
headerColor={"#dc3545"}
11721173
isOpen={isAlert.isShow}
1173-
title={"Alert"}
1174+
title={isAlert?.header || "Alert"}
11741175
handleClose={() => {
11751176
setIsAlert({
11761177
isShow: false,
@@ -1180,28 +1181,6 @@ function SignYourSelf() {
11801181
>
11811182
<div style={{ height: "100%", padding: 20 }}>
11821183
<p>{isAlert.alertMessage}</p>
1183-
1184-
<div
1185-
style={{
1186-
height: "1px",
1187-
backgroundColor: "#9f9f9f",
1188-
width: "100%",
1189-
marginTop: "15px",
1190-
marginBottom: "15px"
1191-
}}
1192-
></div>
1193-
<button
1194-
onClick={() => {
1195-
setIsAlert({
1196-
isShow: false,
1197-
alertMessage: ""
1198-
});
1199-
}}
1200-
type="button"
1201-
className="finishBtn cancelBtn"
1202-
>
1203-
Ok
1204-
</button>
12051184
</div>
12061185
</ModalUi>
12071186

0 commit comments

Comments
 (0)