step_view.html
1 <#include "/admin/plugins/asynchronousupload/upload_commons.html" />
2 <@addRequiredJsFiles />
3 <script src="jsp/admin/plugins/asynchronousupload/GetMainUploadJs.jsp?handler=formsAsynchronousUploadHandler" ></script>
4 <script>
5 function getInputElement(displayControl){
6 var types = ['input','select','textarea'];
7 var elm = null;
8 for(var i=0;i<types.length && (elm == undefined || elm == null || elm.length <=0);i++){
9 elm = $("div[displayControl=" + displayControl + "]").find(types[i]);
10 }
11
12 if(elm.is('input')){
13 elm = $('input[name="' + elm.attr('name') + '"]');
14 }
15 return elm;
16 }
17
18 function getFieldValue(elm){
19 if(elm.is(':radio'))
20 {
21 var input = $('input[name="' + elm.attr('name') + '"]:checked');
22 return input.val();
23 } else if (elm.is(':checkbox')){
24 var resultChecked = [];
25 for(var i=0;i< elm.length;i++){
26 if (elm [i].checked){
27 resultChecked.push(elm[i].value);
28 }
29 }
30 return resultChecked;
31 } else if (elm.is('select')) {
32 return elm[0].options[elm[0].selectedIndex].value;
33 }
34 //add other specific implementations here
35 else {
36 return elm.val();
37 }
38 }
39 </script>
40 <form class="form-horizontal" id="form-validate" action="jsp/admin/plugins/forms/ManageFormResponse.jsp" method="post" enctype="multipart/form-data">
41 <#if form.logo??><img id="form_logo" src="data:${form.logo.mimeType};base64,${form.logoBase64}" title="${form.title}" alt="" ></#if>
42 <@messages warnings=warnings />
43 <#if messageInfo?? ><div class="alert alert-info" role="alert">${messageInfo}</div></#if>
44 ${formTopBreadcrumb!}
45 <#if form.countResponses>#i18n{forms.createEntry.manageField.labelFieldNumber}: ${form.currentNumberResponse}</#if>
46 ${stepContent!}
47 ${formBottomBreadcrumb!}
48 </form>