Skip to content

Commit

Permalink
COMCL-703: Ensure filter is cleared appropraitely
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Oct 8, 2024
1 parent 5765e30 commit 577c1ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion ang/afsearchQuotations.aff.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div class="af-container row civicase__case-filter-form-elements" ng-show="expanded">
<af-field name="status_id" defn="{input_attrs: {multiple: true}}" class="col-md-2" />
<af-field name="quotation_date" defn="{input_attrs: {time: false}, search_range: true, label: 'Date'}" class="col-md-4 civicase__ui-range" />
<af-field name="DATE_quotation_date" defn="{search_range: true, time: false, input_attrs: {}, label: 'Date'}" class="col-md-4 civicase__ui-range" />
<div class="col-md-1">
<button type="button" class="btn btn-link civicase__features-filters-clear" style="margin-top: 2em;">Clear All</button>
</div>
Expand All @@ -26,3 +26,9 @@
<crm-search-display-table search-name="Civicase_Quotations" display-name="Civicase_Quotations_Table" filters="{case_id: routeParams.caseId}"></crm-search-display-table>
</div>

<style>
af-field[name="DATE_quotation_date"] input.form-control.hasTimeEntry {
display: none !important;
}
</style>

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@

if ($('.civicase__features-filters-clear').length) {
// Handle clear filter button.
$('.civicase__features-filters-clear').click(event => {
$('.civicase__features-filters-clear').off('click').click(event => {
CRM.$("input[id*='id']").select2('data', null)
CRM.$('.civicase__features input, .civicase__features textarea').val('').change();
});
}
Expand Down

0 comments on commit 577c1ba

Please sign in to comment.