diff --git a/app/views/admin/blacklisted_emails/index.html.erb b/app/views/admin/blacklisted_emails/index.html.erb index 114868b532c..2762adc370f 100644 --- a/app/views/admin/blacklisted_emails/index.html.erb +++ b/app/views/admin/blacklisted_emails/index.html.erb @@ -1,57 +1,56 @@

<%= t('admin.admin_email_blacklist.index.page_heading', default: "Manage Email Blacklist") %>

- -

<%= ts("Blacklisted email addresses cannot be used in guest comments. They will not affect users who share the same email address or prevent invitations from being sent or used by those email addresses. All emails are stored in a single canonical format and common variants of the same address are not allowed (for instance, foo+whatever@bar.com will not be allowed if foo@bar.com is blacklisted).") %>

+ + -

<%= ts("Add email address to blacklist")%>

- - <%= form_for(@admin_blacklisted_email) do |f| %> +

<%= ts("Add email address to blacklist") %>

+ + <%= form_for(@admin_blacklisted_email, html: { class: "simple post" }) do |f| %> <%= error_messages_for @admin_blacklisted_email %>

- <%= f.label :email, ts("Email") %> + <%= f.label :email, ts("Email to add") %> <%= f.text_field :email %> - - <%= f.submit ts("Add To Blacklist") %> - + <%= f.submit ts("Add To Blacklist") %>

<% end %>

<%= ts("Find blacklisted emails")%>

- + - <%= form_tag url_for(controller: "admin/blacklisted_emails", action: "index"), method: :get, class: "search", role: "search" do %> + <%= form_tag url_for(controller: "admin/blacklisted_emails", action: "index"), method: :get, class: "simple search", role: "search" do %>

- <%= label_tag "query", ts("Find Email") %> + <%= label_tag "query", ts("Email to find") %> <%= text_field_tag "query", params[:query] %> - - <%= submit_tag ts("Find") %> - + <%= submit_tag ts("Search Blacklist") %>

<% end %> - + <% end %> -
+ \ No newline at end of file diff --git a/features/admins/admin_email_blacklist.feature b/features/admins/admin_email_blacklist.feature index 7a2ba1224aa..8b49ce3e2b7 100644 --- a/features/admins/admin_email_blacklist.feature +++ b/features/admins/admin_email_blacklist.feature @@ -20,8 +20,8 @@ Scenario: Remove email address from blacklist Given I am logged in as an admin And I have blacklisted the address "foo@bar.com" When I follow "Blacklist" - And I fill in "Find Email" with "bar" - And I press "Find" + And I fill in "Email to find" with "bar" + And I press "Search Blacklist" Then I should see "email found" And I should see "foo@bar.com" When I follow "Remove" @@ -58,4 +58,3 @@ Scenario: Blacklisting a user's email should not affect their ability to post co And I post the work "New Work" And I post a comment "here's a great comment" Then I should see "Comment created!" - \ No newline at end of file diff --git a/features/step_definitions/admin_steps.rb b/features/step_definitions/admin_steps.rb index c17d97de5d0..d3ff80a3563 100644 --- a/features/step_definitions/admin_steps.rb +++ b/features/step_definitions/admin_steps.rb @@ -369,21 +369,21 @@ def update_settings(settings) Given(/^I have blacklisted the address for user "([^"]*)"$/) do |user| visit admin_blacklisted_emails_url u = User.find_by_login(user) - fill_in("Email", with: u.email) + fill_in("admin_blacklisted_email_email", with: u.email) click_button("Add To Blacklist") end Then(/^the address "([^"]*)" should be in the blacklist$/) do |email| visit admin_blacklisted_emails_url - fill_in("Find Email", with: email) - click_button("Find") + fill_in("Email to find", with: email) + click_button("Search Blacklist") assert page.should have_content(email) end Then(/^the address "([^"]*)" should not be in the blacklist$/) do |email| visit admin_blacklisted_emails_url - fill_in("Find Email", with: email) - click_button("Find") + fill_in("Email to find", with: email) + click_button("Search Blacklist") step %{I should see "0 emails found"} end diff --git a/public/stylesheets/site/2.0/07-interactions.css b/public/stylesheets/site/2.0/07-interactions.css index 070befe35e3..fd8e864cdd2 100755 --- a/public/stylesheets/site/2.0/07-interactions.css +++ b/public/stylesheets/site/2.0/07-interactions.css @@ -558,6 +558,10 @@ form.simple span.actions { float: none; } +.simple input[type="submit"] { + margin: 0; +} + /* WIDGET: TOGGLED FORMS (SHOW/HIDE bookmark and collection - hidden with jS) */ .toggled form dd, .dynamic form dd {