-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload.html
163 lines (162 loc) · 9.77 KB
/
upload.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
<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
<div data-template="app:upload-check-calib-level">
<!-- prevent app:upload from bad param -->
<div data-template="helpers:unless-model-key" data-template-key="calib_description">
<div class="col-md-10 col-md-offset-1 alert alert-dismissible alert-danger fade in " role="alert">
Sorry, <em>calib_level</em> parameter is missing or not supported. Please try to <a href="submit.html">submit</a> again.
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">×</span>
<span class="sr-only">Cancel</span>
</button>
</div>
</div>
<!-- or send submit form material -->
<div data-template="helpers:if-model-key" data-template-key="calib_description">
<h1>Add <span data-template="helpers:model-value" data-template-key="calib_description"/> OIFITS files</h1>
<form class="form-horizontal" data-template="app:upload">
<input type="hidden" name="calib_level" data-template="helpers:model-value-attribute" data-template-key="calib_level" data-template-name="value"/>
<input type="hidden" name="staging" data-template="helpers:model-value-attribute" data-template-key="staging" data-template-name="value"/>
<fieldset id="oifits" data-template="app:upload">
<legend>Step 1 : Upload OIFITS files</legend>
<table class="table table-bordered table-condensed">
<thead>
<th>Target</th>
<th>Instrument</th>
<th>Instrument mode</th>
<th>Time interval</th>
<th>
<span data-template="helpers:unless-model-key" data-template-key="skip-quality-level-selector">Quality</span>
</th>
</thead>
<tbody data-template="helpers:render" data-template-partial="_oifits-form.html" data-template-key="oifits" data-template-as="url"/>
<tfoot>
<tr>
<td colspan="5">
<a href="#" class="btn active btn-primary btn-block" role="button" data-toggle="modal" data-target="#oifitsModal" data-loading-text="Loading...">
<span class="glyphicon glyphicon-plus"/> Add files
</a>
</td>
</tr>
</tfoot>
</table>
</fieldset>
<fieldset id="collection" data-template="app:upload">
<legend>Step 2 : Choose collection</legend>
<div class="row">
<div class="col-md-offset-2 col-md-3">
<a href="#" class="btn active btn-primary btn-block" role="button" id="create-collection-btn" data-loading-text="Loading...">
<span class="glyphicon glyphicon-briefcase"/>
Create a collection
</a>
</div>
<div class="col-md-offset-2 col-md-3" data-template="app:user-collections-options">
<a href="#" class="btn active btn-primary btn-block" role="button" id="append-to-collection-btn" data-loading-text="Loading...">
<span class="glyphicon glyphicon-briefcase"/>
Append to ...
</a>
<select class="form-control" name="collection" data-template="helpers:form-control">
<option data-template="helpers:select-options" data-template-key="user-collections"/>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>Step 3 : Save</legend>
<div class="form-group">
<div class="col-md-offset-4 col-md-4">
<button type="submit" class="btn btn-primary btn-block">Save</button>
<a href="submit.html" class="btn btn-default btn-xs btn-block" role="button">Cancel</a>
</div>
</div>
</fieldset>
</form>
<script type="text/javascript" src="resources/scripts/selectors.js"/>
<script type="text/javascript" src="resources/scripts/bootstrap-tagsinput.min.js"/>
<script type="text/javascript" src="resources/scripts/bootstrap3-typeahead.min.js"/>
<script type="text/javascript" src="resources/scripts/checkreport.js"/>
<script type="text/javascript" src="resources/scripts/upload.js"/>
<div data-template="templates:include" data-template-path="_voar.html"/>
<!-- Modals -->
<div class="modal fade" id="articleModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span>×</span>
<span class="sr-only">Cancel</span>
</button>
<h4 class="modal-title">Add new article from bibcode</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label class="control-label" for="bibcode">Bibcode</label>
<input type="text" name="bibcode" placeholder="Enter article bibcode" class="form-control"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" data-loading-text="Loading...">Add</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="errorModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span>×</span>
<span class="sr-only">Cancel</span>
</button>
<h4 class="modal-title">Submission form is not complete:</h4>
</div>
<div class="modal-body">
<ul id="errorModalList"/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="oifitsModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span>×</span>
<span class="sr-only">Cancel</span>
</button>
<h4 class="modal-title">Add new OIFITS files</h4>
</div>
<div class="modal-body">
<div class="radio">
<label>
<input type="radio" name="oifitsSrc" value="upload"/> From local files
</label>
<div class="form-group">
<label class="control-label" for="files">Files</label>
<input type="file" name="files" placeholder="Drop OIFits files here or select a file to upload" multiple="multiple"/>
</div>
</div>
<div class="radio">
<label>
<input type="radio" name="oifitsSrc" value="url"/> From files at URLs
</label>
<div class="form-group">
<label class="control-label" for="urls">URLs</label>
<textarea name="urls" placeholder="One URL per line" rows="4" class="form-control"/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Add</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>