Files
netdisco/share/views/ajax/admintask/nodemonitor.tt
nick n cd2a4b9362 html template fixups (#576)
* none is not a valid value for min-width, so set it to zero

* these 2 "checked" if statements need a space in front of them,
else they will attach to the previous element

id="nd_showspeed"checked="checked"

* multiple tag has no options according to
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select

also, don't close select before we've gotten to the option tags

* multiple tag has no options according to
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select

also, don't close select before we've gotten to the option tags

* just to be sure put a space in front of these optional tags as well,

* $a is technically allowed but is considered not best practice
2019-05-12 08:32:42 +01:00

94 lines
3.6 KiB
Plaintext

<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th class="nd_center-cell">Date Added</th>
<th class="nd_center-cell">MAC Address</th>
<th class="nd_center-cell">Match OUI</th>
<th class="nd_center-cell">Enabled</th>
<th class="nd_center-cell">Reason</th>
<th class="nd_center-cell">Email</th>
<th class="nd_center-cell">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="nd_center-cell"></td>
<td class="nd_center-cell"><input data-form="add" name="mac" type="text"></td>
<td class="nd_center-cell"><input data-form="add" name="matchoui" type="checkbox"></td>
<td class="nd_center-cell"><input data-form="add" name="active" type="checkbox" checked></td>
<td class="nd_center-cell"><input data-form="add" name="why" type="text"></td>
<td class="nd_center-cell"><input data-form="add" name="cc" type="email"></td>
<td class="nd_center-cell">
<button class="btn btn-small nd_adminbutton" name="add" type="submit"><i class="icon-plus-sign"></i> Add</button>
</td>
</tr>
[% SET count = 0 %]
[% WHILE (row = results.next) %]
[% SET count = count + 1 %]
<tr>
<td class="nd_center-cell">[% row.date | html_entity %]</td>
<td class="nd_center-cell">
<input data-form="update" name="mac" type="text" value="[% row.mac | html_entity %]">
</td>
<td class="nd_center-cell">
<input data-form="update" name="matchoui" type="checkbox" [% ' checked="checked"' IF row.matchoui %]>
</td>
<td class="nd_center-cell">
<input data-form="update" name="active" type="checkbox" [% ' checked="checked"' IF row.active %]>
</td>
<td class="nd_center-cell">
<input data-form="update" name="why" type="text" value="[% row.why | html_entity %]">
</td>
<td class="nd_center-cell">
<input data-form="update" name="cc" type="email" value="[% row.cc | html_entity %]">
</td>
<td class="nd_center-cell">
<button class="btn nd_adminbutton" name="update" type="submit"><i class="icon-save text-warning"></i></button>
<button class="btn" data-toggle="modal"
data-target="#nd_devdel-[% count %]" type="button"><i class="icon-trash text-error"></i></button>
<div id="nd_devdel-[% count %]" class="nd_modal nd_deep-horizon modal hide fade" tabindex="-1"
role="dialog" aria-labelledby="nd_devdel-label-[% count %]" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="nd_devdel-label-[% count %]">Are you sure?</h3>
</div>
<div class="modal-body">
<blockquote>
<p class="text-info">Monitor for &quot;[% row.mac | html_entity %]&quot; will be removed.</p>
</blockquote>
<input data-form="del" name="mac" type="hidden" value="[% row.mac | html_entity %]">
</div>
<div class="modal-footer">
<button class="btn btn-success" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button class="btn btn-danger nd_adminbutton" name="del" data-dismiss="modal">Confirm</button>
</div>
</div>
</td>
</tr>
[% END %]
</tbody>
</table>
<script>
$(document).ready(function() {
$('#data-table').dataTable({
"columnDefs": [
{
"targets": [ 0, 2, 3, 6 ],
"searchable": false
},
{
"targets": [ 0, 2, 3, 6 ],
"orderable": false
}
],
[% INCLUDE 'ajax/datatabledefaults.tt' -%]
} );
} );
</script>