-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
173 lines (154 loc) · 8.15 KB
/
index.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>
<!--JS INCLUDED-->
<script type="text/javascript" src="js/prodpad-methods.js"></script>
<script type="text/javascript" src="js/generic-methods.js"></script>
<!--JS CDN-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://dl.frontapp.com/libs/frontjs.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!--Fonts-->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Form Name</legend>
<!-- Text input-->
<div class="form-group" id="inputFields">
<label class="col-md-4 control-label" for="inputIdeaTitle">💡Idea Title</label>
<div class="col-md-4">
<input id="inputIdeaTitle" name="inputIdeaTitle" type="text" placeholder="What is the name of your idea?" class="form-control input-md" required="">
<span class="help-block"></span>
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label" for="textAreaDescription">📝 Idea Description</label>
<div class="col-md-4">
<textarea class="form-control" id="textAreaDescription" name="textAreaDescription" placeholder="How would you describe the idea that you've having?"></textarea>
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label" for="textAreaProblem">⛔️ Problem to Solve</label>
<div class="col-md-4">
<textarea class="form-control" id="textAreaProblem" name="textAreaProblem" placeholder="What problem are you trying to solve?"></textarea>
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label" for="textAreaValue">💰 Value for Solving</label>
<div class="col-md-4">
<textarea class="form-control" id="textAreaValue" name="textAreaValue" placeholder="What value would it provide if it were solved?"></textarea>
</div>
</div>
<!-- Select Basic -->
<div class="form-group">
<label class="col-md-4 control-label" for="selectProduct">Add Products...</label>
<div class="col-md-4">
<select id="selectProduct" name="selectProduct" class="form-control">
<option value="62090">ASK</option>
<option value="62091">ANALYZE</option>
<option value="62092">ACT</option>
<option value="62378">MOBILE</option>
</select>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="inputLinkName">Conversation ID</label>
<div class="col-md-4">
<input id="inputLinkName" name="inputLinkName" type="text" placeholder="" class="form-control input-md" required="">FrontApp Permalink</input>
<span class="help-block">*please do not alter this</span>
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="inputLinkUrl">Conversation Link</label>
<div class="col-md-4">
<input id="inputLinkUrl" name="inputLinkUrl" type="text" placeholder="" class="form-control input-md" required="" readonly>
<span class="help-block">*please do not alter this</span>
</div>
</div>
<!-- Submit Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="buttonSubmit"></label>
<div class="col-md-4">
<button id="buttonSubmit" name="buttonSubmit" class="btn btn-primary">Submit Idea</button>
</div>
</div>
<!-- Reset Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="buttonReset"></label>
<div class="col-md-4">
<button id="buttonReset" name="buttonReset" class="btn btn-warning">Reset Fields</button>
</div>
</div>
</fieldset>
</div>
<!-- Button trigger modal -->
<div class="form-group">
<label class="col-md-8 control-label" for="buttonSubmit"></label>
<div class="col-md-8">
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#settingsModal" id="settingsButton">
⚙️ Settings
</button>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog" aria-labelledby="settingsModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="settingsModalLabel">Plugin Settings</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<input id="inputSettingsKey" name="inputIdeaTitle" type="text" placeholder="Please add your API key here" class="form-control input-md">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="buttonSaveChanges">Save changes</button>
</div>
</div>
</div>
</div>
<!-- Additional JavaScript for plugin-->
<script type="text/javascript" src="js/axios-methods.js"></script>
<script>
$('#settingsModal').on('shown.bs.modal', function() {
$('#myInput').trigger('focus')
});
document.getElementById("buttonSaveChanges").addEventListener("click", function() {
var keyvar = document.getElementById("inputSettingsKey").value;
console.log(keyvar);
window.setLocalStorage("apikey", keyvar);
});
</script>
<script>
Front.on('conversation', function(data) {
var conversation = data.conversation;
// triggered when a conversation is loaded
console.log(conversation.id);
console.log(conversation.link);
document.getElementById("inputLinkName").value = conversation.id;
document.getElementById("inputLinkUrl").value = conversation.link;
});
</script>
</body>
</html>