OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
display error messages when storage update fails
Christophe Bliardb132aa6d05d1
diff --git a/modules/storages/app/controllers/storages/admin/storages_controller.rb b/modules/storages/app/controllers/storages/admin/storages_controller.rbindex 17a288cf34f..0c449bf6801 100644--- a/modules/storages/app/controllers/storages/admin/storages_controller.rb+++ b/modules/storages/app/controllers/storages/admin/storages_controller.rb@@ -117,6 +117,7 @@ class Storages::Admin::StoragesController < ApplicationControllerflash[:notice] = I18n.t(:notice_successful_update)redirect_to storage_path(@object)else+ @errors = service_result.errorsrender :editendenddiff --git a/modules/storages/app/views/storages/admin/storages/edit.html.erb b/modules/storages/app/views/storages/admin/storages/edit.html.erbindex 8a712bf9d0b..fa88740199f 100644--- a/modules/storages/app/views/storages/admin/storages/edit.html.erb+++ b/modules/storages/app/views/storages/admin/storages/edit.html.erb@@ -4,7 +4,6 @@<%= toolbar title: t('label_edit_x', x: @object.name) %><%= labelled_tabular_form_for @object, url: storage_path(@object) do |f| -%>- <%= error_messages_for_contract @object, @errors %><%= render partial: 'form', locals: { f: f } %><%= styled_button_tag t(:button_save), class: "-highlight -with-icon icon-checkmark" %><% end %>diff --git a/modules/storages/app/views/storages/admin/storages/new.html.erb b/modules/storages/app/views/storages/admin/storages/new.html.erbindex 6fc15587eca..af32c17b6d8 100644--- a/modules/storages/app/views/storages/admin/storages/new.html.erb+++ b/modules/storages/app/views/storages/admin/storages/new.html.erb@@ -4,7 +4,6 @@<%= toolbar title: t("storages.label_new_storage") %><%= labelled_tabular_form_for @object, url: storages_path(@object) do |f| -%>- <%= error_messages_for_contract @object, @errors %><%= render partial: 'form', locals: { f: f } %><%= styled_button_tag t(:button_create), class: "-highlight -with-icon icon-checkmark" %><% end %>