diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 13235f900..6cb12bfb3 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -30,7 +30,7 @@ def callback # where we want a JS-based redirect to go. render 'complete', locals: { redirect_to_url: url || hyrax.dashboard_path } else - redirect_to root_path, flash: {error: 'Not able to log in user. #{@user.errors.full_messages}'} + redirect_to root_path, flash: { error: "Not able to log in user. #{@user.errors.full_messages}" } end end alias cas callback @@ -42,7 +42,7 @@ def passthru end def failure - redirect_to root_path, flash: {error: 'Authentication Failed. Something is wrong with the SSO configuration.'} + redirect_to root_path, flash: { error: 'Authentication Failed. Something is wrong with the SSO configuration.' } end end end diff --git a/app/views/hyrax/admin/appearances/_banner_image_form.html.erb b/app/views/hyrax/admin/appearances/_banner_image_form.html.erb index cc3067f91..867d2f540 100644 --- a/app/views/hyrax/admin/appearances/_banner_image_form.html.erb +++ b/app/views/hyrax/admin/appearances/_banner_image_form.html.erb @@ -75,7 +75,8 @@ document.querySelector('.banner-submit').addEventListener('click', function(e) { if (cropper) { cropper.getCroppedCanvas().toBlob(function(blob) { var formData = new FormData(document.querySelector('form')); - formData.append('admin_appearance[banner_image]', blob, 'cropped.jpg'); + var currentAccountName = "<%= current_account.name %>"; + formData.append('admin_appearance[banner_image]', blob, `${currentAccountName}-cropped.jpg`); $.ajax('/admin/appearance', { method: 'POST',