cms icon indicating copy to clipboard operation
cms copied to clipboard

Fix task submission language option re-enable when reset

Open edisonhello opened this issue 5 years ago • 2 comments

Language list will be disable when a file is selected, but will not re-enable when reset button is pressed. This commit add a event listener on the button which calls CMS.CWSUtils.filter_languages to reset language list.


This change is Reviewable

edisonhello avatar Jun 29 '20 13:06 edisonhello

Codecov Report

Merging #1158 into master will decrease coverage by 0.07%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
- Coverage   61.99%   61.91%   -0.08%     
==========================================
  Files         230      230              
  Lines       16604    16604              
==========================================
- Hits        10294    10281      -13     
- Misses       6310     6323      +13     
Flag Coverage Δ
#functionaltests 45.63% <ø> (+0.03%) :arrow_up:
#unittests 43.29% <ø> (ø)
Impacted Files Coverage Δ
cms/server/admin/handlers/contestuser.py 23.72% <0.00%> (-7.63%) :arrow_down:
cms/io/rpc.py 90.10% <0.00%> (-1.03%) :arrow_down:
cms/service/esoperations.py 78.01% <0.00%> (-0.71%) :arrow_down:
cms/server/admin/handlers/base.py 67.11% <0.00%> (-0.68%) :arrow_down:
cms/io/service.py 68.90% <0.00%> (-0.61%) :arrow_down:
cms/service/EvaluationService.py 67.02% <0.00%> (-0.54%) :arrow_down:
cms/grading/Job.py 88.62% <0.00%> (-0.48%) :arrow_down:
cms/db/base.py 84.04% <0.00%> (ø)
cms/db/filecacher.py 77.37% <0.00%> (+0.32%) :arrow_up:
cms/grading/Sandbox.py 68.23% <0.00%> (+0.36%) :arrow_up:
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4c9e92...62f2322. Read the comment docs.

codecov[bot] avatar Jun 29 '20 13:06 codecov[bot]

Thanks, I can reproduce the issue.

I think there may be an even easier fix. Could you please check if this works:

  1. Use the onreset event attribute (on <form>) instead of onclick.
  2. Just .find() the <option> elements directly and call .removeAttr() on all of them at once.

andreyv avatar Nov 22 '20 18:11 andreyv