Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/625 readd language selection (#630)
* Bring back language level svgs * implement correct language level indicators and add tooltip for language cert if needed * fix padding of language display * Create working form fields to edit languages in person edit view * Add language selection squares, but they do nothing yet * Add hidden _destroy field to person language form * make selection of languages possible by creating a stimulus controller that handles the visibility * Make person role helper dynamic to use it for every dynamic form, rename partials, remove the language selection and make creation & deletion of languages possible * remove now unused stimulus controller * Make form automatically add mandatory languages unless they already exist, make mandatory langues undeletable * Refactor code in view and validate language level in controller * make form submit disabled fields * Remove unnecessary helper method and dublicate line in form that is not wanted anymore * Remove unnecessary helper method * Add classes to form for testing and expand people feature specs to now also test language selection * Fix update controller method, write test to test all functions of said controller method * Make edit view wider on small screens * Resolve rubocop offense * restyle languages on show view of people * Make form disable already selected languages * add a bit of styling to language display * Make fields deactivate when new fields are added and reactivated when they are deleted * Make language level selection and certificate input appear on the same height add new method to sort languages * Remove unused css classes * Refactor sort_languages method and use it in view * Add - as default option to language selection and sort languages in edit view * Make default option not deactivate * Fix deactivating of languages that are already selected when form fails * Make view not display certificate if it is blank * Write test that tests if already selected languages are disabled in other dropdowns * Restly show and edit view of person a bit * Rewrite test that tests disabling of languages * bring back css class that shouldnt have been deleted * Fix competence feature specs by formatting fixtures correctly and normalizing in tests * Fix cv_spec spec * Fix rubocop offenses * Move logic from controller to concerns * Remove unnecessary concern * Outsource language skills levels to a helper method * Correct rubocop offense * Remove default option from language select and make it choose first undisabled option when creating a new language * Adjust code comment to match what is actually done in lang selection js controller
- Loading branch information