diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-04-20 17:02:42 +0200 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-04-20 17:02:42 +0200 |
commit | a548c8908da27832776211573f5410d8d09f77fc (patch) | |
tree | 22d5ecef0c3af3c3a68b3507abb2688c190b9cf7 | |
parent | Rework the user object of glsa comments (diff) | |
download | glsamaker-a548c8908da27832776211573f5410d8d09f77fc.tar.gz glsamaker-a548c8908da27832776211573f5410d8d09f77fc.tar.bz2 glsamaker-a548c8908da27832776211573f5410d8d09f77fc.zip |
cve tool: Don't require a reason for changing the state
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r-- | web/packs/src/javascript/cvetool.js | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/web/packs/src/javascript/cvetool.js b/web/packs/src/javascript/cvetool.js index f26354b..0a48167 100644 --- a/web/packs/src/javascript/cvetool.js +++ b/web/packs/src/javascript/cvetool.js @@ -415,34 +415,22 @@ function registerChangeStateListener(){ $( ".change-state-nfu" ).click(function() { var cveid = $(this).data( "cveid" ); var reason = $('.change-state-reason[data-cveid="' + cveid + '"]').val(); - if(reason != "") { - changeState(cveid, reason, "NFU"); - $("#collapseExample-" + cveid).removeClass('show'); - }else{ - $('.change-state-reason[data-cveid="' + cveid + '"]').addClass('is-invalid'); - } + changeState(cveid, reason, "NFU"); + $("#collapseExample-" + cveid).removeClass('show'); }); $( ".change-state-invalid" ).click(function() { var cveid = $(this).data( "cveid" ); var reason = $('.change-state-reason[data-cveid="' + cveid + '"]').val(); - if(reason != "") { - changeState(cveid, reason, "Invalid"); - $("#collapseExample-" + cveid).removeClass('show'); - }else{ - $('.change-state-reason[data-cveid="' + cveid + '"]').addClass('is-invalid'); - } + changeState(cveid, reason, "Invalid"); + $("#collapseExample-" + cveid).removeClass('show'); }); $( ".change-state-later" ).click(function() { var cveid = $(this).data( "cveid" ); var reason = $('.change-state-reason[data-cveid="' + cveid + '"]').val(); - if(reason != ""){ - changeState(cveid, reason, "Later"); - $("#collapseExample-" + cveid).removeClass('show'); - }else{ - $('.change-state-reason[data-cveid="' + cveid + '"]').addClass('is-invalid'); - } + changeState(cveid, reason, "Later"); + $("#collapseExample-" + cveid).removeClass('show'); }); } |