|
@@ -0,0 +1,54 @@
|
|
|
+<h1 id="formTitle">Title</h1>
|
|
|
+
|
|
|
+<table cellspacing="2" cellpadding="5" border="0" id="staticTable">
|
|
|
+<tr><td>CRF ID: </td><td><strong id="crfRefId">1583163135258</strong></td></tr>
|
|
|
+</table>
|
|
|
+
|
|
|
+<form name="visitForm" id="visitForm">
|
|
|
+</form>
|
|
|
+
|
|
|
+<div id="submitDiv"/>
|
|
|
+
|
|
|
+
|
|
|
+<div id="errorDiv" style="display:none">
|
|
|
+<textarea id="errorTxt" cols="95" rows="10"></textarea>
|
|
|
+</div>
|
|
|
+
|
|
|
+<div id="debugDiv" style="display:block"/>
|
|
|
+
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+window.onload = loadScripts;
|
|
|
+
|
|
|
+function loadScripts(){
|
|
|
+ let action=init;
|
|
|
+ LABKEY.requiresScript(["crf/crfVisitNew.js"],action);
|
|
|
+}
|
|
|
+
|
|
|
+function init(){
|
|
|
+ let action=setup;
|
|
|
+ crfVisit.init(action);
|
|
|
+}
|
|
|
+
|
|
|
+function setup(){
|
|
|
+
|
|
|
+ let searchParams = new URLSearchParams(window.location.search);
|
|
|
+
|
|
|
+ //update this to pick crfRef from url
|
|
|
+ let crfRef=searchParams.get('entryId');
|
|
|
+ //let formSetupQuery=searchParams.get('formSetupQuery');
|
|
|
+ document.getElementById("crfRefId").innerHTML=crfRef;
|
|
|
+ crfVisit.crfRef=crfRef;
|
|
|
+ crfVisit.masterForm="visitForm";
|
|
|
+ crfVisit.redirectQuery=searchParams.get('redirectQuery');
|
|
|
+ crfVisit.redirectSchema=searchParams.get('redirectSchema');
|
|
|
+
|
|
|
+ crfVisit.formId=searchParams.get("formId");
|
|
|
+ crfVisit.role=searchParams.get('role');
|
|
|
+
|
|
|
+ crfVisit.clear();
|
|
|
+ let action=function(){crfVisit.onSubmit();}
|
|
|
+ crfVisit.generateMasterForm(action);
|
|
|
+}
|
|
|
+</script>
|