Skip to content

Commit ef68f2d

Browse files
authored
Merge pull request #393 from OpenSignLabs/api-v1-beta
2 parents 9e185fa + 9114908 commit ef68f2d

34 files changed

+782
-277
lines changed

apps/OpenSign/src/components/AppendFormInForm.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, useEffect } from "react";
22
import Parse from "parse";
33
import axios from "axios";
4+
import { modalCancelBtnColor, modalSubmitBtnColor } from "../constant/const";
45

56
const AppendFormInForm = (props) => {
67
const [name, setName] = useState("");
@@ -293,14 +294,16 @@ const AppendFormInForm = (props) => {
293294
<div className="mt-4 flex justify-start">
294295
<button
295296
type="submit"
296-
className="bg-[#1ab6ce] text-sm text-white px-4 py-2 rounded shadow focus:outline-none"
297+
style={{ backgroundColor: modalSubmitBtnColor }}
298+
className="mr-2 px-[20px] py-1.5 text-white rounded shadow-md text-center focus:outline-none "
297299
>
298300
Submit
299301
</button>
300302
<button
301303
type="button"
302304
onClick={() => handleReset()}
303-
className="bg-[#188ae2] text-sm text-white px-4 py-2 rounded ml-2 shadow focus:outline-none"
305+
style={{ backgroundColor: modalCancelBtnColor }}
306+
className="px-4 py-1.5 text-black border-[1px] border-[#ccc] shadow-md rounded focus:outline-none"
304307
>
305308
Reset
306309
</button>

apps/OpenSign/src/components/LoginGoogle.js

Lines changed: 89 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React, { useState, useRef } from "react";
22
import Parse from "parse";
33
import jwtDecode from "jwt-decode";
44
import { useScript } from "../hook/useScript";
5+
import ModalUi from "../primitives/ModalUi";
6+
import { modalCancelBtnColor, modalSubmitBtnColor } from "../constant/const";
57

68
/*
79
* `GoogleSignInBtn`as it's name indicates it render google sign in button
@@ -231,118 +233,94 @@ const GoogleSignInBtn = ({
231233
</div>
232234
)}
233235
<div ref={googleBtn} className="text-sm"></div>
234-
235-
{isModal && (
236-
<div
237-
className="modal fade show"
238-
id="exampleModal"
239-
tabIndex="-1"
240-
role="dialog"
241-
style={{ display: "block", zIndex: 1 }}
242-
>
243-
<div className="modal-dialog" role="document">
244-
<div className="modal-content">
245-
<div className="modal-header">
246-
<h5 className="modal-title">Sign up form</h5>
247-
<span>
248-
<span></span>
249-
</span>
250-
</div>
251-
<div className="modal-body">
252-
<form>
253-
<div className="form-group">
254-
<label
255-
htmlFor="Phone"
256-
style={{ display: "flex" }}
257-
className="col-form-label"
258-
>
259-
Phone{" "}
260-
<span style={{ fontSize: 13, color: "red" }}>*</span>
261-
</label>
262-
<input
263-
type="tel"
264-
className="form-control"
265-
id="Phone"
266-
value={userDetails.Phone}
267-
onChange={(e) =>
268-
setUserDetails({
269-
...userDetails,
270-
Phone: e.target.value
271-
})
272-
}
273-
required
274-
/>
275-
</div>
276-
<div className="form-group">
277-
<label
278-
htmlFor="Company"
279-
style={{ display: "flex" }}
280-
className="col-form-label"
281-
>
282-
Company{" "}
283-
<span style={{ fontSize: 13, color: "red" }}>*</span>
284-
</label>
285-
<input
286-
type="text"
287-
className="form-control"
288-
id="Company"
289-
value={userDetails.Company}
290-
onChange={(e) =>
291-
setUserDetails({
292-
...userDetails,
293-
Company: e.target.value
294-
})
295-
}
296-
required
297-
/>
298-
</div>
299-
<div className="form-group">
300-
<label
301-
htmlFor="JobTitle"
302-
style={{ display: "flex" }}
303-
className="col-form-label"
304-
>
305-
Job Title{" "}
306-
<span style={{ fontSize: 13, color: "red" }}>*</span>
307-
</label>
308-
<input
309-
type="text"
310-
className="form-control"
311-
id="JobTitle"
312-
value={userDetails.Destination}
313-
onChange={(e) =>
314-
setUserDetails({
315-
...userDetails,
316-
Destination: e.target.value
317-
})
318-
}
319-
required
320-
/>
321-
</div>
322-
<div>
323-
<button
324-
type="button"
325-
className="bg-[#17a2b8] p-2 text-white rounded"
326-
onClick={() => handleSubmitbtn()}
327-
style={{ marginRight: 10 }}
328-
>
329-
Sign up
330-
</button>
331-
<button
332-
type="button"
333-
className="bg-[#6c757d] p-2 text-white rounded"
334-
onClick={handleCloseModal}
335-
style={{ width: 90 }}
336-
>
337-
Cancel
338-
</button>
339-
</div>
340-
</form>
341-
</div>
342-
</div>
236+
<ModalUi showClose={false} isOpen={isModal} title="Sign up form">
237+
<form className="px-4 py-3">
238+
<div className="mb-3">
239+
<label
240+
htmlFor="Phone"
241+
style={{ display: "flex" }}
242+
className="block text-xs text-gray-700 font-semibold"
243+
>
244+
Phone <span style={{ fontSize: 13, color: "red" }}>*</span>
245+
</label>
246+
<input
247+
type="tel"
248+
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
249+
id="Phone"
250+
value={userDetails.Phone}
251+
onChange={(e) =>
252+
setUserDetails({
253+
...userDetails,
254+
Phone: e.target.value
255+
})
256+
}
257+
required
258+
/>
343259
</div>
344-
</div>
345-
)}
260+
<div className="mb-3">
261+
<label
262+
htmlFor="Company"
263+
style={{ display: "flex" }}
264+
className="block text-xs text-gray-700 font-semibold"
265+
>
266+
Company <span style={{ fontSize: 13, color: "red" }}>*</span>
267+
</label>
268+
<input
269+
type="text"
270+
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
271+
id="Company"
272+
value={userDetails.Company}
273+
onChange={(e) =>
274+
setUserDetails({
275+
...userDetails,
276+
Company: e.target.value
277+
})
278+
}
279+
required
280+
/>
281+
</div>
282+
<div className="mb-3">
283+
<label
284+
htmlFor="JobTitle"
285+
style={{ display: "flex" }}
286+
className="block text-xs text-gray-700 font-semibold"
287+
>
288+
Job Title <span style={{ fontSize: 13, color: "red" }}>*</span>
289+
</label>
290+
<input
291+
type="text"
292+
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
293+
id="JobTitle"
294+
value={userDetails.Destination}
295+
onChange={(e) =>
296+
setUserDetails({
297+
...userDetails,
298+
Destination: e.target.value
299+
})
300+
}
301+
required
302+
/>
303+
</div>
304+
<div>
305+
<button
306+
type="button"
307+
className="px-3 py-1.5 text-white rounded shadow-md text-center focus:outline-none "
308+
onClick={() => handleSubmitbtn()}
309+
style={{ marginRight: 10, backgroundColor: modalSubmitBtnColor }}
310+
>
311+
Sign up
312+
</button>
313+
<button
314+
type="button"
315+
className="p-1.5 text-black border-[1px] border-[#ccc] shadow-md rounded focus:outline-none"
316+
onClick={handleCloseModal}
317+
style={{ width: 90, backgroundColor: modalCancelBtnColor }}
318+
>
319+
Cancel
320+
</button>
321+
</div>
322+
</form>
323+
</ModalUi>
346324
</div>
347325
);
348326
};

apps/OpenSign/src/components/fields/SignersInput.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ const SignersInput = (props) => {
147147
right: "auto",
148148
bottom: "auto",
149149
transform: "translate(-50%, -50%)",
150+
border: "1px transparent",
150151
padding: 0
151152
},
152153
overlay: {
@@ -158,18 +159,15 @@ const SignersInput = (props) => {
158159
>
159160
<div className="min-w-full md:min-w-[500px]">
160161
<div
161-
type="button"
162-
className="flex justify-between items-center p-3 border-b-[1px] border-gray-300"
162+
className="flex justify-between rounded-t items-center py-[10px] px-[20px] text-white"
163+
style={{ background: "#32a3ac" }}
163164
>
164-
<div className=" text-black text-xl font-semibold pl-3">
165-
Add Signer
166-
</div>
167-
<button onClick={handleModalCloseClick}>
168-
<i
169-
style={{ fontSize: 25 }}
170-
className="fa fa-times-circle"
171-
aria-hidden="true"
172-
></i>
165+
<div className="text-[1.2rem] font-normal">Add Signer</div>
166+
<button
167+
onClick={handleModalCloseClick}
168+
className="text-[1.5rem] cursor-pointer focus:outline-none"
169+
>
170+
&times;
173171
</button>
174172
</div>
175173

apps/OpenSign/src/constant/const.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ export const rejectBtn =
55
"bg-[#ffffff] rounded-sm shadow-md text-[12px] font-semibold uppercase text-black py-1.5 px-4 focus:outline-none text-center border-[1px] border-[#b4b4b4]";
66
export const submitBtn =
77
"bg-[#32a3ac] rounded-sm shadow-md text-[12px] font-semibold uppercase text-white py-1.5 px-4 focus:outline-none text-center";
8+
export const modalSubmitBtnColor = "#17a2b8";
9+
export const modalCancelBtnColor = "white";

apps/OpenSign/src/json/plansArr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"planName": "THANKS PLAN",
2828
"currency": "$",
2929
"price": "29.99",
30-
"subtitle": "Use code 'FREEBETA' to get this for free(First 1000 users)",
30+
"subtitle": "Use code <span style='background-color: yellow;'>'FREEBETA'</span> to get this for free(First 1000 users)",
3131
"btnText": "Subscribe",
3232
"url": "https://subscriptions.zoho.in/subscribe/ef798486e6a0a11ea65f2bae8f2af901dbadf3175d495584fd25b9af5d2f2b9e/thanks",
3333
"target": "_self",

apps/OpenSign/src/routes/Form.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ const Forms = (props) => {
148148
const dropboxCancel = async () => {};
149149
const handleSubmit = async (e) => {
150150
e.preventDefault();
151+
e.stopPropagation();
151152
setIsSubmit(true);
152153
try {
153154
const currentUser = Parse.User.current();

0 commit comments

Comments
 (0)