Skip to content

Commit

Permalink
Merge pull request #109 from MITLibraries/gdt-126-advanced-search-text
Browse files Browse the repository at this point in the history
Update advanced search language
  • Loading branch information
jazairi authored Jan 26, 2024
2 parents 1c6dae7 + b868f1a commit 2f0d3fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/javascript/search_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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() {
advanced_field.setAttribute('value', 'true');
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');
Expand Down
4 changes: 2 additions & 2 deletions app/views/search/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f0d3fe

Please sign in to comment.