瀏覽代碼

Adding configurable header to multiChoiceButtonRow special field

Andrej Studen 1 年之前
父節點
當前提交
344255de5c
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      web/crf/crfVisitNew.js

+ 11 - 1
web/crf/crfVisitNew.js

@@ -708,7 +708,16 @@ function(tb,field,specFieldSetup,setup){
       let lObject=crfData.getLookup(lookup.queryName);
       let row=tb.insertRow();
       let cell=crfHTML.createTblHeader(null,row);
-      crfHTML.createTextNode("All options",null,cell);
+      let header="All variables";
+      if ('header' in q){
+         header=q['header'];
+         header=header.replace(/_fieldCaption_/,field.shortCaption);
+         header=header.replace(/_t_/,"\t");
+
+      }
+      crfHTML.createTextNode(header,null,cell);
+      crfHTML.addStyle(cell,'center');
+      crfHTML.addStyle(cell,'topLess');
       let cell1=row.insertCell();
       cell1.colSpan="3";
       for (let x in lObject.LUT){
@@ -719,6 +728,7 @@ function(tb,field,specFieldSetup,setup){
          b.onclick=function(){crfHTML.updateSelect(input,cell1,x,b.value);}
       }
       
+      
 
    }
 }