summaryrefslogtreecommitdiffstats
path: root/provisioning-editdeviceparams-html.lsp
blob: ed44ea06ccf2c610319690bc58ba5c59bb599d64 (plain)
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
<% local form, viewlibrary, page_info = ... 
require("htmlviewfunctions")
html = require("acf.html")
%>

<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"></script>
<script type="text/javascript">
        $(document).ready(function() {
		$(".deletedevice").click(function(){ return confirm("Are you sure you want to delete this device?")});
        });
</script>

<% if form and form.value and form.value.device_id and form.value.device_id.value ~= "" then %>
	<% if viewlibrary.check_permission("editdevice") then %>
		 <a href='<%= page_info.script..page_info.prefix..page_info.controller.."/editdevice?device_id="..html.html_escape(form.value.device_id.value) %>'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/categories/applications-system.png' title="Edit Class of Service"></img> <big>Edit Class of Service </big></a>
	<% end %>
	<% if viewlibrary.check_permission("deletedevice") then %>
		 <a href='<%= page_info.script..page_info.prefix..page_info.controller.."/deletedevice?submit=true&device_id="..html.html_escape(form.value.device_id.value) %>' class="deletedevice"><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/emblems/emblem-unreadable.png' title="Delete this Device"></img> <big>Delete this Device </big></a>
	<% end %>
<% end %>

<H1><%= html.html_escape(form.label) %></H1>
<%
	form.value.device_id.readonly = "true"
	htmlviewfunctions.displayform(form, nil, nil, page_info, 2)
%>