summaryrefslogtreecommitdiffstats
path: root/provisioning-editparam-html.lsp
blob: 96b76f1043f401559b83a92e95e80409c03fc495 (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
27
28
29
30
31
<% local form, viewlibrary, page_info, session = ...
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>

<%
	htmlviewfunctions.displaycommandresults({"editoptions"}, session, true)
	htmlviewfunctions.displayitem(form, page_info)
	if form.value and form.value.param_id then
		local redir = cfe({ type="hidden", value=page_info.orig_action.."?param_id="..html.url_encode(form.value.param_id.value) })
		local param_id = cfe({type="hidden", value=form.value.param_id.value})
		htmlviewfunctions.displayitem(cfe({type="link", value={param_id=param_id, redir=redir}, label="Options", option="Edit Options", action="editoptions"}), page_info)
	end
%>