diff --git a/app/assets/javascripts/components/search_actions.ts b/app/assets/javascripts/components/search_actions.ts index 10478f7b77..043d351bca 100644 --- a/app/assets/javascripts/components/search_actions.ts +++ b/app/assets/javascripts/components/search_actions.ts @@ -105,7 +105,7 @@ export class SearchActions extends ShadowlessLitElement { return this.actions.filter(isSearchAction); } - performAction(action: SearchAction): boolean { + async performAction(action: SearchAction): boolean { if (!action.action && !action.js) { return true; } @@ -118,17 +118,17 @@ export class SearchActions extends ShadowlessLitElement { if (action.confirm === undefined || window.confirm(action.confirm)) { const url: string = searchQuery.addParametersToUrl(action.action); - fetch(url, { + const response = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" } - }).then( data => { - new Toast(data.message); - if (data.js) { - eval(data.js); - } else { - searchQuery.resetAllQueryParams(); - } }); + const data = await response.json(); + new Toast(data.message); + if (data.js) { + eval(data.js); + } else { + searchQuery.resetAllQueryParams(); + } } return false; diff --git a/app/assets/stylesheets/pages/home.css.scss b/app/assets/stylesheets/pages/home.css.scss index 4a3cd61132..6a0d1cd4df 100644 --- a/app/assets/stylesheets/pages/home.css.scss +++ b/app/assets/stylesheets/pages/home.css.scss @@ -12,7 +12,7 @@ position: relative; } -.home-header:before { +.home-header::before { content: ""; background: $primary-30; position: absolute; @@ -23,7 +23,6 @@ transform: translate(-50%, 0); } - .home-header img { margin-top: -35px; margin-bottom: -10px; diff --git a/app/controllers/auth/omniauth_callbacks_controller.rb b/app/controllers/auth/omniauth_callbacks_controller.rb index 16668eabff..00e048e2ab 100644 --- a/app/controllers/auth/omniauth_callbacks_controller.rb +++ b/app/controllers/auth/omniauth_callbacks_controller.rb @@ -270,6 +270,11 @@ def redirect_to_known_provider!(user) end def redirect_duplicate_email_for_provider! + ApplicationMailer.with( + authinfo: auth_hash, + errors: I18n.t('devise.omniauth_callbacks.duplicate_email_for_provider', email_address: auth_email, provider: provider.class.sym.to_s) + ).user_unable_to_log_in.deliver_later + set_flash_message :alert, :duplicate_email_for_provider, email_address: auth_email, provider: provider.class.sym.to_s flash[:options] = [{ url: contact_path, message: I18n.t('pages.contact.prompt') }] redirect_to root_path diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 810740d6fb..e19eb20783 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -5,7 +5,7 @@

<%= t ".title" %>

- <%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, no_dropdown_for: ["labels", "judges"]} %> + <%= render partial: 'layouts/searchbar', locals: {labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], judges: @judges, no_dropdown_for: ["labels", "judges", "repositories"]} %>
<%= render partial: 'activities_table', locals: {activities: @activities} %>
diff --git a/app/views/annotations/question_index.html.erb b/app/views/annotations/question_index.html.erb index 95a47f63cf..a3a325c07e 100644 --- a/app/views/annotations/question_index.html.erb +++ b/app/views/annotations/question_index.html.erb @@ -22,7 +22,7 @@ <% actions << { text: t('questions.index.watch'), search: { refresh: true }, click: 'window.dodona.toggleIndexReload()' } %> <% actions << { text: t('questions.index.everything'), search: { everything: true } } if @unfiltered %> <% end %> - <%= render partial: 'layouts/searchbar', locals: { actions: actions, refresh_element: "#refresh-element", courses: @courses, question_states: Question.question_states.keys } %> + <%= render partial: 'layouts/searchbar', locals: { actions: actions, refresh_element: "#refresh-element", courses: @courses, question_states: Question.question_states.keys, no_dropdown_for: ["courses"] } %>
<%= render partial: 'questions_table', locals: { questions: @questions } %>
diff --git a/app/views/series/edit.html.erb b/app/views/series/edit.html.erb index 4926e82f5f..4297a2fc37 100644 --- a/app/views/series/edit.html.erb +++ b/app/views/series/edit.html.erb @@ -84,7 +84,7 @@

<%= t ".add_activities" %>

- <%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"]} %> + <%= render partial: 'layouts/searchbar', locals: {baseUrl: available_activities_series_path(@series), eager: true, labels: @labels, programming_languages: @programming_languages, repositories: @repositories, activity_types: [ContentPage, Exercise], description_languages: ["en", "nl"], no_dropdown_for: ["labels", "repositories"]} %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 995824747d..709b973d58 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -10,7 +10,7 @@ <% end %>
- <%= render partial: 'layouts/searchbar', locals: {institutions: Institution.all} %> + <%= render partial: 'layouts/searchbar', locals: {institutions: Institution.all, no_dropdown_for: ["institutions"]} %>
<%= render partial: 'users_table', locals: {users: @users, pagination_opts: @pagination_opts} %>
diff --git a/config/initializers/00_version.rb b/config/initializers/00_version.rb index 751c600376..88895c88bf 100644 --- a/config/initializers/00_version.rb +++ b/config/initializers/00_version.rb @@ -3,7 +3,7 @@ class Application module Version MAJOR = 5 MINOR = 6 - PATCH = 1 + PATCH = 2 STRING = [MAJOR, MINOR, PATCH].compact.join('.') end