diff --git a/app/javascript/search_form.js b/app/javascript/search_form.js index eb26c3ad..e1a6b970 100644 --- a/app/javascript/search_form.js +++ b/app/javascript/search_form.js @@ -6,7 +6,7 @@ function disableAdvanced() { ); keyword_field.setAttribute('placeholder', 'Enter your search'); advanced_label.classList = 'closed'; - advanced_label.innerText = 'Show advanced search fields'; + advanced_label.innerText = 'Advanced search'; }; function enableAdvanced() { @@ -14,7 +14,7 @@ function enableAdvanced() { keyword_field.setAttribute('aria-required', false); keyword_field.setAttribute('placeholder', 'Keyword anywhere'); advanced_label.classList = 'open'; - advanced_label.innerText = 'Clear advanced search fields'; + advanced_label.innerText = 'Close advanced search'; }; var advanced_field = document.getElementById('advanced-search-field'); diff --git a/app/views/search/_form.html.erb b/app/views/search/_form.html.erb index c77209e9..f6dcf0c3 100644 --- a/app/views/search/_form.html.erb +++ b/app/views/search/_form.html.erb @@ -6,11 +6,11 @@ if params[:q] end # Initial form setup is determined by the advanced parameter. Thereafter it is altered by javascript. -advanced_label = "Show advanced search fields" +advanced_label = "Advanced search" advanced_label_class = "closed" search_required = true if params[:advanced] == "true" - advanced_label = "Clear advanced search fields" + advanced_label = "Close advanced search" advanced_label_class = "open" search_required = false end