Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
194 stars 39 forks source link

Add css_classes support to formcheckbox #3199

Closed stveit closed 1 week ago

stveit commented 1 week ago

Turns out FormCheckBox needs to support css_classes to fully replace the old CheckBox.

This requires some change to how the templates are accessed. The changes in this PR makes it so the added argument css_classes is accessible in the html template. This could have been done the other way as well, but this is how the other classes that require css_classeswork.

I do also think its a bit less "magic" to define the template directly, instead of using a keyword "checkbox" that maps to the correct template in another file. Better to just define the correct template directly in the class.

github-actions[bot] commented 1 week ago

πŸ¦™ MegaLinter status: βœ… SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
βœ… PYTHON black 992 0 11.14s
βœ… PYTHON ruff 987 0 0.11s

See detailed report in MegaLinter reports

_MegaLinter is graciously provided by OX Security_

github-actions[bot] commented 1 week ago

Test results

β€‡β€ˆβ€‡β€‡9 filesβ€„β€ƒβ€‡β€ˆβ€‡β€‡9 suites   8m 28s ⏱️ 2β€ˆ139 tests 2β€ˆ139 βœ…β€ƒ0 πŸ’€β€ƒ0 ❌ 4β€ˆ017 runsβ€Šβ€ƒ4β€ˆ017 βœ…β€ƒ0 πŸ’€β€ƒ0 ❌

Results for commit 46fd948d.

:recycle: This comment has been updated with latest results.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.39%. Comparing base (9db1bbf) to head (46fd948). Report is 6 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3199 +/- ## ========================================== - Coverage 60.39% 60.39% -0.01% ========================================== Files 605 605 Lines 43703 43704 +1 Branches 48 48 ========================================== Hits 26395 26395 - Misses 17296 17297 +1 Partials 12 12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud