-
Notifications
You must be signed in to change notification settings - Fork 26
/
pushpullform.html
38 lines (35 loc) · 990 Bytes
/
pushpullform.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
<form id="pushpullform" method="post">
<div id="pushpulltable">
<table id="popuptable">
<tr>
<th></th>
<th>Remote</th>
</tr>
{% for item in remotes %}
<tr>
<td><input type="radio" name="remote" value="{{ item }}"></input></td>
<td>{{ item }}</td>
</tr>
{% endfor %}
</table>
</div>
<div id="pushpullbuttons">
<input type="submit" value="Push" class="popupsubmit" onclick="$('#operation').val('push')"></input>
<input type="submit" value="Pull" class="popupsubmit" onclick="$('#operation').val('pull')"></input>
<input type="submit" value="Cancel" class="popupclose"></input>
<input type="hidden" name="operation" value="" id="operation"></input>
</div>
</form>
<script>
$(document).ready(function() {
$('#pushpullform').submit(function(e) {
e.preventDefault();
$.post('peeked/pushpull', $('#pushpullform').serialize(), function(data) {
$('.popupcontent').html(data);
});
});
$('#popup').on('click', '.popupclose', function(e) {
close_popup();
});
});
</script>