Browse Source

Fix JS.

copyvios-ng
Ben Kurtovic 9 years ago
parent
commit
167f169def
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      static/script.js

+ 8
- 4
static/script.js View File

@@ -117,10 +117,14 @@ $(document).ready(function() {

$("#cv-form").submit(function() {
if ($("#action-search").is(":checked")) {
if ($("#cv-cb-engine").is(":checked"))
$(".cv-search[type='hidden'][name='use_engine']").prop("disabled", true);
if ($("#cv-cb-links").is(":checked"))
$(".cv-search[type='hidden'][name='use_links']").prop("disabled", true);
var hidden = [
["engine", "use_engine"], ["links", "use_links"],
["turnitin", "turnitin"]];
$.each(hidden, function(i, val) {
if ($("#cv-cb-" + val[0]).is(":checked"))
$("#cv-form input[type='hidden'][name='" + val[1] + "']")
.prop("disabled", true);
});
}
});



Loading…
Cancel
Save