You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.8 KiB
HTML
50 lines
1.8 KiB
HTML
6 years ago
|
<!--
|
||
|
This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||
|
-->
|
||
|
|
||
|
<div class="card m-4" id="addhistorycard">
|
||
|
<div class="card-body">
|
||
|
<h5 class="card-title">Add History</h5>
|
||
|
<form class="apiform">
|
||
|
<div class="form-group">
|
||
|
<label><i class="fas fa-barcode"></i> Machine ID:</label>
|
||
|
<div class="input-group barcodebtn">
|
||
|
<input type="text" name="id" class="form-control" required />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label for="event"><i class="fas fa-flag"></i> Event</label>
|
||
|
<select name="event" class="form-control" required>
|
||
|
<option value=""></option>
|
||
|
</select>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label><i class="fas fa-sticky-note"></i> Notes:</label>
|
||
|
<textarea class="form-control" name="notes"></textarea>
|
||
|
</div>
|
||
|
|
||
|
<input type="hidden" name="action" value="addhistory" />
|
||
|
|
||
|
<button type="submit" class="btn btn-success">Submit</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
$.get(serverUrl, {
|
||
|
key: apiKey,
|
||
|
action: "geteventtypes"
|
||
|
}, function (data) {
|
||
|
for (var i = 0; i < data.length; i++) {
|
||
|
$("#addhistorycard select[name=event]").append('<option value="' + data[i]['id'] + '">' + data[i]['name'] + '</option>');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
if (inCordova) {
|
||
|
$("#addhistorycard .barcodebtn").append('<div class="input-group-append"><div class="btn btn-default" data-scancode="#addhistorycard input[name=id]"><i class="fas fa-camera"></i></div></div>');
|
||
|
}
|
||
|
</script>
|