-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopup-form.html
173 lines (150 loc) · 9 KB
/
popup-form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="/css/popup.min.css">
</head>
<body>
<div class="popup">
<div id="confirmation-sent" class="confirmation-sent">
<div class="success-icon">
<i class="material-icons">done</i>
</div>
<p>The form has been sent successfully.</p>
<p class="mt-10 light-text">The window will close automatically in <span id="count-down"
class="light-text">5</span> seconds</p>
<button type="button" id="close-window" class="btn btn-2 mt-20">Close</button>
</div>
<div class="popup-content">
<div class="popup-form">
<form action="" id="scratch-me-form" class="validate">
<div class="popup-form-item">
<h2>Extracted data from Facebook</h2>
</div>
<!-- PostID input -->
<div class="popup-form-item">
<label for="post-id">Post ID: </label>
<input type="text" id="post-id" name="post-id" pattern="[-+]?[0-9]*[.,]?[0-9]+"
placeholder="Enter the post id" required>
</div>
<!-- Author input -->
<div class="popup-form-item">
<label for="post-author">Author: </label>
<input type="text" id="post-author" placeholder="Enter the author of the post"
name="post-author" minlength="3" maxlength="40" pattern="[^()/><\][\\\x22,;|]+" required>
</div>
<!-- Date input -->
<div class="popup-form-item">
<label for="post-datetime">Date: </label>
<input type="datetime-local" id="post-datetime" name="post-datetime" required>
</div>
<!-- Title input -->
<div class="popup-form-item">
<label for="post-title">Title: </label>
<input type="text" id="post-title" placeholder="Enter the post title" name="post-title"
minlength="3" maxlength="40" required>
</div>
<div id="extracted-data" class="extracted-data-wrapper">
<!-- Url input -->
<div class="popup-form-item">
<label for="post-url">Post URL:</label>
<input type="url" id="post-url" name="post-url" placeholder="Enter the post URL"
minlength="2"
pattern="^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*)(?::\d{2,})?(?:[\/?#]\S*)?$"
size="30">
</div>
<!-- Content textarea -->
<div class="popup-form-item">
<label for="post-content">Content:</label>
<textarea id="post-content" name="post-content" rows="10" cols="35" minlength="3"
placeholder="Enter the content of the post"></textarea>
</div>
</div>
<div class="popup-form-item btn-wrapper">
<button id="show-extracted-data" class="btn btn-1">Hide extracted data</button>
<button type="reset" id="clear-data-btn" class="btn btn-1">Clear</button>
</div>
<!-- Choose format input -->
<div class="popup-form-item">
<label for="data-format">Choose a format:</label>
<select id="select-data-format">
<option value="">-- Please choose a format --</option>
<option value="copper">Copper CRM</option>
<option value="code-json">JSON</option>
<option value="code-curl">cURL</option>
</select>
</div>
<div id="copper" class="content-of-selected-option disabled">
<div class="popup-form-item btn-wrapper-left">
<button type="button" id="edit-connection" class="btn btn-1">Edit
connection</button>
</div>
<div id="copper-connection-wrapper" class="copper-connection-wrapper disabled">
<!-- Access Token input -->
<div class="popup-form-item">
<label for="access-token">X-PW-AccessToken:</label>
<input type="text" id="access-token" placeholder="YOUR_TOKEN_HERE" name="access-token">
</div>
<!-- Application name input -->
<div class="popup-form-item">
<label for="application-name">X-PW-Application:</label>
<input type="text" id="application-name" placeholder="developer_api"
name="application-name">
</div>
<!-- User application email input -->
<div class="popup-form-item">
<label for="user-application-email">X-PW-UserEmail:</label>
<input type="text" id="user-application-email" placeholder="YOUR_EMAIL_HERE"
name="user-application-email">
</div>
<div class="popup-form-item btn-wrapper">
<button type="button" id="test-connection" class="btn btn-1" disabled>Test
connection</button>
<button type="button" id="save-connection" class="btn btn-1" disabled>Save
connection</button>
</div>
</div>
<div id="copper-data-wrapper">
<div class="popup-form-item">
<label for="select-pipeline">Choose a pipeline:</label>
<select id="select-pipeline">
<option value="">-- Please choose a pipeline --</option>
</select>
</div>
<div class="popup-form-item">
<label for="contact-application-name">Contact name:</label>
<div id="status-text" class="status-text"></div>
<ul id="contact-application-name-list" class="contact-application-name-list"></ul>
</div>
</div>
<div class="popup-form-item btn-wrapper">
<button type="submit" class="btn btn-2 mt-10 mb-5" id="send-form" disabled>Send to
Copper</button>
</div>
</div>
<!-- Code area -->
<div id="code-area" class="popup-form-item content-of-selected-option disabled">
<button id="copy-to-clip-btn" title="Copy to clipboard" class="btn btn-copy">
<span class="copy-clip-message">Copied to clipboard</span>
</button>
<pre id="code-area-content"></pre>
<textarea name="copy-to-clipboard-content" id="copy-to-clipboard-content" cols="30"
rows="10"></textarea>
</div>
</form>
</div>
<footer class="popup-footer">
<p>
<a class="link" href="https://github.com/bravelab/scratchme-chrome-plugin"
title="GitHub - link to repository" target="_blank" rel="noopener noreferrer">ScratchMe</a>
save any Facebook Post to CRM.
</p>
<p>© <a href="https://bravelab.io" target="_blank"title="Bravelab website">Bravelab</a> 2019: Wszystkie prawa
zastrzeżone.</p>
</footer>
</div>
</div>
<script src="/scripts/popup-form.js" type="text/javascript"></script>
</body>
</html>