Skip to content

Commit

Permalink
[ML4SE-239] Survey is ready.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikrise2 committed Dec 2, 2023
1 parent 2384ca4 commit 4bf857c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,17 @@ fun Panel.survey(id: String) {
?: error("Survey with id `$id` hasn't been found.")
loadBasePage(SurveyTemplate(survey))
setNextAction {
val surveyParser = SurveyParser(mainWindow, project)
GlobalScope.launch {
surveyParser.parseAndLog(survey)
checkSurveyInputs().runOnSuccess {
if (it) {
val surveyParser = SurveyParser(mainWindow, project)
GlobalScope.launch {
surveyParser.parseAndLog(survey)
}
processScenario()
} else {
notifyError(project, UIBundle.message("ui.please.fill"))
}
}
processScenario()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,6 @@ surveys:
- !<Textarea>
text: 8. Please share any additional thoughts or comments you have about your experience using the Emotion Tracker plugin.
elementId: additionalThoughts
required: true
rows: 5
cols: 50
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
.box{
padding: 3px;
margin: 6px;
border-radius: 3px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

let requiredFields = document.querySelectorAll('input[required], textarea[data-req="required"]')
requiredFields.forEach(function (fieldTemp) {
let fields = document.querySelectorAll(`input[name=${fieldTemp.name}]`)
fields.forEach(function (field){
let fields = document.getElementsByName(fieldTemp.name);
fields.forEach(function (field) {
field.onclick = function () {
if (field.type === "radio") {
defaultBorder(field.name)
Expand Down Expand Up @@ -44,7 +44,6 @@
}

function defaultBorder(id) {
document.getElementById(`${id}___container`).style.outline = '1px solid black'
document.getElementById(`${id}___container`).style.outline = '0px'
}

</script>
</script>

0 comments on commit 4bf857c

Please sign in to comment.