Skip to content

Commit

Permalink
#28 - clear all button to reset advanced search field to default values
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundchan8 committed Mar 28, 2023
1 parent cf6e2df commit 4e989ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cardDatabase/static/js/database_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ function initDatabaseBase(){
$('.help-tooltip.show').removeClass('show');
$('.tooltip-popup').off('click', checkIfCloseTooltip);
}

// clear all text/radio/select inputs from the advance search form
$('#clear-advanced-search').on('click', function(event){
document.getElementById("advanced-form").reset();
});
}
$(function(){
initDatabaseBase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
</div>
<div class="form-submit-button">
<input type="submit" value="Search" name="advanced-form">
<input id="clear-advanced-search" type="button" value="Clear All" name="clear-form">
</div>
</form>
</div>
Expand Down

0 comments on commit 4e989ac

Please sign in to comment.