Skip to content

Commit 8b15bce

Browse files
Merge pull request #472 from OpenSignLabs/signature_setting
fix: already placed signature widget setting icon issue with old data
2 parents 3bc57a9 + 86b0e90 commit 8b15bce

14 files changed

+472
-324
lines changed

apps/OpenSign/src/components/pdf/DropdownWidgetOption.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState } from "react";
22
import { themeColor } from "../../constant/const";
33
import ModalUi from "../../primitives/ModalUi";
4+
import { radioButtonWidget } from "../../constant/Utils";
45
function DropdownWidgetOption(props) {
56
const [dropdownOptionList, setDropdownOptionList] = useState([
67
"option-1",
@@ -143,7 +144,7 @@ function DropdownWidgetOption(props) {
143144
// styleClass={"dropdownModal"}
144145
isOpen={props.showDropdown}
145146
title={props.title}
146-
closeOff={true}
147+
showClose={false}
147148
>
148149
<div style={{ height: "100%", padding: 20 }}>
149150
<form
@@ -153,7 +154,7 @@ function DropdownWidgetOption(props) {
153154
}}
154155
>
155156
<div className="dropdownContainer">
156-
{["checkbox", "radio"].includes(props.type) &&
157+
{["checkbox", radioButtonWidget].includes(props.type) &&
157158
!props.isSignYourself && (
158159
<div>
159160
<input
@@ -178,36 +179,6 @@ function DropdownWidgetOption(props) {
178179
className="drodown-input"
179180
/>
180181

181-
{props.type === "checkbox" && !props.isSignYourself && (
182-
<>
183-
<label style={{ fontSize: "13px", fontWeight: "600" }}>
184-
Minimun check
185-
</label>
186-
<input
187-
required
188-
defaultValue={0}
189-
value={minCount}
190-
onChange={(e) => {
191-
const count = handleSetMinMax(e);
192-
setMinCount(count);
193-
}}
194-
className="drodown-input"
195-
/>
196-
<label style={{ fontSize: "13px", fontWeight: "600" }}>
197-
Maximum check
198-
</label>
199-
<input
200-
required
201-
defaultValue={0}
202-
value={maxCount}
203-
onChange={(e) => {
204-
const count = handleSetMinMax(e);
205-
setMaxCount(count);
206-
}}
207-
className="drodown-input"
208-
/>
209-
</>
210-
)}
211182
<label
212183
style={{ fontSize: "13px", fontWeight: "600", marginTop: "5px" }}
213184
>
@@ -274,7 +245,6 @@ function DropdownWidgetOption(props) {
274245
></i>
275246
</div>
276247
))}
277-
278248
<i
279249
onClick={handleAddInput}
280250
style={{
@@ -285,8 +255,38 @@ function DropdownWidgetOption(props) {
285255
}}
286256
className="fa-solid fa-square-plus"
287257
></i>
258+
{props.type === "checkbox" && !props.isSignYourself && (
259+
<>
260+
<label style={{ fontSize: "13px", fontWeight: "600" }}>
261+
Minimun check
262+
</label>
263+
<input
264+
required
265+
defaultValue={0}
266+
value={minCount}
267+
onChange={(e) => {
268+
const count = handleSetMinMax(e);
269+
setMinCount(count);
270+
}}
271+
className="drodown-input"
272+
/>
273+
<label style={{ fontSize: "13px", fontWeight: "600" }}>
274+
Maximum check
275+
</label>
276+
<input
277+
required
278+
defaultValue={0}
279+
value={maxCount}
280+
onChange={(e) => {
281+
const count = handleSetMinMax(e);
282+
setMaxCount(count);
283+
}}
284+
className="drodown-input"
285+
/>
286+
</>
287+
)}
288288
</div>
289-
{["dropdown", "radio"].includes(props.type) && (
289+
{["dropdown", radioButtonWidget].includes(props.type) && (
290290
<>
291291
<label
292292
style={{
@@ -321,7 +321,7 @@ function DropdownWidgetOption(props) {
321321
</select>
322322
</>
323323
)}
324-
{props.type !== "checkbox" && props.type !== "radio" && (
324+
{props.type !== "checkbox" && props.type !== radioButtonWidget && (
325325
<>
326326
<div
327327
style={{

0 commit comments

Comments
 (0)