diff --git a/app/assets/javascripts/reports/reports_datatable.js.erb b/app/assets/javascripts/reports/reports_datatable.js.erb index 92901cdb6..c446e1c0c 100644 --- a/app/assets/javascripts/reports/reports_datatable.js.erb +++ b/app/assets/javascripts/reports/reports_datatable.js.erb @@ -114,14 +114,14 @@ var editReportButton = $('#edit-report-btn'); var deleteReportsButton = $('#delete-reports-btn'); if (CHECKED_REPORTS.length === 0) { - editReportButton.addClass("disabled"); - deleteReportsButton.addClass("disabled"); + editReportButton.addClass("disabled hidden"); + deleteReportsButton.addClass("disabled hidden"); } else if (CHECKED_REPORTS.length === 1) { - editReportButton.removeClass("disabled"); - deleteReportsButton.removeClass("disabled"); + editReportButton.removeClass("disabled hidden"); + deleteReportsButton.removeClass("disabled hidden"); } else { - editReportButton.addClass("disabled"); - deleteReportsButton.removeClass("disabled"); + editReportButton.removeClass('hidden').addClass('disabled'); + deleteReportsButton.removeClass("disabled hidden"); } } diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index 08acfca06..320308e44 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -14,11 +14,11 @@ <% end %> - <%= link_to "", remote: true, class: "btn btn-secondary", id: "edit-report-btn" do %> + <%= link_to "", remote: true, class: "btn btn-light disabled hidden", id: "edit-report-btn" do %> <% end %> - <%= link_to "", remote: true, class: "btn btn-secondary", id: "delete-reports-btn" do %> + <%= link_to "", remote: true, class: "btn btn-light disabled hidden", id: "delete-reports-btn" do %> <% end %>