You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: generator.html
+19-2
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,13 @@
52
52
53
53
$(INPUTS).each(function(){
54
54
varid=$(this).attr('id');
55
-
varvalue=$(this).val();
55
+
varvalue;
56
+
if($(this).attr('type')=="checkbox"){
57
+
value=$(this).prop("checked");
58
+
}else{
59
+
value=$(this).val();
60
+
}
61
+
56
62
state[id]=value;
57
63
});
58
64
@@ -75,7 +81,13 @@
75
81
alert("The file that was pasted in the 'metadata.json' box is not valid");
76
82
}
77
83
$.each(state,function(key,value){
78
-
$('#'+key).val(value);
84
+
$('#'+key).each(function(){
85
+
if($(this).attr('type')=="checkbox"){
86
+
$(this).prop("checked",value);
87
+
}else{
88
+
$(this).val(value);
89
+
}
90
+
});
79
91
});
80
92
returnstate;
81
93
}
@@ -271,6 +283,11 @@ <h2>Dataset Page Fields</h2>
271
283
272
284
<labelfor="odi-certificate-number"><strong>Open Data Certificate</strong> (see <ahref="https://github.com/openactive/dataset-site-generator/wiki/Open-Data-Certificates">this guide</a>)</label>
0 commit comments