diff --git a/VERSION b/VERSION
index 6e66c4c20..bf4df28ef 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.28.1.3
+1.28.2
diff --git a/app/assets/javascripts/sitewide/iframe_modal.js b/app/assets/javascripts/sitewide/iframe_modal.js
index d50df5ad9..70631dcb4 100644
--- a/app/assets/javascripts/sitewide/iframe_modal.js
+++ b/app/assets/javascripts/sitewide/iframe_modal.js
@@ -7,6 +7,10 @@ $(document).on('turbolinks:load', function() {
window.iFrameModal = document.getElementById('iFrameModal');
let iFrameModalFrame = document.getElementById('iFrameModalFrame');
+ // Block from running when accessing page without defined iframe modal
+ // (sign in, reset password, accept invitation, 2fa)
+ if (!iFrameModalFrame || !iFrameModal) return;
+
window.showIFrameModal = (url) => {
iFrameModalFrame.setAttribute('src', url);
iFrameModal.classList.remove('hidden');
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 4b3fda052..acbfdd4d9 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -46,7 +46,7 @@ class ApplicationController < ActionController::Base
def render_403(style = 'danger')
respond_to do |format|
format.html do
- render file: 'public/403.html', status: :forbidden, layout: false
+ render 'errors/403', status: :forbidden, layout: false
end
format.json do
render json: { style: style }, status: :forbidden
@@ -60,7 +60,7 @@ class ApplicationController < ActionController::Base
def render_404
respond_to do |format|
format.html do
- render file: 'public/404.html', status: :not_found, layout: false
+ render 'errors/404', status: :not_found, layout: false
end
format.json do
render json: {}, status: :not_found
@@ -74,7 +74,7 @@ class ApplicationController < ActionController::Base
def render_422(message = t('client_api.permission_error'))
respond_to do |format|
format.html do
- render file: 'public/422.html', status: :unprocessable_entity, layout: false
+ render 'errors/422', status: :unprocessable_entity, layout: false
end
format.json do
render json: { message: message }, status: :unprocessable_entity
diff --git a/app/controllers/gene_sequence_assets_controller.rb b/app/controllers/gene_sequence_assets_controller.rb
index 7ce3e313f..ba17af824 100644
--- a/app/controllers/gene_sequence_assets_controller.rb
+++ b/app/controllers/gene_sequence_assets_controller.rb
@@ -64,9 +64,7 @@ class GeneSequenceAssetsController < ApplicationController
file.blob.metadata['asset_type'] = 'gene_sequence'
file.blob.metadata['name'] = params[:sequence_name]
file.save!
-
- @asset.view_mode = @parent.assets_view_mode
-
+ @asset.view_mode ||= @parent.assets_view_mode
@asset.save!
end
end
diff --git a/app/javascript/vue/ove/OpenVectorEditor.vue b/app/javascript/vue/ove/OpenVectorEditor.vue
index e148c267a..066b6f58f 100644
--- a/app/javascript/vue/ove/OpenVectorEditor.vue
+++ b/app/javascript/vue/ove/OpenVectorEditor.vue
@@ -10,9 +10,9 @@
:placeholder="i18n.t('open_vector_editor.sequence_name_placeholder')"/>
-
+
-
+
<%= javascript_include_tag 'open_vector_editor' %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index abfce7411..6c4dbeb8b 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3873,3 +3873,24 @@ en:
canvas_view: "Canvas view"
active_state: "Active state"
archived_state: "Archived state"
+
+ errors:
+ forbidden:
+ title: "Access to this page is denied (403)."
+ dialog:
+ title: "It would seem that you are not allowed in here."
+ text: "You should request access from your team administrators."
+ button: "Go back"
+ not_found:
+ title: "This page could not be found (404)."
+ dialog:
+ title: "This page could not be found (404)."
+ text_1: "You may have mistyped the address or the page may have moved."
+ text_2_html: |
+ "If you are the application owner check the logs for more information.
+ You can go back to home page or try searching."
+ unprocessable_entity:
+ title: "The change you wanted was rejected (422)."
+ dialog:
+ title: "Ooops, something went wrong."
+ text: "Please contact your SciNote administrator."