Browse Source

Adding missing visit and approvedPortal web views

Andrej Studen @ ONKO-NIX 4 years ago
parent
commit
cb16856a9d

+ 42 - 0
views/approvedPortal.html

@@ -0,0 +1,42 @@
+<style>
+.box{
+width:120px;
+height:120px;
+}
+
+.gold{ background-color: gold; }
+.red{ background-color: red; }
+
+.large{
+	font-size: 30px;
+}
+
+.center{
+	text-align: center;
+}
+
+.stretch{
+	padding: 50px;
+}
+</style>
+
+<div id="formDiv"/>
+
+	<div id="debugDiv" style="display:none">
+		<textarea cols="95" rows="5" id="formStatus">
+			Hello
+		</textarea>
+	</div>
+
+<script type "text/javascript">
+window.onload=init;
+function init(){
+	let config=new Object();
+	config.document=document;
+	config.reviewMode="APPROVED";
+	config.div="formDiv";
+	config.debugArea="formStatus";
+	print(config,"Starting");
+	generateFormArray(config);
+}
+</script>

+ 9 - 0
views/approvedPortal.view.xml

@@ -0,0 +1,9 @@
+<view xmlns="http://labkey.org/data/xml/view" title="Approved CRF Portal">
+	<dependencies>
+			<dependency path="crf/formPortal.js"/>
+		</dependencies>
+	<permissions>
+		<permission name="login"/>
+	</permissions>
+
+</view>

+ 4 - 0
views/approvedPortal.webpart.xml

@@ -0,0 +1,4 @@
+<webpart xlmns="http://labkey.org/data/xml/webpart"
+	title="CRF Manager Portal">
+	<view name="approvedPortal"/>
+</webpart>

+ 89 - 0
views/visit.html

@@ -0,0 +1,89 @@
+<style>
+table {margin-bottom:20px;table-layout:fixed; border-collapse:collapse; border-spacing:10px}
+table.t1 {width:400px; border:1px solid black}
+table.t1 th {border:1px solid black;padding:4px;background-color:#e0e0e0}
+table.t1 td {text-align:center}
+table.t2 {width:800px; border:1px solid black;}
+table.t2 th {border:1px solid black;padding:4px;background-color:#e0e0e0}
+table.t2 td {border:1px solid black; text-align:center}
+
+div.d1 {text-align:center; width=400px; background-color:#e0e0e0;
+        font-size:      20px; margin-bottom:20px}
+</style>
+
+<table cellspacing="2" cellpadding="5" border="0">
+<tr><td>CRF ID: </td><td><strong id="crfRefId">1583163135258</strong></td></tr>
+<tr><td>Eudra CT Number: </td><td><strong id="eudraCTNumber">Loading</strong></td></tr>
+<tr><td>Study Sponsor: </td><td><strong id="studySponsor">Loading</strong></td></tr>
+<tr><td>Study Coordinator: </td><td><strong id="studyCoordinator">Loading</strong></td></tr>
+<tr><td>Site: </td><td><strong id="siteName">Loading</strong></td></tr>
+<tr><td>Investigator: </td><td><strong id="investigatorName">Loading</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"/>
+<!--<div id="debug" style="display:block">
+<textarea cols="95" rows="10" name="formStatus" id="formStatus">
+Loading
+</textarea>
+</div>
+-->
+
+
+<script type="text/javascript">
+
+window.onload = init();
+
+function init(){
+		
+	let searchParams = new URLSearchParams(window.location.search);
+	
+	//update this to pick crfRef from url
+	let crfRef=searchParams.get('entryId');
+	let formSetupQuery=searchParams.get('formSetupQuery');	
+	let registrationQueryId=searchParams.get('registrationQueryId');
+	document.getElementById("crfRefId").innerHTML=crfRef;
+
+
+	let config=new Object();
+	//will this change if we are in views?
+	//config.review=true;
+	config.reviewMode=searchParams.get("reviewMode");
+	if (config.reviewMode=="EDIT") delete config.reviewMode;
+
+	//where to get ParticipantId
+	config.registrationQueryId=registrationQueryId;
+	config.registrationParticipantIdField="participantCode";
+	config.masterForm="visitForm";
+	
+	config.document=document;
+	config.debugDiv="debugDiv";
+	config.debugId="formStatus";
+	config.crfRefId="crfRefId";
+	config.containerPath= LABKEY.ActionURL.getContainer();
+	config.setupQueryName=formSetupQuery;
+	config.formName=searchParams.get("formName");
+	config.formId=searchParams.get("formId");
+	config.submitReportId="submitReport";
+	
+	
+	clear(config);
+	print(config,"Container path"+config.containerPath);
+
+	generateMasterForm(config);
+
+
+	
+
+}
+</script>

+ 6 - 0
views/visit.view.xml

@@ -0,0 +1,6 @@
+<view xmlns="http://labkey.org/data/xml/view" title="CRF Form">
+	<dependencies>
+			<dependency path="crf/crfVisit.js"/>
+	</dependencies>
+</view>
+<!-- need to restart labkey to add new files -->