formPortal.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <style>
  2. .box{
  3. width:120px;
  4. height:120px;
  5. }
  6. .gold{ background-color: gold; }
  7. .red{ background-color: red; }
  8. .large{
  9. font-size: 30px;
  10. }
  11. .center{
  12. text-align: center;
  13. }
  14. .stretch{
  15. padding: 50px;
  16. }
  17. </style>
  18. <table cellspacing="2" cellpadding="5" border="0">
  19. <tr><td>Version: </td><td><strong id="version">0.0</strong></td></tr>
  20. </table>
  21. <div id="formDiv">
  22. </div>
  23. <div id="debugDiv" style="display:none">
  24. <h3>Debug notes</h3>
  25. <textarea cols="95" rows="5" id="formStatus">
  26. </textarea>
  27. </div>
  28. <script type "text/javascript">
  29. window.onload=loadScripts;
  30. function loadScripts(){
  31. LABKEY.requiresScript(["crfTecant/formPortal.js","crfTecant/debug.js"],init);
  32. }
  33. function init(){
  34. console.log('Here');
  35. let config=formPortal.config;
  36. config.document=document;
  37. config.div="formDiv";
  38. debug.document=document;
  39. debug.debugArea="formStatus";
  40. //set this to true to enable on-page debug display (otherwise, error messages appear in consloe)
  41. if (false){
  42. formPortal.setDebug(debug);
  43. document.getElementById("debugDiv").style.display="block";
  44. }
  45. config.role="crfEditor";
  46. formPortal.clear();
  47. formPortal.print("XStarting");
  48. config.participantField="PatientId";
  49. formPortal.generateFormArray();
  50. //formPortal.scriptsLoaded();
  51. }
  52. </script>