Enable basic keyword validation
This commit is contained in:
parent
ba8f1b3c99
commit
c5ac0eb8d5
@ -115,10 +115,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('#search').click(onSearch);
|
$('#search').click(onSearch);
|
||||||
|
|
||||||
$('#learn').click(onLearn);
|
$('#learn').click(onLearn);
|
||||||
|
$('#keyword').bind('input', function() {
|
||||||
|
$('#learn').prop('disabled', !$(this).val());
|
||||||
|
});
|
||||||
|
|
||||||
$('#keywords').selectpicker('refresh');
|
$('#keywords').selectpicker('refresh');
|
||||||
$('#keywords').change(function() {
|
$('#keywords').change(function() {
|
||||||
$('#search').prop('disabled', $(this).val() === null);
|
$('#search').prop('disabled', !$(this).val());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-primary" id="learn">Learn</button>
|
<button type="button" class="btn btn-primary" id="learn" disabled="disabled">Learn</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user