summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/templates/subnet-edit.html
blob: 5a6adf3c6f10dea8f4f0a7f6741d1fcc1b67680f (plain) (blame)
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
<!-- subnetid, start, end, fixed, isdirect, lastdirectcheck, lastseen, seencount -->

<form method="post" action="?do=rebootcontrol">
	<input type="hidden" name="token" value="{{token}}">
	<input type="hidden" name="show" value="subnet">
	<input type="hidden" name="id" value="{{subnetid}}">
	<div class="panel panel-default">
		<div class="panel-heading">
			{{lang_editSubnet}}: <b>{{cidr}}</b> ({{start_s}}&thinsp;-&thinsp;{{end_s}})
		</div>
		<div class="list-group">
			<div class="list-group-item">
				<div class="checkbox">
					<input id="fixed_cb" type="checkbox" name="fixed" {{#fixed}}checked{{/fixed}} {{perms.subnet.flag.disabled}}>
					<label for="fixed_cb">{{lang_fixSubnetSettings}}</label>
				</div>
				<div class="slx-space"></div>
				<p>{{lang_fixSubnetDesc}}</p>
			</div>
			<div class="list-group-item {{^fixed}}collapse{{/fixed}} subnet-option">
				<div class="checkbox">
					<input id="direct_cb" type="checkbox" name="isdirect" {{#isdirect}}checked{{/isdirect}} {{perms.subnet.flag.disabled}}>
					<label for="direct_cb">{{lang_reachableFromServer}}</label>
				</div>
				<div class="slx-space"></div>
				<p>{{lang_reachableFromServerDesc}}</p>
			</div>
			<div class="list-group-item {{perms.jumphost.view.hidden}}">
				<label>{{lang_assignedJumpHosts}}</label>
				{{#jumpHosts}}
				<div class="row">
					<div class="col-md-12">
						<div class="checkbox">
							<input id="jhb{{hostid}}" type="checkbox" name="jumphost[{{hostid}}]" {{checked}}
									 {{perms.jumphost.assign-subnet.disabled}}>
							<label for="jhb{{hostid}}">{{host}}:{{port}}</label>
						</div>
					</div>
				</div>
				{{/jumpHosts}}
			</div>
			<div class="list-group-item">
				<label>{{lang_reachableFrom}}</label>
				{{#sourceNets}}
				<div>{{cidr}}</div>
				{{/sourceNets}}
			</div>
		</div>
		<div class="panel-footer text-right">
			<button type="submit" class="btn btn-danger" name="action" value="delete"
					  data-confirm="{{lang_confirmDeleteSubnet}}"
					  {{perms.subnet.edit.disabled}} {{perms.subnet.flag.disabled}}>
				<span class="glyphicon glyphicon-trash"></span>
				{{lang_delete}}
			</button>
			<button type="submit" class="btn btn-primary" name="action" value="edit" {{perms.subnet.flag.disabled}}>
				<span class="glyphicon glyphicon-floppy-disk"></span>
				{{lang_save}}
			</button>
		</div>
	</div>
</form>
<script><!--
document.addEventListener('DOMContentLoaded', function() {
	var $overrides = $('.subnet-option');
	var $cb = $('#fixed_cb');
	$cb.change(function() {
		if ($cb.is(':checked')) {
			$overrides.show();
		} else {
			$overrides.hide();
		}
	}).change();

});
//--></script>