-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfs-autoform-test.html
216 lines (188 loc) · 7.32 KB
/
cfs-autoform-test.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<head>
<title>cfs-autoform-test</title>
</head>
<body>
<!-- Begin Page Layout -->
{{> layout}}
<!-- End Page Layout -->
<!-- Hidden elements-->
<!-- Single-File Modals -->
{{>addSingle}}
{{>updateQuickFormModalSingle}}
{{>updateAutoFormModalSingle}}
<!-- Multi-File Modals -->
{{>addMulti}}
{{>updateQuickFormModalMulti}}
{{>updateAutoFormModalMulti}}
<!-- End Hidden Elements -->
</body>
<template name="layout">
{{>header}}
{{>instructions}}
{{>navbarSingle}}
{{>single_files}}
{{>navbarMulti}}
{{>multi_files}}
{{>opts}}
{{>dbInfo}}
</template>
<template name="header">
<div class="page-header">
<h1 class="Header">Cfs-Autoform Test</h1>
</div>
</template>
<template name="instructions">
<div class="panel panel-default" id="accordion" role="tablist">
<div class="panel-heading" role="tab" id="instructionsTitle">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion"
href="#instructions" aria-expanded="true"
aria-controls="instructions">
Instructions
</a>
</h4>
</div>
<div id="instructions" class="panel-collapse collapse in" role="tabpanel"
aria-labelledby="instructions">
<div class="panel-body" >
<ul>
<li>Click <span class="btn btn-default btn-xs"><span
class="glyphicon glyphicon-plus"></span>Add</span>
next to Single to add a file and test the cfs-file control.
</li>
<li>Click <span class="btn btn-default btn-xs"><span
class="glyphicon glyphicon-plus"></span>Add</span>
next to Multi to add multiple files and test the cfs-files control.
</li>
<li>Once documents are created, options to edit or remove the
document will be shown next to the document.
</li>
<li>This application serves as a test of CfsAutoForm and as an
example of how to use CfsAutoForm in your own applications.
</li>
<li>Also note that main page is <b>not</b> CfsAutoForm.
It is simply a display of the mongo data to be used as a
reference. The only time
CfsAutoForm is involved is when you click on an <span class="btn
btn-default btn-xs"><span class="glyphicon
glyphicon-plus"></span>Add</span> <span class="btn btn-default
btn-xs"><span class="glyphicon glyphicon-pencil"></span> AutoForm </span> or
<span class="btn btn-default btn-xs"><span class="glyphicon
glyphicon-pencil"></span>QuickForm</span> button and the modal
popup windows appear. For that
reason, clicking Remove will not remove the file from the Files
collection; it simplly removes a row from the Docs or the MultiDocs
collections. Clicking remove on a file when within a modal window,
if Delete on Remove is set, <i>should</i> remove that file from the
Files collection.
</li>
</ul>
</div>
</div>
</div>
</template>
<template name="insertQForm">
<div class="form">
{{> quickForm id="quickForm" type="insert" collection="Docs"}}
</div>
</template>
<template name="opts">
<div class="panel panel-default">
<div class="panel-heading">Options</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-md-1 control-label"
for="uploadRadio">Upload</label>
<div class="btn-group" data-toggle="buttons" id="uploadRadio">
<label class="btn btn-default active" for="uploadOnSelect">
<input type="radio" autocomplete="off" id="uploadOnSelect"
checked>When
Selected
</label>
<label class="btn btn-default" for="uploadOnSubmit">
<input type="radio" autocomplete="off"
id="uploadOnSubmit">On Submit
</label>
</div>
</div>
<div class="form-group">
<label class="col-md-1 control-label" for="deleteRadio">Delete</label>
<div class="btn-group" data-toggle="buttons" id="deleteRadio">
<label class="btn btn-default active">
<input type="radio" autocomplete="off"
id="deleteOnRemove">On Remove
</label>
<label class="btn btn-default">
<input type="radio" autocomplete="off" id="deleteNever"
checked>Never
</label>
</div>
</div>
<div class="form-group">
<label class="col-md-1 control-label"
for="placeholderTextInput">Placeholder Text</label>
<div class="input-group col-md-2">
<input type="text" autocomplete="off" class="form-control"
value="Give Me a File!!" id="placeholderTextInput">
<span class="input-group-btn">
<button class="btn btn-default" type="button"
id="placeholderSetButton">Set
</button>
</span>
</div>
</div>
</form>
</div>
</div>
</template>
<template name="dbInfo">
<div class="panel panel-default">
<div class="panel-heading">Database Information Summary</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-md-2 control-label" for="deleteRadio">Docs
Collection Contains</label>
<div class="input-group col-md-2">
<input type="text" id="docs-count" class="form-control" readonly
value="{{docs_count}}">
<span class="input-group-addon">Documents</span>
<span class="input-group-btn">
<button id="clear-docs" class="btn btn-danger"
type="button">Remove All</button>
</span>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="deleteRadio">MultiDocs
Collection Contains</label>
<div class="input-group col-md-2">
<input type="text" id="multidocs-count" class="form-control" readonly
value="{{multidocs_count}}">
<span class="input-group-addon">Documents</span>
<span class="input-group-btn">
<button id="clear-multidocs" class="btn btn-danger"
type="button">Remove All</button>
</span>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="deleteRadio">Files
Collection Contains</label>
<div class="input-group col-md-3">
<input type="text" id="files-count" class="form-control" readonly
value="{{files_count}}">
<span class="input-group-addon">Documents</span>
<span class="input-group-btn">
<button id="prune-files" class="btn btn-warning" type="button">
Prune Orphaned</button>
<button id="clear-files" class="btn btn-danger" type="button">
Remove All</button>
</span>
</div>
</div>
</form>
</div> <!-- Panel-Body -->
</div> <!-- panel -->
</template>