-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
136 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
window.addEventListener('load', function() { | ||
|
||
function hideQ2() { | ||
const q2 = document.getElementById("answer_02"); | ||
const q2_container = q2.closest(".question"); | ||
q2_container.style.display = 'none'; | ||
} | ||
function showQ2() { | ||
const q2 = document.getElementById("answer_02"); | ||
const q2_container = q2.closest(".question"); | ||
q2_container.style.display = 'block'; | ||
} | ||
|
||
function hideQ3() { | ||
const q3 = document.getElementById("answer_03"); | ||
const q3_container = q3.closest(".question"); | ||
q3_container.style.display = 'none'; | ||
} | ||
function showQ3() { | ||
const q3 = document.getElementById("answer_03"); | ||
const q3_container = q3.closest(".question"); | ||
q3_container.style.display = 'block'; | ||
} | ||
|
||
function handleThumbsUpDownClick(a, b, c) { | ||
if(a.currentTarget.value === '1') { | ||
showQ2() | ||
hideQ3() | ||
} else if(a.currentTarget.value === '0') { | ||
hideQ2() | ||
showQ3() | ||
} | ||
} | ||
|
||
const radioButtons = document.getElementById("answer_01").getElementsByTagName("input"); | ||
for (const radioButton of radioButtons) { | ||
radioButton.addEventListener("click", handleThumbsUpDownClick) | ||
} | ||
|
||
hideQ2() | ||
hideQ3() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Assumes: 2 questions: | ||
// 1. radio buttons. | ||
// 2. open text | ||
// Hides the 2nd question to start, and reveals it when selecting a radio button | ||
// | ||
window.addEventListener('load', function() { | ||
const q2 = document.getElementById("answer_02"); | ||
const q2_container = q2.closest(".question"); | ||
const submitButton = document.getElementById("touchpoints-form-<%= form.short_uuid %>").getElementsByClassName("submit-button")[0] | ||
|
||
function hideQ2() { | ||
q2_container.style.display = 'none'; | ||
} | ||
function showQ2() { | ||
q2_container.style.display = 'block'; | ||
} | ||
|
||
function hideSubmitButton() { | ||
submitButton.style.display = 'none'; | ||
} | ||
function showSubmitButton() { | ||
submitButton.style.display = 'block'; | ||
} | ||
|
||
function handleThumbsUpDownClick(a, b, c) { | ||
if(a.currentTarget.value === '1') { | ||
showQ2() | ||
showSubmitButton() | ||
} else if(a.currentTarget.value === '0') { | ||
showQ2() | ||
showSubmitButton() | ||
} | ||
} | ||
|
||
const radioButtons = document.getElementById("answer_01").getElementsByTagName("input"); | ||
for (const radioButton of radioButtons) { | ||
radioButton.addEventListener("click", handleThumbsUpDownClick) | ||
} | ||
|
||
hideQ2() | ||
hideSubmitButton() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class ChangeFederalRegisterUrl < ActiveRecord::Migration[7.1] | ||
def change | ||
change_column :cx_collection_details, :federal_register_url, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters