From ba1561190306859f3a457a7e7b24295f817a63da Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Wed, 25 Sep 2024 17:01:03 +0530 Subject: [PATCH 1/9] feat: add signature and png type image with transparent background in pdf --- .../src/components/pdf/Placeholder.js | 4 +- apps/OpenSign/src/components/pdf/SignPad.js | 2 +- apps/OpenSign/src/constant/Utils.js | 16 ++----- apps/OpenSign/src/pages/Managesign.js | 44 +++++++++++++------ apps/OpenSign/src/styles/managesign.css | 1 - 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/apps/OpenSign/src/components/pdf/Placeholder.js b/apps/OpenSign/src/components/pdf/Placeholder.js index 926bc2c56..68011e88d 100644 --- a/apps/OpenSign/src/components/pdf/Placeholder.js +++ b/apps/OpenSign/src/components/pdf/Placeholder.js @@ -725,7 +725,9 @@ function Placeholder(props) { : props?.pos?.zIndex ? props.pos.zIndex : "5", - background: props.data ? props.data.blockColor : "rgb(203 233 237)" + background: props.data + ? props.data?.blockColor + "b0" + : "rgba(203, 233, 237, 0.69)" }} onDrag={() => { setDraggingEnabled(true); diff --git a/apps/OpenSign/src/components/pdf/SignPad.js b/apps/OpenSign/src/components/pdf/SignPad.js index 37772445c..d38048efa 100644 --- a/apps/OpenSign/src/components/pdf/SignPad.js +++ b/apps/OpenSign/src/components/pdf/SignPad.js @@ -596,7 +596,7 @@ function SignPad({ borderRadius: "2px" } }} - backgroundColor="rgb(255, 255, 255)" + // backgroundColor="rgb(255, 255, 255)" onEnd={() => handleSignatureChange(canvasRef.current?.toDataURL()) } diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js index c900b3c70..57ef0c0cf 100644 --- a/apps/OpenSign/src/constant/Utils.js +++ b/apps/OpenSign/src/constant/Utils.js @@ -1350,11 +1350,6 @@ export const multiSignEmbed = async ( widgetsPositionArr.map(async (url) => { let signUrl = url.SignUrl && url.SignUrl; if (signUrl) { - if (url.ImageType === "image/png") { - //function for convert signature png base64 url to jpeg base64 - const newUrl = await convertPNGtoJPEG(signUrl); - signUrl = newUrl; - } const res = await fetch(signUrl); return res.arrayBuffer(); } @@ -1364,19 +1359,14 @@ export const multiSignEmbed = async ( widgetsPositionArr.forEach(async (position, id) => { let img; if (["signature", "stamp", "initials", "image"].includes(position.type)) { - if ( - (position.ImageType && position.ImageType === "image/png") || - position.ImageType === "image/jpeg" - ) { + if (position.ImageType && position.ImageType === "image/jpeg") { img = await pdfDoc.embedJpg(images[id]); } else { img = await pdfDoc.embedPng(images[id]); } } else if (!position.type) { - if ( - (position.ImageType && position.ImageType === "image/png") || - position.ImageType === "image/jpeg" - ) { + // to handle old widget when only stamp and signature are exists + if (position.ImageType && position.ImageType === "image/jpeg") { img = await pdfDoc.embedJpg(images[id]); } else { img = await pdfDoc.embedPng(images[id]); diff --git a/apps/OpenSign/src/pages/Managesign.js b/apps/OpenSign/src/pages/Managesign.js index 9d8b8fead..fc905a002 100644 --- a/apps/OpenSign/src/pages/Managesign.js +++ b/apps/OpenSign/src/pages/Managesign.js @@ -2,12 +2,13 @@ import React, { useState, useRef, useEffect } from "react"; import SignatureCanvas from "react-signature-canvas"; import "../styles/managesign.css"; import "../styles/signature.css"; -import { toDataUrl } from "../constant/Utils"; +import { generateTitleFromFilename, toDataUrl } from "../constant/Utils"; import Parse from "parse"; import { SaveFileSize } from "../constant/saveFileSize"; import Alert from "../primitives/Alert"; import Loader from "../primitives/Loader"; import { useTranslation } from "react-i18next"; +import sanitizeFileName from "../primitives/sanitizeFileName"; const ManageSign = () => { const { t } = useTranslation(); const [penColor, setPenColor] = useState("blue"); @@ -46,14 +47,22 @@ const ManageSign = () => { if (signRes) { const res = signRes.toJSON(); setId(res.objectId); - setSignName(res?.SignatureName); - setImage(res.ImageURL); + if (res?.SignatureName) { + const sanitizename = generateTitleFromFilename(res?.SignatureName); + const replaceSpace = sanitizeFileName(sanitizename); + setSignName(replaceSpace); + } + setImage(res?.ImageURL); if (res && res.Initials) { setInitials(res.Initials); setIsInitials(true); } } else { - setSignName(User?.get("name") || ""); + if (User?.get("name")) { + const sanitizename = generateTitleFromFilename(User?.get("name")); + const replaceSpace = sanitizeFileName(sanitizename); + setSignName(replaceSpace); + } } setIsLoader(false); } catch (err) { @@ -87,7 +96,9 @@ const ManageSign = () => { initailsRef.current.clear(); } setInitials(""); - setIsValue(true); + if (image) { + setIsValue(true); + } setIsInitials(false); }; @@ -101,34 +112,39 @@ const ManageSign = () => { const base64Img = await toDataUrl(file); setImage(base64Img); setIsValue(true); + } else { + setImage(""); + setIsValue(false); } }; const handleSubmit = async (e) => { e.preventDefault(); - const isUrl = image.includes("https"); + const isUrl = image.includes("https") || image.includes("http"); if (!isvalue) { setWarning(true); setTimeout(() => setWarning(false), 1000); } else { setIsLoader(true); - const replaceSpace = signName.replace(/ /g, "_"); + const sanitizename = generateTitleFromFilename(signName); + const replaceSpace = sanitizeFileName(sanitizename); let file; if (signature) { file = base64StringtoFile(signature, `${replaceSpace}_sign.png`); } else { - if (!isUrl) { + if (image && !isUrl) { file = base64StringtoFile(image, `${replaceSpace}__sign.png`); } } let imgUrl; - if (!isUrl) { + if (file && !isUrl) { imgUrl = await uploadFile(file); } else { imgUrl = image; } let initialsUrl = ""; - const isInitialsUrl = Initials.includes("https"); + const isInitialsUrl = + Initials.includes("https") || Initials.includes("http"); if (!isInitialsUrl && Initials) { const initialsImg = base64StringtoFile( Initials, @@ -146,7 +162,7 @@ const ManageSign = () => { } }; function base64StringtoFile(base64String, filename) { - var arr = base64String.split(","), + let arr = base64String.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, @@ -182,7 +198,7 @@ const ManageSign = () => { const updateSign = new Parse.Object(signCls); updateSign.id = id; updateSign.set("Initials", obj.initialsUrl ? obj.initialsUrl : ""); - updateSign.set("ImageURL", obj.url); + updateSign.set("ImageURL", obj.url ? obj.url : ""); updateSign.set("SignatureName", obj.name); updateSign.set("UserId", userId); const res = await updateSign.save(); @@ -281,7 +297,7 @@ const ManageSign = () => { height: "180px", className: "signatureCanvas rounded-box" }} - backgroundColor="rgb(255, 255, 255)" + // backgroundColor="rgb(255, 255, 255)" onEnd={() => handleSignatureChange(canvasRef.current.toDataURL()) } @@ -376,7 +392,7 @@ const ManageSign = () => { canvasProps={{ className: "intialSignature rounded-box" }} - backgroundColor="rgb(255, 255, 255)" + // backgroundColor="rgb(255, 255, 255)" onEnd={() => handleInitialsChange(initailsRef.current.toDataURL()) } diff --git a/apps/OpenSign/src/styles/managesign.css b/apps/OpenSign/src/styles/managesign.css index a32f9bb71..a15c18073 100644 --- a/apps/OpenSign/src/styles/managesign.css +++ b/apps/OpenSign/src/styles/managesign.css @@ -4,7 +4,6 @@ border: 1px solid black; background: white; border-radius: 5px; - animation: inAnimation 2s ease-in-out; z-index: 1; } From 6ea254d9acd26d736f7d7ad65d9a4fdea4a0da45 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Wed, 25 Sep 2024 21:01:17 +0530 Subject: [PATCH 2/9] fix: show proper error if server down in self-hosting --- .../public/locales/en/translation.json | 4 +- .../public/locales/fr/translation.json | 5 +- apps/OpenSign/public/version.txt | Bin 18 -> 18 bytes apps/OpenSign/src/constant/Utils.js | 6 +- apps/OpenSign/src/pages/AddAdmin.js | 2 +- apps/OpenSign/src/pages/Login.js | 11 ++- .../src/pages/UpdateExistUserAdmin.js | 2 +- .../src/script/locales/en/translation.json | 81 +++++++++-------- .../src/script/locales/fr/translation.json | 83 +++++++++--------- .../parsefunction/UpdateExistUserAsAdmin.js | 5 +- 10 files changed, 111 insertions(+), 88 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 79b1b2b65..d5494f4a0 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -668,6 +668,8 @@ "download-files":"Download files", "download-pdf":"Download Pdf", "pdf-certificate":"Download Pdf + Certificate", - "document-logs":"Document logs" + "document-logs":"Document logs", + "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", + "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users." } diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index b98d45cb0..c7ed9c310 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -667,6 +667,9 @@ "download-files" :"Télécharger des fichiers", "download-pdf" :"Télécharger le PDF", "pdf-certificate" :"Télécharger Pdf + Certificat", - "document-logs":"Journaux de documents" + "document-logs":"Journaux de documents", + "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", + "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs." + } diff --git a/apps/OpenSign/public/version.txt b/apps/OpenSign/public/version.txt index f1893d2be055c0a08efbccbd6c96a6d8274ca29e..10830af0cd85883c70a80e9f402fa4d6fb970bb2 100644 GIT binary patch literal 18 VcmezWuZ+QnL65;0jCmQj7yvX11AhPj literal 18 VcmezWuZ+QnL65-@jCmQj7yvWs1A71f diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js index 699c28973..f5454e9ff 100644 --- a/apps/OpenSign/src/constant/Utils.js +++ b/apps/OpenSign/src/constant/Utils.js @@ -1926,7 +1926,11 @@ export const getAppLogo = async () => { } } catch (err) { console.log("err in getlogo ", err); - return { logo: appInfo.applogo, user: "exist" }; + if (err?.includes("is not valid JSON")) { + return { logo: appInfo.applogo, user: "exist", error: "invalid_json" }; + } else { + return { logo: appInfo.applogo, user: "exist" }; + } } } }; diff --git a/apps/OpenSign/src/pages/AddAdmin.js b/apps/OpenSign/src/pages/AddAdmin.js index 75d428d35..049119f88 100644 --- a/apps/OpenSign/src/pages/AddAdmin.js +++ b/apps/OpenSign/src/pages/AddAdmin.js @@ -46,7 +46,7 @@ const AddAdmin = () => { try { const app = await getAppLogo(); if (app?.user === "exist") { - setErrMsg(t("admin-already-exist")); + setErrMsg(t("admin-exists")); } } catch (err) { setErrMsg(t("something-went-wrong-mssg")); diff --git a/apps/OpenSign/src/pages/Login.js b/apps/OpenSign/src/pages/Login.js index 8b0adfc43..97ddded91 100644 --- a/apps/OpenSign/src/pages/Login.js +++ b/apps/OpenSign/src/pages/Login.js @@ -51,6 +51,7 @@ function Login() { const [isModal, setIsModal] = useState(false); const [image, setImage] = useState(); const [isLoginSSO, setIsLoginSSO] = useState(false); + const [errMsg, setErrMsg] = useState(); useEffect(() => { checkUserExt(); @@ -59,7 +60,9 @@ function Login() { const checkUserExt = async () => { const app = await getAppLogo(); - if (!isEnableSubscription && app?.user === "not_exist") { + if (app?.error === "invalid_json") { + setErrMsg(t("server-down")); + } else if (!isEnableSubscription && app?.user === "not_exist") { navigate("/addadmin"); } if (app?.logo) { @@ -620,7 +623,11 @@ function Login() { } }; - return ( + return errMsg ? ( +
+ {errMsg} +
+ ) : (
{state.loading && ( diff --git a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js index be5920cdc..bb5e744cc 100644 --- a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js +++ b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js @@ -52,7 +52,7 @@ const UpdateExistUserAdmin = () => { } else if (err.code === 101) { setIsAlert((prev) => ({ ...prev, msg: t("user-not-found") })); } else if (err.code === 137) { - setIsAlert((prev) => ({ ...prev, msg: t("admin-already-exist") })); + setIsAlert((prev) => ({ ...prev, msg: t("admin-exists") })); } else { setErrMsg(t("something-went-wrong-mssg")); } diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index 36cdae714..d9f2e9369 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -41,7 +41,7 @@ "upgrade-now": "Upgrade now", "upgrade-to": "Upgrade to", "plan": "Plan", - "subscribe-card-teamplan":"Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", + "subscribe-card-teamplan": "Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", "subscribe-card-plan": "Unlock premium features starting at just {{premiumPrice}}/month. Enjoy enhanced performance and only {{addonPrice}} per additional credit after your included premium credits.", "user-name-limit-char": "To have a username less than 8 character please subscribe", "tour-content": "Don't show this again", @@ -132,7 +132,7 @@ "View": "View", "option": "Option", "Embed": "Embed", - "Copy TemplateId":"Copy TemplateId" + "Copy TemplateId": "Copy TemplateId" }, "report-heading": { "Sr.No": "Sr.No", @@ -266,7 +266,7 @@ "public-role": "Public role", "public-url": "Public URL", "public-url-copy": "Here’s your public URL: ", - "public-url-copy-mssg":"Copy it or share it with the signer, and you will be able to see all your publicly set templates.", + "public-url-copy-mssg": "Copy it or share it with the signer, and you will be able to see all your publicly set templates.", "add-public-url-alert": "Please add your public URL, and you will be able to make a public template.", "share-with-alert": "You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.", "share-with": "Share with", @@ -597,7 +597,7 @@ "Recently sent for signatures": "This is a list of documents you've sent to other parties for signature.", "Drafts": "This are documents you have started but have not finalized for sending.", "public-template": "This video demonstrates how to set up your personalized public profile, such as ‘https://opensign.me/your-username’. You’ll also learn how to customize your tagline and make your templates available for public signing." - }, + }, "enter-email-plaholder": "Add an email address and hit enter", "success-email-alert": "Email sent successfully!", "expired-doc-title": "Expired Document", @@ -618,44 +618,44 @@ "select-date-format": "Select a date format", "quantity-of-credits": "Quantity of premium credits", "remaining-credits": "Premium credits available:", - "remaining-credits-help":"Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", + "remaining-credits-help": "Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", "additional-credits": "Please purchase premium credits", "quota-err-quicksend": "Quota Reached, You don't have enough credits.", "buy-credits": "Buy Premium Credits", - "rotate-right":"Rotate right", - "rotate-left":"Rotate left", - "rotate-alert-mssg":"All widgets on this page will be lost. Are you sure you want to proceed?", - "templateid":"Template-Id", - "bulk-send-subcription-alert":"Please upgrade to Professional or Team plan to use bulk send.", - "generate-test-token":"Generate Test Token", - "regenerate-test-token":"Regenerate Test Token", - "help-test-token":"This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", - "help-api-token":"This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", - "reason":"Reason", - "decline-by":"Declined/revoked by", + "rotate-right": "Rotate right", + "rotate-left": "Rotate left", + "rotate-alert-mssg": "All widgets on this page will be lost. Are you sure you want to proceed?", + "templateid": "Template-Id", + "bulk-send-subcription-alert": "Please upgrade to Professional or Team plan to use bulk send.", + "generate-test-token": "Generate Test Token", + "regenerate-test-token": "Regenerate Test Token", + "help-test-token": "This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", + "help-api-token": "This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", + "reason": "Reason", + "decline-by": "Declined/revoked by", "document-declined": "Document declined", - "public-template-mssg-1":"To integrate OpenSign into your React or Next.js project, simply run the following command:", - "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", - "public-template-mssg-3" :"Need more details or examples?", + "public-template-mssg-1": "To integrate OpenSign into your React or Next.js project, simply run the following command:", + "public-template-mssg-2": "Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", + "public-template-mssg-3": "Need more details or examples?", "public-template-mssg-4": "Visit the", "public-template-mssg-5": " npm for the latest updates, detailed documentation, and version history.", - "public-template-mssg-6" :"You need to set this template as public before you can utilize this code snippet.", - "copy-code":"COPY", - "copied-code":"COPIED", - "Installation":"Installation", - "Usage" :"Usage", - "insufficient-credits":"Insufficient Signing Credits", - "insufficient-credits-mssg":"The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", + "public-template-mssg-6": "You need to set this template as public before you can utilize this code snippet.", + "copy-code": "COPY", + "copied-code": "COPIED", + "Installation": "Installation", + "Usage": "Usage", + "insufficient-credits": "Insufficient Signing Credits", + "insufficient-credits-mssg": "The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", "angular-npm-mssg-1": "To integrate OpenSign into your Angular project, simply run the following command:", - "quota-mail-info-head":"Monthly request signatures email limit", + "quota-mail-info-head": "Monthly request signatures email limit", "quota-mail-info": "You can send upto 15 signature request emails every month. Upgrade now to send unlimited signing requests directly.", "quota-mail": "You've reached your limit of 15 signature request emails for this month. Upgrade now to continue sending emails directly.", - "quota-mail-tip":"Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", - "quota-mail-head":"Quota Reached", - "unauthorized-modal":"You don't have permission to perform this action, please contact {{adminEmail}}.", - "sent-this-month":"Sent this month", - "available-seats":"Available seats", - "buy-users":"Buy more users", + "quota-mail-tip": "Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", + "quota-mail-head": "Quota Reached", + "unauthorized-modal": "You don't have permission to perform this action, please contact {{adminEmail}}.", + "sent-this-month": "Sent this month", + "available-seats": "Available seats", + "buy-users": "Buy more users", "isenable-otp": "Enable OTP verification", "isenable-otp-help": { "p1": "Would you like to enable the verification process using a one-time password (OTP)?", @@ -663,10 +663,13 @@ "p3": "Selecting this option will disable OTP verification, allowing users to sign the document directly without additional steps.", "p4": "Please choose the option that best suits your document signing requirements." }, - "advanced-options":"Advanced options", - "hide-advanced-options":"Hide Advanced options", - "download-files":"Download files", - "download-pdf":"Download Pdf", - "pdf-certificate":"Download Pdf + Certificate", - "document-logs":"Document logs" + "advanced-options": "Advanced options", + "hide-advanced-options": "Hide Advanced options", + "download-files": "Download files", + "download-pdf": "Download Pdf", + "pdf-certificate": "Download Pdf + Certificate", + "document-logs": "Document logs", + "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", + "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users." + } diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index b98d45cb0..c23dca4b6 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -42,7 +42,7 @@ "upgrade-to": "Mettre à niveau vers", "pro": "PRO", "plan": "Offre", - "subscribe-card-teamplan":"Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", + "subscribe-card-teamplan": "Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", "subscribe-card-plan": "Débloquez des fonctionnalités premium à partir de seulement {{premiumPrice}}/mois. Bénéficiez de performances améliorées et de seulement {{addonPrice}} par crédit supplémentaire après vos crédits premium inclus.", "user-name-limit-char": "Pour avoir un nom d'utilisateur de moins de 8 caractères s'il vous plaît s'abonner", "tour-content": "Ne plus afficher", @@ -615,46 +615,46 @@ "Add-seats": "Ajouter des sièges", "format": "format", "select-date-format": "Sélectionnez un format de date", - "quantity-of-credits":"Quantité de crédits de prime", - "remaining-credits":"Crédits premium disponibles :", - "additional-credits":"Veuillez acheter des crédits premium", - "remaining-credits-help":"Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", + "quantity-of-credits": "Quantité de crédits de prime", + "remaining-credits": "Crédits premium disponibles :", + "additional-credits": "Veuillez acheter des crédits premium", + "remaining-credits-help": "Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", "quota-err-quicksend": "Quota atteint, vous n'avez pas assez de crédits.", "buy-credits": "Acheter des crédits premium", - "rotate-right" :"Faire pivoter à droite", - "rotate-left" :"Faire pivoter à gauche", - "rotate-alert-mssg" :"Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", - "templateid":"ID de modèle", - "bulk-send-subcription-alert":"Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", + "rotate-right": "Faire pivoter à droite", + "rotate-left": "Faire pivoter à gauche", + "rotate-alert-mssg": "Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", + "templateid": "ID de modèle", + "bulk-send-subcription-alert": "Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", "generate-test-token": "Générer jeton de test", - "regenerate-test-token":"Régénérer le jeton de test", - "help-test-token":"Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", - "help-api-token":"Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", - "reason" :"Raison", - "decline-by" :"Refusé/révoqué par", - "document-declined":"document refusé", - "public-template-mssg-1" :"Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", - "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", - "public-template-mssg-3" :"Besoin de plus de détails ou d'exemples ?", + "regenerate-test-token": "Régénérer le jeton de test", + "help-test-token": "Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", + "help-api-token": "Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", + "reason": "Raison", + "decline-by": "Refusé/révoqué par", + "document-declined": "document refusé", + "public-template-mssg-1": "Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", + "public-template-mssg-2": "Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", + "public-template-mssg-3": "Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", - "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", - "public-template-mssg-6":"Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", - "copy-code":"COPIE", - "copied-code":"COPIÉ", - "Installation":"Installation", - "Usage" :"Usage", - "insufficient-credits":"Crédits de signature insuffisants", - "insufficient-credits-mssg" :"Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", - "angular-npm-mssg-1" :"Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", - "quota-mail-info-head":"Limite mensuelle d'e-mails de signatures de demandes", + "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", + "public-template-mssg-6": "Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", + "copy-code": "COPIE", + "copied-code": "COPIÉ", + "Installation": "Installation", + "Usage": "Usage", + "insufficient-credits": "Crédits de signature insuffisants", + "insufficient-credits-mssg": "Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", + "angular-npm-mssg-1": "Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", + "quota-mail-info-head": "Limite mensuelle d'e-mails de signatures de demandes", "quota-mail-info": "Vous pouvez envoyer jusqu'à 15 e-mails de demande de signature chaque mois. Mettez à niveau maintenant pour envoyer directement des demandes de signature illimitées.", "quota-mail": "Vous avez atteint votre limite de 15 e-mails de demande de signature pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", - "quota-mail-tip-tip":"Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", - "quota-mail-head":"Quota atteint", - "unauthorized-modal":"Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", - "sent-this-month":"envoyé ce mois-ci", - "available-seats":"Disponible sièges", - "buy-users":"Acheter plus d'utilisateurs", + "quota-mail-tip-tip": "Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", + "quota-mail-head": "Quota atteint", + "unauthorized-modal": "Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", + "sent-this-month": "envoyé ce mois-ci", + "available-seats": "Disponible sièges", + "buy-users": "Acheter plus d'utilisateurs", "isenable-otp": "Activer la vérification OTP", "isenable-otp-help": { "p1": "Souhaitez-vous activer le processus de vérification à l'aide d'un mot de passe à usage unique (OTP)?", @@ -662,11 +662,12 @@ "p3": "La sélection de cette option désactivera la vérification OTP, permettant aux utilisateurs de signer le document directement sans étapes supplémentaires.", "p4": "Veuillez choisir l'option qui correspond le mieux à vos exigences en matière de signature de documents." }, - "advanced-options":"Options avancées", + "advanced-options": "Options avancées", "hide-advanced-options": "Masquer les options avancées", - "download-files" :"Télécharger des fichiers", - "download-pdf" :"Télécharger le PDF", - "pdf-certificate" :"Télécharger Pdf + Certificat", - "document-logs":"Journaux de documents" - + "download-files": "Télécharger des fichiers", + "download-pdf": "Télécharger le PDF", + "pdf-certificate": "Télécharger Pdf + Certificat", + "document-logs": "Journaux de documents", + "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", + "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs." } diff --git a/apps/OpenSignServer/cloud/parsefunction/UpdateExistUserAsAdmin.js b/apps/OpenSignServer/cloud/parsefunction/UpdateExistUserAsAdmin.js index b3cb52ad5..f4e8d4c61 100644 --- a/apps/OpenSignServer/cloud/parsefunction/UpdateExistUserAsAdmin.js +++ b/apps/OpenSignServer/cloud/parsefunction/UpdateExistUserAsAdmin.js @@ -51,7 +51,10 @@ export default async function UpdateExistUserAsAdmin(request) { extClsQuery.notEqualTo('IsDisabled', true); const extAdminRes = await extClsQuery.find({ useMasterKey: true }); if (extAdminRes && extAdminRes.length === 1 && extAdminRes?.[0]?.get('OrganizationId')) { - throw new Parse.Error(Parse.Error.DUPLICATE_VALUE, 'Admin already exist.'); + throw new Parse.Error( + Parse.Error.DUPLICATE_VALUE, + 'Admin already exists. Please login to the application using admin credentials in order to manage users.' + ); } else { const extCls = new Parse.Query('contracts_Users'); extCls.equalTo('Email', email); From 2433c68f27483dc67faa9e69817ba4922b291726 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <prafull.navkar@nxglabs.com> Date: Wed, 25 Sep 2024 21:22:48 +0530 Subject: [PATCH 3/9] fix: capture error message correctly --- apps/OpenSign/src/constant/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js index f5454e9ff..7743a5739 100644 --- a/apps/OpenSign/src/constant/Utils.js +++ b/apps/OpenSign/src/constant/Utils.js @@ -1926,7 +1926,7 @@ export const getAppLogo = async () => { } } catch (err) { console.log("err in getlogo ", err); - if (err?.includes("is not valid JSON")) { + if (err?.message?.includes("valid JSON")) { return { logo: appInfo.applogo, user: "exist", error: "invalid_json" }; } else { return { logo: appInfo.applogo, user: "exist" }; From 5ffa681a8061f20579ebc873851d1232e754cf9b Mon Sep 17 00:00:00 2001 From: RaktimaNXG <raktima.c@nxglabs.com> Date: Thu, 26 Sep 2024 14:56:25 +0530 Subject: [PATCH 4/9] feat: add copy public URL option to copy public url --- .../public/locales/en/translation.json | 3 +- .../public/locales/fr/translation.json | 3 +- .../src/components/opensigndrive/DriveBody.js | 7 -- apps/OpenSign/src/components/pdf/EmbedTab.js | 18 ++-- apps/OpenSign/src/json/ReportJson.js | 28 +++--- .../src/primitives/GetReportDisplay.js | 65 +++++++++++--- .../src/script/locales/en/translation.json | 79 ++++++++--------- .../src/script/locales/fr/translation.json | 85 ++++++++++--------- 8 files changed, 168 insertions(+), 120 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index d5494f4a0..8c5ed8c71 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -132,7 +132,8 @@ "View": "View", "option": "Option", "Embed": "Embed", - "Copy TemplateId":"Copy TemplateId" + "Copy TemplateId":"Copy TemplateId", + "Copy Public URL":"Copy Public URL" }, "report-heading": { "Sr.No": "Sr.No", diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index c7ed9c310..0e239aaf6 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -152,7 +152,8 @@ "View": "Voir", "option": "Option", "Embed": "Intégrer", - "Copy TemplateId": "Copier l'ID du modèle" + "Copy TemplateId": "Copier l'ID du modèle", + "Copy Public URL":"Copier l'URL publique" }, "report-help": { "Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.", diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js index 1324210cb..b198f6c4b 100644 --- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js +++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js @@ -2,7 +2,6 @@ import React, { useState, useEffect, useRef } from "react"; import "../../styles/opensigndrive.css"; import axios from "axios"; import * as ContextMenu from "@radix-ui/react-context-menu"; -import { saveAs } from "file-saver"; import { useNavigate } from "react-router-dom"; import Table from "react-bootstrap/Table"; import * as HoverCard from "@radix-ui/react-hover-card"; @@ -264,12 +263,6 @@ function DriveBody(props) { setIsOpenMoveModal(false); } }; - - const sanitizeFileName = (pdfName) => { - // Replace spaces with underscore - return pdfName.replace(/ /g, "_"); - }; - const handleEnterPress = (e, data) => { if (e.key === "Enter") { handledRenameDoc(data); diff --git a/apps/OpenSign/src/components/pdf/EmbedTab.js b/apps/OpenSign/src/components/pdf/EmbedTab.js index f2381ebef..ca3991b9b 100644 --- a/apps/OpenSign/src/components/pdf/EmbedTab.js +++ b/apps/OpenSign/src/components/pdf/EmbedTab.js @@ -129,9 +129,11 @@ export class AppComponent{ <p className="font-medium text-[18px]"> {t(`${data.title}`)} </p> - <p className="text-[13px] mt-2"> - {t("public-template-mssg-1")} - </p> + {ind === 0 && ( + <p className="text-[13px] mt-2"> + {t("public-template-mssg-1")} + </p> + )} <div className="relative p-1"> <div onClick={() => handleCopy(data.codeString, ind)} @@ -210,11 +212,11 @@ export class AppComponent{ <p className="font-medium text-[18px]"> {t(`${data.title}`)} </p> - - <p className="text-[13px] mt-2"> - {t("angular-npm-mssg-1")} - </p> - + {ind === 0 && ( + <p className="text-[13px] mt-2"> + {t("angular-npm-mssg-1")} + </p> + )} <div className="relative p-1"> <div onClick={() => handleCopy(data.codeString, ind)} diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js index c2da51950..859a2e4fd 100644 --- a/apps/OpenSign/src/json/ReportJson.js +++ b/apps/OpenSign/src/json/ReportJson.js @@ -39,6 +39,13 @@ export default function reportJson(id) { hoverLabel: "Copy TemplateId", btnIcon: "fa-light fa-copy", action: "CopyTemplateId" + }, + { + btnId: "2434", + btnLabel: "Copy Public URL", + hoverLabel: "Copy Public URL", + btnIcon: "fa-light fa-copy", + action: "CopyPublicURL" } ] : []; @@ -405,18 +412,15 @@ export default function reportJson(id) { if (item.action === "option") { // Make a shallow copy of the item const newItem = { ...item }; - newItem.subaction = [ - { - btnId: "1873", - btnLabel: "Share with team", - hoverLabel: "Share with team", - btnIcon: "fa-light fa-share-nodes", - redirectUrl: "", - action: "sharewith" - }, - ...newItem.subaction - ]; - + //splice method used to add `Share with team` option on second index of list + newItem.subaction.splice(1, 0, { + btnId: "1873", + btnLabel: "Share with team", + hoverLabel: "Share with team", + btnIcon: "fa-light fa-share-nodes", + redirectUrl: "", + action: "sharewith" + }); return newItem; } return item; diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index 8e3d305dd..13c2843cb 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -76,6 +76,7 @@ const ReportTable = (props) => { const [reason, setReason] = useState(""); const [isDownloadModal, setIsDownloadModal] = useState(false); const [isEmbed, setIsEmbed] = useState(false); + const [isPublicTour, setIsPublicTour] = useState(); const Extand_Class = localStorage.getItem("Extand_Class"); const extClass = Extand_Class && JSON.parse(Extand_Class); const startIndex = (currentPage - 1) * props.docPerPage; @@ -373,6 +374,19 @@ const ReportTable = (props) => { handleEmbedFunction(item); } else if (act.action === "CopyTemplateId") { copyTemplateId(item.objectId); + } else if (act.action === "CopyPublicURL") { + const isPublic = item?.IsPublic; + if (isPublic) { + let publicUrl = ""; + if (isStaging) { + publicUrl = `https://staging.opensign.me/publicsign?templateid=${item.objectId}`; + } else { + publicUrl = `https://opensign.me/publicsign?templateid=${item.objectId}`; + } + copyTemplateId(publicUrl); + } else { + setIsPublicTour({ [item.objectId]: true }); + } } }; // Get current list @@ -1133,6 +1147,17 @@ const ReportTable = (props) => { setIsPublicUserName(extendUser[0]?.UserName || ""); }; + const publicTourConfig = [ + { + selector: '[data-tut="IsPublic"]', + content: "Please make template public to copy public URL", + position: "top", + style: { fontSize: "13px" } + } + ]; + const closePublicTour = () => { + setIsPublicTour(); + }; return ( <div className="relative"> {Object.keys(actLoader)?.length > 0 && ( @@ -1153,13 +1178,27 @@ const ReportTable = (props) => { )} {isAlert && <Alert type={alertMsg.type}>{alertMsg.message}</Alert>} {props.tourData && props.ReportName === "Templates" && ( - <Tour - onRequestClose={closeTour} - steps={props.tourData} - isOpen={isTour} - // rounded={5} - closeWithMask={false} - /> + <> + <Tour + onRequestClose={closeTour} + steps={props.tourData} + isOpen={isTour} + // rounded={5} + closeWithMask={false} + /> + {isPublicTour && ( + <Tour + showNumber={false} + showNavigation={false} + showNavigationNumber={false} + onRequestClose={closePublicTour} + steps={publicTourConfig} + isOpen={true} + rounded={5} + closeWithMask={false} + /> + )} + </> )} <div className="flex flex-row items-center justify-between my-2 mx-3 text-[20px] md:text-[23px]"> <div className="font-light"> @@ -1375,13 +1414,17 @@ const ReportTable = (props) => { isEnableSubscription && ( <td className=" pl-[20px] py-2"> {props.ReportName === "Templates" && ( - <div className="flex flex-row"> + <div + className="flex flex-row " + data-tut="IsPublic" + > <label className="cursor-pointer relative inline-flex items-center mb-0"> <input checked={props.isPublic?.[item.objectId]} - onChange={(e) => - handlePublicChange(e, item) - } + onChange={(e) => { + setIsPublicTour(); + handlePublicChange(e, item); + }} type="checkbox" value="" className="sr-only peer" diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index d9f2e9369..8c5ed8c71 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -41,7 +41,7 @@ "upgrade-now": "Upgrade now", "upgrade-to": "Upgrade to", "plan": "Plan", - "subscribe-card-teamplan": "Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", + "subscribe-card-teamplan":"Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", "subscribe-card-plan": "Unlock premium features starting at just {{premiumPrice}}/month. Enjoy enhanced performance and only {{addonPrice}} per additional credit after your included premium credits.", "user-name-limit-char": "To have a username less than 8 character please subscribe", "tour-content": "Don't show this again", @@ -132,7 +132,8 @@ "View": "View", "option": "Option", "Embed": "Embed", - "Copy TemplateId": "Copy TemplateId" + "Copy TemplateId":"Copy TemplateId", + "Copy Public URL":"Copy Public URL" }, "report-heading": { "Sr.No": "Sr.No", @@ -266,7 +267,7 @@ "public-role": "Public role", "public-url": "Public URL", "public-url-copy": "Here’s your public URL: ", - "public-url-copy-mssg": "Copy it or share it with the signer, and you will be able to see all your publicly set templates.", + "public-url-copy-mssg":"Copy it or share it with the signer, and you will be able to see all your publicly set templates.", "add-public-url-alert": "Please add your public URL, and you will be able to make a public template.", "share-with-alert": "You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.", "share-with": "Share with", @@ -597,7 +598,7 @@ "Recently sent for signatures": "This is a list of documents you've sent to other parties for signature.", "Drafts": "This are documents you have started but have not finalized for sending.", "public-template": "This video demonstrates how to set up your personalized public profile, such as ‘https://opensign.me/your-username’. You’ll also learn how to customize your tagline and make your templates available for public signing." - }, + }, "enter-email-plaholder": "Add an email address and hit enter", "success-email-alert": "Email sent successfully!", "expired-doc-title": "Expired Document", @@ -618,44 +619,44 @@ "select-date-format": "Select a date format", "quantity-of-credits": "Quantity of premium credits", "remaining-credits": "Premium credits available:", - "remaining-credits-help": "Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", + "remaining-credits-help":"Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", "additional-credits": "Please purchase premium credits", "quota-err-quicksend": "Quota Reached, You don't have enough credits.", "buy-credits": "Buy Premium Credits", - "rotate-right": "Rotate right", - "rotate-left": "Rotate left", - "rotate-alert-mssg": "All widgets on this page will be lost. Are you sure you want to proceed?", - "templateid": "Template-Id", - "bulk-send-subcription-alert": "Please upgrade to Professional or Team plan to use bulk send.", - "generate-test-token": "Generate Test Token", - "regenerate-test-token": "Regenerate Test Token", - "help-test-token": "This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", - "help-api-token": "This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", - "reason": "Reason", - "decline-by": "Declined/revoked by", + "rotate-right":"Rotate right", + "rotate-left":"Rotate left", + "rotate-alert-mssg":"All widgets on this page will be lost. Are you sure you want to proceed?", + "templateid":"Template-Id", + "bulk-send-subcription-alert":"Please upgrade to Professional or Team plan to use bulk send.", + "generate-test-token":"Generate Test Token", + "regenerate-test-token":"Regenerate Test Token", + "help-test-token":"This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", + "help-api-token":"This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", + "reason":"Reason", + "decline-by":"Declined/revoked by", "document-declined": "Document declined", - "public-template-mssg-1": "To integrate OpenSign into your React or Next.js project, simply run the following command:", - "public-template-mssg-2": "Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", - "public-template-mssg-3": "Need more details or examples?", + "public-template-mssg-1":"To integrate OpenSign into your React or Next.js project, simply run the following command:", + "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", + "public-template-mssg-3" :"Need more details or examples?", "public-template-mssg-4": "Visit the", "public-template-mssg-5": " npm for the latest updates, detailed documentation, and version history.", - "public-template-mssg-6": "You need to set this template as public before you can utilize this code snippet.", - "copy-code": "COPY", - "copied-code": "COPIED", - "Installation": "Installation", - "Usage": "Usage", - "insufficient-credits": "Insufficient Signing Credits", - "insufficient-credits-mssg": "The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", + "public-template-mssg-6" :"You need to set this template as public before you can utilize this code snippet.", + "copy-code":"COPY", + "copied-code":"COPIED", + "Installation":"Installation", + "Usage" :"Usage", + "insufficient-credits":"Insufficient Signing Credits", + "insufficient-credits-mssg":"The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", "angular-npm-mssg-1": "To integrate OpenSign into your Angular project, simply run the following command:", - "quota-mail-info-head": "Monthly request signatures email limit", + "quota-mail-info-head":"Monthly request signatures email limit", "quota-mail-info": "You can send upto 15 signature request emails every month. Upgrade now to send unlimited signing requests directly.", "quota-mail": "You've reached your limit of 15 signature request emails for this month. Upgrade now to continue sending emails directly.", - "quota-mail-tip": "Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", - "quota-mail-head": "Quota Reached", - "unauthorized-modal": "You don't have permission to perform this action, please contact {{adminEmail}}.", - "sent-this-month": "Sent this month", - "available-seats": "Available seats", - "buy-users": "Buy more users", + "quota-mail-tip":"Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", + "quota-mail-head":"Quota Reached", + "unauthorized-modal":"You don't have permission to perform this action, please contact {{adminEmail}}.", + "sent-this-month":"Sent this month", + "available-seats":"Available seats", + "buy-users":"Buy more users", "isenable-otp": "Enable OTP verification", "isenable-otp-help": { "p1": "Would you like to enable the verification process using a one-time password (OTP)?", @@ -663,12 +664,12 @@ "p3": "Selecting this option will disable OTP verification, allowing users to sign the document directly without additional steps.", "p4": "Please choose the option that best suits your document signing requirements." }, - "advanced-options": "Advanced options", - "hide-advanced-options": "Hide Advanced options", - "download-files": "Download files", - "download-pdf": "Download Pdf", - "pdf-certificate": "Download Pdf + Certificate", - "document-logs": "Document logs", + "advanced-options":"Advanced options", + "hide-advanced-options":"Hide Advanced options", + "download-files":"Download files", + "download-pdf":"Download Pdf", + "pdf-certificate":"Download Pdf + Certificate", + "document-logs":"Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users." diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index c23dca4b6..0e239aaf6 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -42,7 +42,7 @@ "upgrade-to": "Mettre à niveau vers", "pro": "PRO", "plan": "Offre", - "subscribe-card-teamplan": "Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", + "subscribe-card-teamplan":"Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", "subscribe-card-plan": "Débloquez des fonctionnalités premium à partir de seulement {{premiumPrice}}/mois. Bénéficiez de performances améliorées et de seulement {{addonPrice}} par crédit supplémentaire après vos crédits premium inclus.", "user-name-limit-char": "Pour avoir un nom d'utilisateur de moins de 8 caractères s'il vous plaît s'abonner", "tour-content": "Ne plus afficher", @@ -152,7 +152,8 @@ "View": "Voir", "option": "Option", "Embed": "Intégrer", - "Copy TemplateId": "Copier l'ID du modèle" + "Copy TemplateId": "Copier l'ID du modèle", + "Copy Public URL":"Copier l'URL publique" }, "report-help": { "Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.", @@ -615,46 +616,46 @@ "Add-seats": "Ajouter des sièges", "format": "format", "select-date-format": "Sélectionnez un format de date", - "quantity-of-credits": "Quantité de crédits de prime", - "remaining-credits": "Crédits premium disponibles :", - "additional-credits": "Veuillez acheter des crédits premium", - "remaining-credits-help": "Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", + "quantity-of-credits":"Quantité de crédits de prime", + "remaining-credits":"Crédits premium disponibles :", + "additional-credits":"Veuillez acheter des crédits premium", + "remaining-credits-help":"Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", "quota-err-quicksend": "Quota atteint, vous n'avez pas assez de crédits.", "buy-credits": "Acheter des crédits premium", - "rotate-right": "Faire pivoter à droite", - "rotate-left": "Faire pivoter à gauche", - "rotate-alert-mssg": "Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", - "templateid": "ID de modèle", - "bulk-send-subcription-alert": "Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", + "rotate-right" :"Faire pivoter à droite", + "rotate-left" :"Faire pivoter à gauche", + "rotate-alert-mssg" :"Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", + "templateid":"ID de modèle", + "bulk-send-subcription-alert":"Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", "generate-test-token": "Générer jeton de test", - "regenerate-test-token": "Régénérer le jeton de test", - "help-test-token": "Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", - "help-api-token": "Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", - "reason": "Raison", - "decline-by": "Refusé/révoqué par", - "document-declined": "document refusé", - "public-template-mssg-1": "Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", - "public-template-mssg-2": "Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", - "public-template-mssg-3": "Besoin de plus de détails ou d'exemples ?", + "regenerate-test-token":"Régénérer le jeton de test", + "help-test-token":"Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", + "help-api-token":"Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", + "reason" :"Raison", + "decline-by" :"Refusé/révoqué par", + "document-declined":"document refusé", + "public-template-mssg-1" :"Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", + "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", + "public-template-mssg-3" :"Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", - "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", - "public-template-mssg-6": "Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", - "copy-code": "COPIE", - "copied-code": "COPIÉ", - "Installation": "Installation", - "Usage": "Usage", - "insufficient-credits": "Crédits de signature insuffisants", - "insufficient-credits-mssg": "Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", - "angular-npm-mssg-1": "Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", - "quota-mail-info-head": "Limite mensuelle d'e-mails de signatures de demandes", + "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", + "public-template-mssg-6":"Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", + "copy-code":"COPIE", + "copied-code":"COPIÉ", + "Installation":"Installation", + "Usage" :"Usage", + "insufficient-credits":"Crédits de signature insuffisants", + "insufficient-credits-mssg" :"Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", + "angular-npm-mssg-1" :"Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", + "quota-mail-info-head":"Limite mensuelle d'e-mails de signatures de demandes", "quota-mail-info": "Vous pouvez envoyer jusqu'à 15 e-mails de demande de signature chaque mois. Mettez à niveau maintenant pour envoyer directement des demandes de signature illimitées.", "quota-mail": "Vous avez atteint votre limite de 15 e-mails de demande de signature pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", - "quota-mail-tip-tip": "Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", - "quota-mail-head": "Quota atteint", - "unauthorized-modal": "Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", - "sent-this-month": "envoyé ce mois-ci", - "available-seats": "Disponible sièges", - "buy-users": "Acheter plus d'utilisateurs", + "quota-mail-tip-tip":"Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", + "quota-mail-head":"Quota atteint", + "unauthorized-modal":"Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", + "sent-this-month":"envoyé ce mois-ci", + "available-seats":"Disponible sièges", + "buy-users":"Acheter plus d'utilisateurs", "isenable-otp": "Activer la vérification OTP", "isenable-otp-help": { "p1": "Souhaitez-vous activer le processus de vérification à l'aide d'un mot de passe à usage unique (OTP)?", @@ -662,12 +663,14 @@ "p3": "La sélection de cette option désactivera la vérification OTP, permettant aux utilisateurs de signer le document directement sans étapes supplémentaires.", "p4": "Veuillez choisir l'option qui correspond le mieux à vos exigences en matière de signature de documents." }, - "advanced-options": "Options avancées", + "advanced-options":"Options avancées", "hide-advanced-options": "Masquer les options avancées", - "download-files": "Télécharger des fichiers", - "download-pdf": "Télécharger le PDF", - "pdf-certificate": "Télécharger Pdf + Certificat", - "document-logs": "Journaux de documents", + "download-files" :"Télécharger des fichiers", + "download-pdf" :"Télécharger le PDF", + "pdf-certificate" :"Télécharger Pdf + Certificat", + "document-logs":"Journaux de documents", "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs." + + } From 429b7dcb0e0b002d04a1a98f02e59d365e11c003 Mon Sep 17 00:00:00 2001 From: RaktimaNXG <raktima.c@nxglabs.com> Date: Thu, 26 Sep 2024 16:06:37 +0530 Subject: [PATCH 5/9] fix: refactor code --- .../public/locales/en/translation.json | 3 +- .../public/locales/fr/translation.json | 3 +- .../src/primitives/GetReportDisplay.js | 2 +- .../src/script/locales/en/translation.json | 3 +- .../src/script/locales/fr/translation.json | 87 +++++++++---------- 5 files changed, 50 insertions(+), 48 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 8c5ed8c71..2249deb0c 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -671,6 +671,7 @@ "pdf-certificate":"Download Pdf + Certificate", "document-logs":"Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", - "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users." + "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users.", + "public-tour-message":"Please make template public to copy public URL" } diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 0e239aaf6..95a3c3f6f 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -670,7 +670,8 @@ "pdf-certificate" :"Télécharger Pdf + Certificat", "document-logs":"Journaux de documents", "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", - "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs." + "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs.", + "public-tour-message":"Veuillez rendre le modèle public pour copier l'URL publique" } diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js index 13c2843cb..920246cde 100644 --- a/apps/OpenSign/src/primitives/GetReportDisplay.js +++ b/apps/OpenSign/src/primitives/GetReportDisplay.js @@ -1150,7 +1150,7 @@ const ReportTable = (props) => { const publicTourConfig = [ { selector: '[data-tut="IsPublic"]', - content: "Please make template public to copy public URL", + content: t("public-tour-message"), position: "top", style: { fontSize: "13px" } } diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index 8c5ed8c71..2249deb0c 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -671,6 +671,7 @@ "pdf-certificate":"Download Pdf + Certificate", "document-logs":"Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", - "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users." + "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users.", + "public-tour-message":"Please make template public to copy public URL" } diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index 0e239aaf6..00e671adf 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -42,7 +42,7 @@ "upgrade-to": "Mettre à niveau vers", "pro": "PRO", "plan": "Offre", - "subscribe-card-teamplan":"Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", + "subscribe-card-teamplan": "Libérez toute la puissance de la collaboration ! Créez un nombre illimité d'organisations, d'équipes et de hiérarchies. Partagez des modèles de manière transparente entre les équipes et attribuez des rôles d'utilisateur personnalisés. Améliorez votre flux de travail dès aujourd'hui !", "subscribe-card-plan": "Débloquez des fonctionnalités premium à partir de seulement {{premiumPrice}}/mois. Bénéficiez de performances améliorées et de seulement {{addonPrice}} par crédit supplémentaire après vos crédits premium inclus.", "user-name-limit-char": "Pour avoir un nom d'utilisateur de moins de 8 caractères s'il vous plaît s'abonner", "tour-content": "Ne plus afficher", @@ -153,7 +153,7 @@ "option": "Option", "Embed": "Intégrer", "Copy TemplateId": "Copier l'ID du modèle", - "Copy Public URL":"Copier l'URL publique" + "Copy Public URL": "Copier l'URL publique" }, "report-help": { "Draft Documents": "Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi.", @@ -616,46 +616,46 @@ "Add-seats": "Ajouter des sièges", "format": "format", "select-date-format": "Sélectionnez un format de date", - "quantity-of-credits":"Quantité de crédits de prime", - "remaining-credits":"Crédits premium disponibles :", - "additional-credits":"Veuillez acheter des crédits premium", - "remaining-credits-help":"Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", + "quantity-of-credits": "Quantité de crédits de prime", + "remaining-credits": "Crédits premium disponibles :", + "additional-credits": "Veuillez acheter des crédits premium", + "remaining-credits-help": "Utilisez des crédits premium pour la signature de documents API, l'envoi groupé ou l'intégration d'OpenSign sur votre site Web. Il vous reste {{allowedcredits}} crédits inclus et {{addoncredits}} crédits achetés supplémentaires.", "quota-err-quicksend": "Quota atteint, vous n'avez pas assez de crédits.", "buy-credits": "Acheter des crédits premium", - "rotate-right" :"Faire pivoter à droite", - "rotate-left" :"Faire pivoter à gauche", - "rotate-alert-mssg" :"Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", - "templateid":"ID de modèle", - "bulk-send-subcription-alert":"Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", + "rotate-right": "Faire pivoter à droite", + "rotate-left": "Faire pivoter à gauche", + "rotate-alert-mssg": "Tous les widgets de cette page seront perdus. Êtes-vous sûr de vouloir continuer ?", + "templateid": "ID de modèle", + "bulk-send-subcription-alert": "Veuillez passer au forfait Professionnel ou Équipe pour utiliser Quicksend.", "generate-test-token": "Générer jeton de test", - "regenerate-test-token":"Régénérer le jeton de test", - "help-test-token":"Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", - "help-api-token":"Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", - "reason" :"Raison", - "decline-by" :"Refusé/révoqué par", - "document-declined":"document refusé", - "public-template-mssg-1" :"Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", - "public-template-mssg-2" :"Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", - "public-template-mssg-3" :"Besoin de plus de détails ou d'exemples ?", + "regenerate-test-token": "Régénérer le jeton de test", + "help-test-token": "Ce jeton peut être utilisé pour tester les API au niveau du point de terminaison https://sandbox.opensignlabs.com/api/v1, vous permettant ainsi d'effectuer un nombre illimité de signatures de documents. Veuillez noter que l'API sandbox signera vos documents avec des certificats auto-signés, qui peuvent ne pas être reconnus comme valides par Adobe. Une fois vos tests terminés, vous pouvez passer à l’un de nos forfaits payants pour générer un jeton de production.", + "help-api-token": "Ce jeton peut être utilisé pour accéder aux API de production au point de terminaison {{origin}}/api/v1. Il ne peut être généré que sur l'un de nos forfaits payants.", + "reason": "Raison", + "decline-by": "Refusé/révoqué par", + "document-declined": "document refusé", + "public-template-mssg-1": "Pour intégrer OpenSign dans votre projet React ou Next.js, exécutez simplement la commande suivante :", + "public-template-mssg-2": "Assurez-vous que npm ou Yarn est configuré dans votre projet. Si vous utilisez Yarn, vous pouvez remplacer npm install par Yarn Add @opensign/react.", + "public-template-mssg-3": "Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", - "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", - "public-template-mssg-6":"Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", - "copy-code":"COPIE", - "copied-code":"COPIÉ", - "Installation":"Installation", - "Usage" :"Usage", - "insufficient-credits":"Crédits de signature insuffisants", - "insufficient-credits-mssg" :"Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", - "angular-npm-mssg-1" :"Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", - "quota-mail-info-head":"Limite mensuelle d'e-mails de signatures de demandes", + "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", + "public-template-mssg-6": "Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", + "copy-code": "COPIE", + "copied-code": "COPIÉ", + "Installation": "Installation", + "Usage": "Usage", + "insufficient-credits": "Crédits de signature insuffisants", + "insufficient-credits-mssg": "Le propriétaire de ce document ne dispose actuellement pas des crédits OpenSign nécessaires pour que vous puissiez le signer. Veuillez contacter le propriétaire si vous avez besoin de plus de détails.", + "angular-npm-mssg-1": "Pour intégrer OpenSign dans votre projet Angular, exécutez simplement la commande suivante :", + "quota-mail-info-head": "Limite mensuelle d'e-mails de signatures de demandes", "quota-mail-info": "Vous pouvez envoyer jusqu'à 15 e-mails de demande de signature chaque mois. Mettez à niveau maintenant pour envoyer directement des demandes de signature illimitées.", "quota-mail": "Vous avez atteint votre limite de 15 e-mails de demande de signature pour ce mois. Mettez à niveau maintenant pour continuer à envoyer des e-mails directement.", - "quota-mail-tip-tip":"Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", - "quota-mail-head":"Quota atteint", - "unauthorized-modal":"Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", - "sent-this-month":"envoyé ce mois-ci", - "available-seats":"Disponible sièges", - "buy-users":"Acheter plus d'utilisateurs", + "quota-mail-tip-tip": "Astuce : Vous pouvez toujours signer un nombre <1>illimité de documents</1> en partageant manuellement les liens de demande de signature.", + "quota-mail-head": "Quota atteint", + "unauthorized-modal": "Vous n'êtes pas autorisé à effectuer cette action, veuillez contacter {{adminEmail}}.", + "sent-this-month": "envoyé ce mois-ci", + "available-seats": "Disponible sièges", + "buy-users": "Acheter plus d'utilisateurs", "isenable-otp": "Activer la vérification OTP", "isenable-otp-help": { "p1": "Souhaitez-vous activer le processus de vérification à l'aide d'un mot de passe à usage unique (OTP)?", @@ -663,14 +663,13 @@ "p3": "La sélection de cette option désactivera la vérification OTP, permettant aux utilisateurs de signer le document directement sans étapes supplémentaires.", "p4": "Veuillez choisir l'option qui correspond le mieux à vos exigences en matière de signature de documents." }, - "advanced-options":"Options avancées", + "advanced-options": "Options avancées", "hide-advanced-options": "Masquer les options avancées", - "download-files" :"Télécharger des fichiers", - "download-pdf" :"Télécharger le PDF", - "pdf-certificate" :"Télécharger Pdf + Certificat", - "document-logs":"Journaux de documents", + "download-files": "Télécharger des fichiers", + "download-pdf": "Télécharger le PDF", + "pdf-certificate": "Télécharger Pdf + Certificat", + "document-logs": "Journaux de documents", "server-down": "Impossible de se connecter au serveur OpenSign. Si vous hébergez vous-même OpenSign, veuillez vous assurer que toutes les étapes de la documentation ont été correctement suivies. Si vous exécutez OpenSign localement, vous y accédez peut-être via un numéro de port incorrect.", - "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs." - - + "admin-exists": "L'administrateur existe déjà. Veuillez vous connecter à l'application en utilisant les informations d'identification de l'administrateur afin de gérer les utilisateurs.", + "public-tour-message": "Veuillez rendre le modèle public pour copier l'URL publique" } From e34f52dcc512e1b38b7ab7c148d0cc2370a4b930 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <prafull.navkar@nxglabs.com> Date: Thu, 26 Sep 2024 17:02:42 +0530 Subject: [PATCH 6/9] fix: when pull latest using docker pdf files get remove with useLocal --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 63d4e19d6..ce20f63c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,8 @@ services: server: image: opensign/opensignserver:main container_name: OpenSignServer-container + volumes: + - opensign-files:/usr/src/app/files ports: - "8080:8080" depends_on: @@ -56,3 +58,4 @@ volumes: web-root: caddy_data: caddy_config: + opensign-files: From 4d6cdf882340f36406a9384f212e81cadca5d8e2 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <prafull.navkar@nxglabs.com> Date: Thu, 26 Sep 2024 17:05:06 +0530 Subject: [PATCH 7/9] fix: admin exists error --- apps/OpenSign/src/pages/UpdateExistUserAdmin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js index bb5e744cc..aa5592ff6 100644 --- a/apps/OpenSign/src/pages/UpdateExistUserAdmin.js +++ b/apps/OpenSign/src/pages/UpdateExistUserAdmin.js @@ -15,6 +15,7 @@ const UpdateExistUserAdmin = () => { const [isAlert, setIsAlert] = useState({ type: "danger", msg: "" }); useEffect(() => { checkIsAdminExist(); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const checkIsAdminExist = async () => { @@ -22,7 +23,7 @@ const UpdateExistUserAdmin = () => { const isAdminExist = await Parse.Cloud.run("checkadminexist"); if (isAdminExist !== "not_exist") { // console.log("isAdminExist ", isAdminExist); - setErrMsg("Admin already exists."); + setErrMsg(t("admin-exists")); } } catch (err) { console.log("Err in checkadminexist", err); From bef8fbf18334e2b6134102684d09f0c5fb9aa219 Mon Sep 17 00:00:00 2001 From: RaktimaNXG <raktima.c@nxglabs.com> Date: Fri, 27 Sep 2024 14:56:38 +0530 Subject: [PATCH 8/9] update the Angular code snippet syntax for use in the @opensign/angular package --- .../public/locales/en/translation.json | 2 +- .../public/locales/fr/translation.json | 2 +- apps/OpenSign/src/components/pdf/EmbedTab.js | 6 +- apps/OpenSign/src/pages/PdfRequestFiles.js | 2 + .../src/script/locales/en/translation.json | 83 +++++++++---------- .../src/script/locales/fr/translation.json | 2 +- 6 files changed, 49 insertions(+), 48 deletions(-) diff --git a/apps/OpenSign/public/locales/en/translation.json b/apps/OpenSign/public/locales/en/translation.json index 2249deb0c..19f3e5610 100644 --- a/apps/OpenSign/public/locales/en/translation.json +++ b/apps/OpenSign/public/locales/en/translation.json @@ -640,7 +640,7 @@ "public-template-mssg-3" :"Need more details or examples?", "public-template-mssg-4": "Visit the", "public-template-mssg-5": " npm for the latest updates, detailed documentation, and version history.", - "public-template-mssg-6" :"You need to set this template as public before you can utilize this code snippet.", + "public-template-mssg-6" :"Before you can use this code snippet, you must make this template public.", "copy-code":"COPY", "copied-code":"COPIED", "Installation":"Installation", diff --git a/apps/OpenSign/public/locales/fr/translation.json b/apps/OpenSign/public/locales/fr/translation.json index 95a3c3f6f..0e1cce477 100644 --- a/apps/OpenSign/public/locales/fr/translation.json +++ b/apps/OpenSign/public/locales/fr/translation.json @@ -639,7 +639,7 @@ "public-template-mssg-3" :"Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", - "public-template-mssg-6":"Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", + "public-template-mssg-6":"Avant de pouvoir utiliser cet extrait de code, vous devez rendre ce modèle public.", "copy-code":"COPIE", "copied-code":"COPIÉ", "Installation":"Installation", diff --git a/apps/OpenSign/src/components/pdf/EmbedTab.js b/apps/OpenSign/src/components/pdf/EmbedTab.js index ca3991b9b..c60686f76 100644 --- a/apps/OpenSign/src/components/pdf/EmbedTab.js +++ b/apps/OpenSign/src/components/pdf/EmbedTab.js @@ -34,7 +34,7 @@ export function App() { <Opensign onLoad={() => console.log("success")} onLoadError={(error) => console.log(error)} - templateId= {"${props.templateId}"} + templateId= "${props.templateId}" /> </div> ); @@ -63,10 +63,10 @@ import {OpensignComponent} from "@opensign/angular" selector:'app-root', standalone: true, imports: [OpensignComponent], - template: '<opensign templateId={"${props.templateId}"} + template:\`<opensign templateId="${props.templateId}" (onLoad)="handleLoad()" (onLoadError)="handleError($event)" - ></opensign>', + ></opensign>\`, }) export class AppComponent{ handleLoad() { diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js index ea6fa89f4..44a06b314 100644 --- a/apps/OpenSign/src/pages/PdfRequestFiles.js +++ b/apps/OpenSign/src/pages/PdfRequestFiles.js @@ -284,6 +284,7 @@ function PdfRequestFiles(props) { } } //function for get document details for perticular signer with signer'object id + //whenever change anything in this function check react/angular packages also in plan js const getTemplateDetails = async () => { try { const params = { templateId: props.templateId, ispublic: true }; @@ -309,6 +310,7 @@ function PdfRequestFiles(props) { throw new Error("error: Invalid TemplateId"); } else if (documentData && documentData.length > 0) { if (documentData[0]?.IsPublic) { + //handle condition when someone use plan js then setTemplateStatus is not supporting props?.setTemplateStatus && props?.setTemplateStatus({ status: "Success" diff --git a/apps/OpenSign/src/script/locales/en/translation.json b/apps/OpenSign/src/script/locales/en/translation.json index 2249deb0c..3e9970d37 100644 --- a/apps/OpenSign/src/script/locales/en/translation.json +++ b/apps/OpenSign/src/script/locales/en/translation.json @@ -41,7 +41,7 @@ "upgrade-now": "Upgrade now", "upgrade-to": "Upgrade to", "plan": "Plan", - "subscribe-card-teamplan":"Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", + "subscribe-card-teamplan": "Unlock the full power of collaboration! Create unlimited organizations, teams, and hierarchies. Share templates seamlessly across teams and assign custom user roles. Elevate your workflow today!", "subscribe-card-plan": "Unlock premium features starting at just {{premiumPrice}}/month. Enjoy enhanced performance and only {{addonPrice}} per additional credit after your included premium credits.", "user-name-limit-char": "To have a username less than 8 character please subscribe", "tour-content": "Don't show this again", @@ -132,8 +132,8 @@ "View": "View", "option": "Option", "Embed": "Embed", - "Copy TemplateId":"Copy TemplateId", - "Copy Public URL":"Copy Public URL" + "Copy TemplateId": "Copy TemplateId", + "Copy Public URL": "Copy Public URL" }, "report-heading": { "Sr.No": "Sr.No", @@ -267,7 +267,7 @@ "public-role": "Public role", "public-url": "Public URL", "public-url-copy": "Here’s your public URL: ", - "public-url-copy-mssg":"Copy it or share it with the signer, and you will be able to see all your publicly set templates.", + "public-url-copy-mssg": "Copy it or share it with the signer, and you will be able to see all your publicly set templates.", "add-public-url-alert": "Please add your public URL, and you will be able to make a public template.", "share-with-alert": "You cannot share a template if any roles already have contacts assigned. Please remove all contact assignments from the roles before sharing the template.", "share-with": "Share with", @@ -598,7 +598,7 @@ "Recently sent for signatures": "This is a list of documents you've sent to other parties for signature.", "Drafts": "This are documents you have started but have not finalized for sending.", "public-template": "This video demonstrates how to set up your personalized public profile, such as ‘https://opensign.me/your-username’. You’ll also learn how to customize your tagline and make your templates available for public signing." - }, + }, "enter-email-plaholder": "Add an email address and hit enter", "success-email-alert": "Email sent successfully!", "expired-doc-title": "Expired Document", @@ -619,44 +619,44 @@ "select-date-format": "Select a date format", "quantity-of-credits": "Quantity of premium credits", "remaining-credits": "Premium credits available:", - "remaining-credits-help":"Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", + "remaining-credits-help": "Use premium credits for API document signing, bulk sending, or embedding OpenSign integration on your website. You have {{allowedcredits}} included credits and {{addoncredits}} additional purchased credits remaining.", "additional-credits": "Please purchase premium credits", "quota-err-quicksend": "Quota Reached, You don't have enough credits.", "buy-credits": "Buy Premium Credits", - "rotate-right":"Rotate right", - "rotate-left":"Rotate left", - "rotate-alert-mssg":"All widgets on this page will be lost. Are you sure you want to proceed?", - "templateid":"Template-Id", - "bulk-send-subcription-alert":"Please upgrade to Professional or Team plan to use bulk send.", - "generate-test-token":"Generate Test Token", - "regenerate-test-token":"Regenerate Test Token", - "help-test-token":"This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", - "help-api-token":"This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", - "reason":"Reason", - "decline-by":"Declined/revoked by", + "rotate-right": "Rotate right", + "rotate-left": "Rotate left", + "rotate-alert-mssg": "All widgets on this page will be lost. Are you sure you want to proceed?", + "templateid": "Template-Id", + "bulk-send-subcription-alert": "Please upgrade to Professional or Team plan to use bulk send.", + "generate-test-token": "Generate Test Token", + "regenerate-test-token": "Regenerate Test Token", + "help-test-token": "This token can be used to test the APIs at the https://sandbox.opensignlabs.com/api/v1 endpoint, allowing you to conduct unlimited document signatures. Please note that the sandbox API will sign your documents with self-signed certificates, which may not be recognized as valid by Adobe. Once you’ve completed your testing, you can upgrade to one of our paid plans to generate a production token.", + "help-api-token": "This token can be used to access the production APIs at the {{origin}}/api/v1 endpoint. It can only be generated on one of our paid plans.", + "reason": "Reason", + "decline-by": "Declined/revoked by", "document-declined": "Document declined", - "public-template-mssg-1":"To integrate OpenSign into your React or Next.js project, simply run the following command:", - "public-template-mssg-2" :"Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", - "public-template-mssg-3" :"Need more details or examples?", + "public-template-mssg-1": "To integrate OpenSign into your React or Next.js project, simply run the following command:", + "public-template-mssg-2": "Ensure you have npm or yarn set up in your project. If you’re using Yarn, you can replace npm install with yarn add @opensign/react.", + "public-template-mssg-3": "Need more details or examples?", "public-template-mssg-4": "Visit the", "public-template-mssg-5": " npm for the latest updates, detailed documentation, and version history.", - "public-template-mssg-6" :"You need to set this template as public before you can utilize this code snippet.", - "copy-code":"COPY", - "copied-code":"COPIED", - "Installation":"Installation", - "Usage" :"Usage", - "insufficient-credits":"Insufficient Signing Credits", - "insufficient-credits-mssg":"The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", + "public-template-mssg-6": "Before you can use this code snippet, you must make this template public.", + "copy-code": "COPY", + "copied-code": "COPIED", + "Installation": "Installation", + "Usage": "Usage", + "insufficient-credits": "Insufficient Signing Credits", + "insufficient-credits-mssg": "The owner of this document currently lacks the necessary OpenSign credits for you to sign. Please reach out to the owner if you require further details.", "angular-npm-mssg-1": "To integrate OpenSign into your Angular project, simply run the following command:", - "quota-mail-info-head":"Monthly request signatures email limit", + "quota-mail-info-head": "Monthly request signatures email limit", "quota-mail-info": "You can send upto 15 signature request emails every month. Upgrade now to send unlimited signing requests directly.", "quota-mail": "You've reached your limit of 15 signature request emails for this month. Upgrade now to continue sending emails directly.", - "quota-mail-tip":"Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", - "quota-mail-head":"Quota Reached", - "unauthorized-modal":"You don't have permission to perform this action, please contact {{adminEmail}}.", - "sent-this-month":"Sent this month", - "available-seats":"Available seats", - "buy-users":"Buy more users", + "quota-mail-tip": "Tip: You can still sign <1>unlimited documents</1> by manually sharing the signing request links.", + "quota-mail-head": "Quota Reached", + "unauthorized-modal": "You don't have permission to perform this action, please contact {{adminEmail}}.", + "sent-this-month": "Sent this month", + "available-seats": "Available seats", + "buy-users": "Buy more users", "isenable-otp": "Enable OTP verification", "isenable-otp-help": { "p1": "Would you like to enable the verification process using a one-time password (OTP)?", @@ -664,14 +664,13 @@ "p3": "Selecting this option will disable OTP verification, allowing users to sign the document directly without additional steps.", "p4": "Please choose the option that best suits your document signing requirements." }, - "advanced-options":"Advanced options", - "hide-advanced-options":"Hide Advanced options", - "download-files":"Download files", - "download-pdf":"Download Pdf", - "pdf-certificate":"Download Pdf + Certificate", - "document-logs":"Document logs", + "advanced-options": "Advanced options", + "hide-advanced-options": "Hide Advanced options", + "download-files": "Download files", + "download-pdf": "Download Pdf", + "pdf-certificate": "Download Pdf + Certificate", + "document-logs": "Document logs", "server-down": "Unable to connect to the OpenSign server. If you are self-hosting OpenSign, please ensure that all the steps in the documentation have been followed correctly. If you're running OpenSign locally, you might be accessing it through an incorrect port number.", "admin-exists": "Admin already exists. Please login to the application using admin credentials in order to manage users.", - "public-tour-message":"Please make template public to copy public URL" - + "public-tour-message": "Please make template public to copy public URL" } diff --git a/apps/OpenSign/src/script/locales/fr/translation.json b/apps/OpenSign/src/script/locales/fr/translation.json index 00e671adf..6b3cde993 100644 --- a/apps/OpenSign/src/script/locales/fr/translation.json +++ b/apps/OpenSign/src/script/locales/fr/translation.json @@ -639,7 +639,7 @@ "public-template-mssg-3": "Besoin de plus de détails ou d'exemples ?", "public-template-mssg-4": "Visitez le", "public-template-mssg-5": "npm pour les dernières mises à jour, une documentation détaillée et l'historique des versions.", - "public-template-mssg-6": "Vous devez définir ce modèle comme public avant de pouvoir utiliser cet extrait de code.", + "public-template-mssg-6": "Avant de pouvoir utiliser cet extrait de code, vous devez rendre ce modèle public.", "copy-code": "COPIE", "copied-code": "COPIÉ", "Installation": "Installation", From 76a69d8f3bb5cbb5c5d9bd28b175e7fc4e2b06df Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <prafull.navkar@nxglabs.com> Date: Mon, 30 Sep 2024 10:42:31 +0530 Subject: [PATCH 9/9] fix: enableOTP is not working correctly --- .../customRoute/v1/routes/CreateDocumentWithTemplate.js | 5 +++-- .../cloud/customRoute/v1/routes/updateDocument.js | 4 ++-- .../cloud/customRoute/v1/routes/updateTemplate.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js index ec344b130..b0a46e603 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js @@ -196,8 +196,9 @@ export default async function createDocumentWithTemplate(request, response) { if (TimeToCompleteDays) { object.set('TimeToCompleteDays', TimeToCompleteDays); } - const enableOTP = request.body?.enableOTP === true ? true : false; - const IsEnableOTP = enableOTP || template?.IsEnableOTP || false; + const enableOTP = request.body?.enableOTP; + const IsEnableOTP = + enableOTP !== undefined ? enableOTP : template?.IsEnableOTP || false; object.set('IsEnableOTP', IsEnableOTP); object.set('CreatedBy', template.CreatedBy); object.set('ExtUserPtr', { diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js index 81a3fa5d3..f2ea62ce6 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateDocument.js @@ -48,10 +48,10 @@ export default async function updateDocument(request, response) { objectId: request?.body?.folderId, }); } - - if (request.body?.enableOTP) { + if (request.body?.enableOTP !== undefined) { updateQuery.set('IsEnableOTP', request.body?.enableOTP); } + const updatedRes = await updateQuery.save(null, { useMasterKey: true }); if (updatedRes) { if (request.posthog) { diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js index 735e699aa..87bbcf11b 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/updateTemplate.js @@ -48,7 +48,7 @@ export default async function updateTemplate(request, response) { objectId: request?.body?.folderId, }); } - if (request.body?.enableOTP) { + if (request.body?.enableOTP !== undefined) { updateQuery.set('IsEnableOTP', request.body?.enableOTP); } const updatedRes = await updateQuery.save(null, { useMasterKey: true });