summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-12-22 14:11:42 +0000
committerTed Trask <ttrask01@yahoo.com>2011-12-22 14:11:42 +0000
commit809eaf0b78159dfc892748b98324397e4c494059 (patch)
treebc4097fbb9fb0844d20cde3e0cc42361ca8d6ac8
parent7eedb3224001b3c0f2d3bd6d0d35e023e0506525 (diff)
downloadacf-provisioning-809eaf0b78159dfc892748b98324397e4c494059.tar.bz2
acf-provisioning-809eaf0b78159dfc892748b98324397e4c494059.tar.xz
Added edit and delete links to editdevice and editdeviceparams
-rw-r--r--provisioning-editdevice-html.lsp18
-rw-r--r--provisioning-editdeviceparams-html.lsp16
2 files changed, 34 insertions, 0 deletions
diff --git a/provisioning-editdevice-html.lsp b/provisioning-editdevice-html.lsp
index fd6ad40..dd39948 100644
--- a/provisioning-editdevice-html.lsp
+++ b/provisioning-editdevice-html.lsp
@@ -2,6 +2,24 @@
require("viewfunctions")
%>
+<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("overridedeviceparams") then %>
+ <a href='<%= page_info.script..page_info.prefix..page_info.controller.."/overridedeviceparams?device_id="..html.html_escape(form.value.device_id.value) %>'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' title="Edit Parameters"></img> <big>Edit Parameters </big></a>
+ <% elseif viewlibrary.check_permission("editdeviceparams") then %>
+ <a href='<%= page_info.script..page_info.prefix..page_info.controller.."/editdeviceparams?device_id="..html.html_escape(form.value.device_id.value) %>'><img src='<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/document-properties.png' title="Edit Parameters"></img> <big>Edit Parameters </big></a>
+ <% end %>
+ <% if viewlibrary.check_permission("deletedevice") then %>
+ <a href='<%= page_info.script..page_info.prefix..page_info.controller.."/deletedevice?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>
<%
if page_info.action == "editdevice" then
diff --git a/provisioning-editdeviceparams-html.lsp b/provisioning-editdeviceparams-html.lsp
index 4d976ca..a773326 100644
--- a/provisioning-editdeviceparams-html.lsp
+++ b/provisioning-editdeviceparams-html.lsp
@@ -2,6 +2,22 @@
require("viewfunctions")
%>
+<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?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"