Skip to content

Commit

Permalink
Merge pull request #992 from sul-dlss/feedback-notice
Browse files Browse the repository at this point in the history
Add a feedback alert and a boolean settings flag to turn it off/on.
  • Loading branch information
jchristo4 committed Dec 19, 2014
2 parents 6d2f6e3 + 542373e commit 26262bb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/assets/stylesheets/modules/feedback-form.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@
#feedback-form{
border-bottom: 3px solid $sul-toolbar-border;
}

.feedback-alert {
color: rgb(204, 0, 0);
font-size: 1.2em;
padding: 10px;
border: 1px solid rgb(204, 0, 0);
margin: 10px 0pt;
}
5 changes: 5 additions & 0 deletions app/views/shared/feedback_forms/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<div class="container">
<% if Settings.FEEDBACK_ALERT %>
<p class="feedback-alert">
<%= t('blacklight.feedback_form.feedback_alert_html', href: mail_to("[email protected]")) %>
</p>
<% end %>
<%= form_tag feedback_form_path, method: :post, class:"form-horizontal feedback-form", role:"form" do %>
<div class="col-sm-6 col-sm-offset-2">
<div class="col-sm-offset-3">
Expand Down
1 change: 1 addition & 0 deletions config/locales/searchworks.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ en:
back_to_search: '<i class="fa fa-fast-backward"></i><span class="hidden-xs">&nbsp; Back to results</span>'
feedback_form:
success: '<strong>Thank you!</strong> Your feedback has been sent.'
feedback_alert_html: "The Stanford University Libraries will be closed for Winter Break from December 20th through January 4th. All SearchWorks inquiries submitted during the closure will not be read until January 5th. If you require a response before January 5th, please send your comments to %{href}."
range_limit:
submit_limit: 'Apply'
blacklight_advanced_search:
Expand Down
1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ NUMBER_OF_DAYS_TO_PRUNE: '7'
PURL_EMBED_PROVIDER: 'http://embed-service.example.com/embed'
PURL_EMBED_URL_SCHEME: 'http://purl.stanford.edu/*'
PURL_EMBED_RESOURCE: 'http://purl.stanford.edu/'
FEEDBACK_ALERT: <%= false %>

0 comments on commit 26262bb

Please sign in to comment.