Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make v2 default #50

Merged
merged 17 commits into from
Jul 24, 2023
3 changes: 2 additions & 1 deletion templates/launch.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,15 @@ <h3>Runner Data</h3>
document.querySelector("#survey_metadata").innerHTML = schema_response.metadata.map(metadataField => {

const fieldName = metadataField["name"]
let defaultValue = metadataField['default'];

if (metadataField['type'] === "date") {
const currentDate = new Date()
// format as yyyy-MM-dd
defaultValue = currentDate.toLocaleDateString().split("/").reverse().join("-")
}

defaultValue = metadataField['default'];
katie-gardner marked this conversation as resolved.
Show resolved Hide resolved

return `<div class="field-container">${getLabelFor(fieldName)}${
(() => {
if (metadataField['type'] === "boolean") {
Expand Down