Skip to content

Commit d94527e

Browse files
authored
Merge branch 'staging' into issue/204
2 parents 1b3508a + 8c8015f commit d94527e

File tree

8 files changed

+92
-43
lines changed

8 files changed

+92
-43
lines changed

apps/OpenSign/src/components/AppendFormInForm.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -241,39 +241,37 @@ const AppendFormInForm = (props) => {
241241
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
242242
/>
243243
</div>
244-
245244
<div className="mb-3">
246245
<label
247-
htmlFor="phone"
246+
htmlFor="email"
248247
className="block text-xs text-gray-700 font-semibold"
249248
>
250-
Phone
249+
Email
251250
<span style={{ color: "red", fontSize: 13 }}> *</span>
252251
</label>
253252
<input
254-
type="text"
255-
id="phone"
256-
value={phone}
257-
onChange={(e) => setPhone(e.target.value)}
253+
type="email"
254+
id="email"
255+
value={email}
256+
onChange={(e) => setEmail(e.target.value)}
258257
required
259258
disabled={addYourself}
260259
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
261260
/>
262261
</div>
263-
264262
<div className="mb-3">
265263
<label
266-
htmlFor="email"
264+
htmlFor="phone"
267265
className="block text-xs text-gray-700 font-semibold"
268266
>
269-
Email
267+
Phone
270268
<span style={{ color: "red", fontSize: 13 }}> *</span>
271269
</label>
272270
<input
273-
type="email"
274-
id="email"
275-
value={email}
276-
onChange={(e) => setEmail(e.target.value)}
271+
type="text"
272+
id="phone"
273+
value={phone}
274+
onChange={(e) => setPhone(e.target.value)}
277275
required
278276
disabled={addYourself}
279277
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"

apps/OpenSignServer/cloud/parsefunction/pdf/customSignPdf/pdfkitAddPlaceholder.min.js

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

microfrontends/SignDocuments/package-lock.json

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

microfrontends/SignDocuments/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"react-scrollbars-custom": "^4.1.1",
3333
"react-signature-canvas": "^1.0.6",
3434
"reactour": "^1.19.1",
35+
"select-dom": "^9.0.0",
3536
"web-vitals": "^2.1.4"
3637
},
3738
"scripts": {

microfrontends/SignDocuments/src/Component/SignYourselfPdf.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import Nodata from "./component/Nodata";
2525
import Header from "./component/header";
2626
import RenderPdf from "./component/renderPdf";
2727
import { contractUsers, contactBook, urlValidator } from "../utils/Utils";
28+
import { modalAlign } from "../utils/Utils";
29+
import { $ } from 'select-dom';
2830
//For signYourself inProgress section signer can add sign and complete doc sign.
2931
function SignYourSelf() {
3032
const [pdfDetails, setPdfDetails] = useState([]);
@@ -1020,7 +1022,11 @@ function SignYourSelf() {
10201022
>
10211023
{/* this modal is used show this document is already sign */}
10221024

1023-
<Modal show={showAlreadySignDoc.status}>
1025+
<Modal
1026+
show={showAlreadySignDoc.status}
1027+
onShow={() => modalAlign()}
1028+
backdropClassName="signature-backdrop"
1029+
>
10241030
<ModalHeader style={{ background: themeColor() }}>
10251031
<span style={{ color: "white" }}> Sign Documents</span>
10261032
</ModalHeader>

microfrontends/SignDocuments/src/Component/recipientSignPdf.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import Nodata from "./component/Nodata";
2828
import Header from "./component/header";
2929
import RenderPdf from "./component/renderPdf";
3030
import CustomModal from "./component/CustomModal";
31+
import { modalAlign } from "../utils/Utils";
3132
function EmbedPdfImage() {
3233
const { id, contactBookId } = useParams();
3334
const [isSignPad, setIsSignPad] = useState(false);
@@ -1018,7 +1019,11 @@ function EmbedPdfImage() {
10181019
}}
10191020
>
10201021
{/* this modal is used show this document is already sign */}
1021-
<Modal show={isAlreadySign.status}>
1022+
<Modal
1023+
show={isAlreadySign.status}
1024+
onShow={() => modalAlign()}
1025+
backdropClassName="signature-backdrop"
1026+
>
10221027
<ModalHeader style={{ background: themeColor() }}>
10231028
<span style={{ color: "white" }}> Sign Documents</span>
10241029
</ModalHeader>

microfrontends/SignDocuments/src/css/signature.css

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ option {
626626
padding: 16px;
627627
}
628628

629-
/* The sticky class is added to the navbar
629+
/* The sticky class is added to the navbar
630630
with JS when it reaches its scroll position */
631631
.stickyHead {
632632
position: fixed;
@@ -644,9 +644,9 @@ option {
644644
right: 0rem;
645645
}
646646

647-
/* Add some top padding to the page content
648-
to prevent sudden quick movement (as the
649-
navigation bar gets a new position at the top of the
647+
/* Add some top padding to the page content
648+
to prevent sudden quick movement (as the
649+
navigation bar gets a new position at the top of the
650650
page (position:fixed and top:0) */
651651
.stickyHead+.content {
652652
padding-top: 60px;
@@ -776,4 +776,14 @@ option {
776776
.mobileHead {
777777
display: flex;
778778
}
779+
}
780+
781+
.signature-backdrop {
782+
position: fixed;
783+
top: 0; bottom: 0; left: 0; right: 0;
784+
background-color: #000;
785+
}
786+
787+
.signature-backdrop.fade.in {
788+
opacity: 0.5;
779789
}

microfrontends/SignDocuments/src/utils/Utils.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import axios from "axios";
2+
import { $ } from 'select-dom';
23

34
export async function getBase64FromUrl(url) {
45
const data = await fetch(url);
@@ -307,5 +308,13 @@ export function urlValidator(url) {
307308
return newUrl.protocol === 'http:' || newUrl.protocol === 'https:';
308309
} catch (err) {
309310
return false;
311+
export const modalAlign = () => {
312+
let modalDialog = $('.modal-dialog').getBoundingClientRect();
313+
let mobileHead = $('.mobileHead').getBoundingClientRect()
314+
let modal = $('.modal-dialog');
315+
if (modalDialog.left < mobileHead.left) {
316+
let leftOffset = mobileHead.left - modalDialog.left;
317+
modal.style.left = leftOffset + 'px';
318+
modal.style.top = (window.innerHeight/3) + 'px';
310319
}
311320
};

0 commit comments

Comments
 (0)