-
-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove try's from survey template * Move enabling logic out of component Since it might be different depending on the type of field. For example, for a text field dependent on a checkbox, we'll need to check the "checked" property of the checkbox, not its value. * Simplify and refactor some logic * Extract answer rendering to a partial * Remove now unneeded early returns * Slightly improve a test * Test that answer information is properly saved * Split different answer types to separate columns Keeping them on a single column is weird and very unflexible. * Prefer symbols for adding errors to an attribute * Ensure numbering is kept after errors * Fix question type select incorrectly disabled * Better block variable name Answer is a different model not involved here, so this version is less confusing, I think. * Refactor survey answer form specs * Consolidate survey answer validations * Use proper forms around answers This is a similar refactoring to what was done in the backend. Instead of using isolated form helpers, use a proper form builder. This came with the fix/feature of adding proper support for client side validations, improving user experience and reducing server load. * Extract repeated method call to a variable * Normalize comment spacing * Fix incorrect disabling of max choices selector * Fix incorrect disabling of translated fields * Fix bad migration * Proper column type conversion PostgreSQL casting was saving the new text bodies as "\"value\"". * Normalize `input[type=*]` selectors
- Loading branch information
1 parent
0a5b498
commit b70aef9
Showing
22 changed files
with
285 additions
and
120 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
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
Oops, something went wrong.