mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-06 17:57:39 +02:00
fix: on-drag placeholder user-details popup open issue,close button design, remove unnecessary code & npm package
This commit is contained in:
@@ -8,9 +8,7 @@ const AddRoleModal = (props) => {
|
||||
isOpen={props.isModalRole}
|
||||
handleClose={props.handleCloseRoleModal}
|
||||
>
|
||||
<div
|
||||
className="addusercontainer"
|
||||
>
|
||||
<div className="addusercontainer">
|
||||
<form
|
||||
style={{ display: "flex", flexDirection: "column" }}
|
||||
onSubmit={props.handleAddRole}
|
||||
@@ -54,11 +52,8 @@ const AddRoleModal = (props) => {
|
||||
</button>
|
||||
<button
|
||||
onClick={props.handleCloseRoleModal}
|
||||
style={{
|
||||
color: "black"
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn"
|
||||
className="finishBtn cancelBtn"
|
||||
>
|
||||
Close
|
||||
</button>
|
||||
|
||||
@@ -49,11 +49,8 @@ function CustomModal({
|
||||
Yes
|
||||
</button>
|
||||
<button
|
||||
style={{
|
||||
color: "black"
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn"
|
||||
className="finishBtn cancelBtn"
|
||||
onClick={() => setIsDecline({ isDeclined: false })}
|
||||
>
|
||||
Close
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import React, { useState } from "react";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import ModalHeader from "react-bootstrap/esm/ModalHeader";
|
||||
import { themeColor } from "../../utils/ThemeColor/backColor";
|
||||
import ModalUi from "../../premitives/ModalUi";
|
||||
|
||||
@@ -251,11 +249,8 @@ function PlaceholderCopy(props) {
|
||||
Apply
|
||||
</button>
|
||||
<button
|
||||
style={{
|
||||
color: "black"
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn"
|
||||
className="finishBtn cancelBtn"
|
||||
onClick={() => props.setIsPageCopy(false)}
|
||||
>
|
||||
Cancel
|
||||
|
||||
@@ -86,6 +86,8 @@ function EmailComponent({
|
||||
isShow: true,
|
||||
alertMessage: "something went wrong"
|
||||
});
|
||||
setEmailValue("");
|
||||
setEmailList([]);
|
||||
} else {
|
||||
setIsLoading(false);
|
||||
setIsEmail(false);
|
||||
@@ -93,6 +95,8 @@ function EmailComponent({
|
||||
isShow: true,
|
||||
alertMessage: "something went wrong"
|
||||
});
|
||||
setEmailValue("");
|
||||
setEmailList([]);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -259,7 +263,8 @@ function EmailComponent({
|
||||
verticalAlign: "baseline",
|
||||
fontWeight: "500",
|
||||
color: "#403f3e",
|
||||
fontSize: "15px"
|
||||
fontSize: "15px",
|
||||
marginBottom: "5px"
|
||||
}}
|
||||
>
|
||||
Recipients added here will get a copy of the signed document.
|
||||
@@ -358,9 +363,10 @@ function EmailComponent({
|
||||
<i
|
||||
style={{
|
||||
backgroundColor: themeColor(),
|
||||
padding: "2px 10px",
|
||||
padding: "5px 7px",
|
||||
marginTop: "10px",
|
||||
color: "white"
|
||||
color: "white",
|
||||
borderRadius: "2px"
|
||||
}}
|
||||
className="fa fa-plus"
|
||||
aria-hidden="true"
|
||||
@@ -370,7 +376,7 @@ function EmailComponent({
|
||||
<div
|
||||
style={{
|
||||
background: "#e3e2e1",
|
||||
marginTop: "30px",
|
||||
marginTop: "10px",
|
||||
padding: "5px",
|
||||
borderRadius: "3px"
|
||||
}}
|
||||
@@ -403,11 +409,8 @@ function EmailComponent({
|
||||
Send
|
||||
</button>
|
||||
<button
|
||||
style={{
|
||||
color: "black"
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn"
|
||||
className="finishBtn cancelBtn"
|
||||
onClick={() => {
|
||||
setIsEmail(false);
|
||||
setEmailValue("");
|
||||
|
||||
@@ -35,7 +35,8 @@ function FieldsComponent({
|
||||
handleDeleteUser,
|
||||
signerPos,
|
||||
handleRoleChange,
|
||||
handleOnBlur
|
||||
handleOnBlur,
|
||||
title
|
||||
}) {
|
||||
const [isSignersModal, setIsSignersModal] = useState(false);
|
||||
const signStyle = pdfUrl ? "disableSign" : "signatureBtn";
|
||||
@@ -95,7 +96,7 @@ function FieldsComponent({
|
||||
textAlign: "center"
|
||||
}}
|
||||
>
|
||||
Recipient
|
||||
{title ? title : "Recipient"}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
|
||||
@@ -50,6 +50,7 @@ function RenderAllPdfPage({
|
||||
}}
|
||||
>
|
||||
<Document
|
||||
loading={"Loading Document.."}
|
||||
onLoadSuccess={onDocumentLoad}
|
||||
file={pdfUrl ? pdfUrl : signPdfUrl}
|
||||
// file="https://api.printnode.com/static/test/pdf/multipage.pdf"
|
||||
|
||||
@@ -521,13 +521,16 @@ function RenderPdf({
|
||||
/>
|
||||
<div
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
if (!isDragging) {
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
}
|
||||
}}
|
||||
onTouchEnd={() => {
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
if (!isDragging) {
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
}
|
||||
const dataNewPlace = addZIndex(
|
||||
signerPos,
|
||||
pos.key,
|
||||
@@ -852,9 +855,11 @@ function RenderPdf({
|
||||
placeData.pos.map((pos) => {
|
||||
return (
|
||||
<Rnd
|
||||
onClick={() => {
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
onClick={(e) => {
|
||||
if (!isDragging) {
|
||||
handleLinkUser(data.Id);
|
||||
setUniqueId(data.Id);
|
||||
}
|
||||
const dataNewPlace = addZIndex(
|
||||
signerPos,
|
||||
pos.key,
|
||||
@@ -898,20 +903,14 @@ function RenderPdf({
|
||||
? pos.Width / pos.Height
|
||||
: 2.5
|
||||
}
|
||||
onDragStop={
|
||||
(event, dragElement) =>
|
||||
handleStop(
|
||||
event,
|
||||
dragElement,
|
||||
data.Id,
|
||||
pos.key
|
||||
)
|
||||
// data.signerObjId,
|
||||
onDragStop={(event, dragElement) =>
|
||||
handleStop(
|
||||
event,
|
||||
dragElement,
|
||||
data.Id,
|
||||
pos.key
|
||||
)
|
||||
}
|
||||
// default={{
|
||||
// x: pos.xPosition,
|
||||
// y: pos.yPosition
|
||||
// }}
|
||||
default={{
|
||||
x: xPos(pos),
|
||||
y: yPos(pos)
|
||||
|
||||
@@ -56,12 +56,16 @@ function SignPad({
|
||||
setFontSelect("Fasthand");
|
||||
}, []);
|
||||
//function for clear signature
|
||||
const handleClear = () => {
|
||||
if (canvasRef.current) {
|
||||
canvasRef.current.clear();
|
||||
}
|
||||
const handleClear = (type) => {
|
||||
if (isTab === "draw") {
|
||||
if (canvasRef.current) {
|
||||
canvasRef.current.clear();
|
||||
}
|
||||
|
||||
setIsSignImg("");
|
||||
setIsSignImg("");
|
||||
} else if (isTab === "uploadImage") {
|
||||
setImage("");
|
||||
}
|
||||
};
|
||||
//function for set signature url
|
||||
const handleSignatureChange = (dataURL) => {
|
||||
@@ -73,11 +77,12 @@ function SignPad({
|
||||
//save button component
|
||||
const SaveBtn = () => {
|
||||
return (
|
||||
<div>
|
||||
{!isStamp && !isImageSelect && (
|
||||
<div style={{ marginTop: "2px" }}>
|
||||
{(isTab === "draw" || isTab === "uploadImage") && (
|
||||
<button
|
||||
style={{
|
||||
color: "black"
|
||||
color: "black",
|
||||
border: "1px solid #ccc"
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn saveBtn"
|
||||
@@ -124,7 +129,9 @@ function SignPad({
|
||||
}
|
||||
type="button"
|
||||
className={
|
||||
isSignImg || image ? "finishBtn saveBtn" : "disabledFinish saveBtn"
|
||||
isSignImg || image || isDefaultSign || textWidth
|
||||
? "finishBtn saveBtn"
|
||||
: "disabledFinish saveBtn"
|
||||
}
|
||||
>
|
||||
Save
|
||||
@@ -213,7 +220,10 @@ function SignPad({
|
||||
{isSignPad && (
|
||||
<div className="modaloverlay">
|
||||
<div className="modalcontainer">
|
||||
<div className="modalheader" style={{ padding: "0 5px" }}>
|
||||
<div
|
||||
className="modalheader"
|
||||
style={{ padding: "0 13px", marginTop: "5px" }}
|
||||
>
|
||||
<div className="modaltitle">
|
||||
<div
|
||||
style={{
|
||||
@@ -221,8 +231,7 @@ function SignPad({
|
||||
flexDirection: "row",
|
||||
justifyContent: "space-between",
|
||||
background: "white",
|
||||
|
||||
marginTop: "15px"
|
||||
marginTop: "3px"
|
||||
}}
|
||||
>
|
||||
<div
|
||||
@@ -445,7 +454,9 @@ function SignPad({
|
||||
ref={imageRef}
|
||||
src={image.src}
|
||||
style={{
|
||||
objectFit: "contain"
|
||||
objectFit: "contain",
|
||||
height: "100%",
|
||||
width: "100%"
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -534,7 +545,7 @@ function SignPad({
|
||||
display: "flex",
|
||||
flexDirection: "row",
|
||||
justifyContent: "space-between",
|
||||
marginTop: "4px"
|
||||
marginTop: "10px"
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex", flexDirection: "row" }}>
|
||||
|
||||
@@ -12,7 +12,9 @@ function SignerListPlace(props) {
|
||||
padding: "5px"
|
||||
}}
|
||||
>
|
||||
<span className="signedStyle">Recipients</span>
|
||||
<span className="signedStyle">
|
||||
{props.title ? props.title : "Recipients"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="signerList">
|
||||
<RecipientList {...props} />
|
||||
|
||||
Reference in New Issue
Block a user