summaryrefslogtreecommitdiffstats
path: root/provisioning-edittemplate-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-edittemplate-html.lsp')
-rw-r--r--provisioning-edittemplate-html.lsp21
1 files changed, 21 insertions, 0 deletions
diff --git a/provisioning-edittemplate-html.lsp b/provisioning-edittemplate-html.lsp
index 0ef5bc2..56d3446 100644
--- a/provisioning-edittemplate-html.lsp
+++ b/provisioning-edittemplate-html.lsp
@@ -2,8 +2,26 @@
<% htmlviewfunctions = require("htmlviewfunctions") %>
<% html = require("acf.html") %>
+<script type="text/javascript">
+ if (typeof jQuery == 'undefined') {
+ document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>');
+ }
+</script>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("[id=<%= page_info.action %>]").submit(function(event){
+ if ($(this).find("#notifydevices").is(":checked")) {
+ return confirm("Are you sure you want to notify affected devices? This might cause a reboot.");
+ }
+ return true;
+ });
+ });
+</script>
+
<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<% htmlviewfunctions.displayformstart(form, page_info) %>
+<% htmlviewfunctions.displayformitem(form.value.notifydevices, "notifydevices") %>
<% local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Template Details"}), page_info, htmlviewfunctions.incrementheader(header_level)) %>
<%
if page_info.action == "edittemplate" then
@@ -15,6 +33,7 @@ htmlviewfunctions.displayformitem(form.value.seq, "seq")
%>
<% htmlviewfunctions.displaysectionend(header_level2) %>
+<% if form.value.filecontent then %>
<% htmlviewfunctions.displaysectionstart(cfe({label="File Content"}), page_info, header_level2) %>
<textarea name="filecontent">
<%= html.html_escape(form.value.filecontent.value) %>
@@ -22,5 +41,7 @@ htmlviewfunctions.displayformitem(form.value.seq, "seq")
<% htmlviewfunctions.displayinfo(form.value.filecontent) %>
<% htmlviewfunctions.displaysectionend(header_level2) %>
+<% end %>
+
<% htmlviewfunctions.displayformend(form) %>
<% htmlviewfunctions.displaysectionend(header_level) %>