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
Budget errors from contract
Oliver Günther26b8a8a1d4ce
diff --git a/modules/budgets/app/controllers/budgets_controller.rb b/modules/budgets/app/controllers/budgets_controller.rbindex 7127ba4ced4..370428f6f98 100644--- a/modules/budgets/app/controllers/budgets_controller.rb+++ b/modules/budgets/app/controllers/budgets_controller.rb@@ -108,6 +108,7 @@ class BudgetsController < ApplicationControllerflash[:notice] = t(:notice_successful_create)redirect_to(params[:continue] ? { action: 'new' } : { action: 'show', id: @budget })else+ @errors = call.errorsrender action: 'new', layout: !request.xhr?endend@@ -126,6 +127,7 @@ class BudgetsController < ApplicationControllerredirect_to(params[:back_to] || { action: 'show', id: @budget })else@budget = call.result+ @errors = call.errorsrender action: 'edit'endrescue ActiveRecord::StaleObjectErrordiff --git a/modules/budgets/app/views/budgets/_edit.html.erb b/modules/budgets/app/views/budgets/_edit.html.erbindex 4a392b15171..9e195f8027a 100644--- a/modules/budgets/app/views/budgets/_edit.html.erb+++ b/modules/budgets/app/views/budgets/_edit.html.erb@@ -33,7 +33,6 @@ See docs/COPYRIGHT.rdoc for more details.:html => {:multipart => true,:id => 'budget_form',:class => 'form'} do |f| %>- <%= error_messages_for 'budget' %><%= render :partial => 'form', :locals => {:f => f} %><div class="generic-table--action-buttons"><%= styled_button_tag t(:button_submit), class: '-with-icon icon-checkmark -highlight', id: 'budget-table--submit-button'%>diff --git a/modules/budgets/app/views/budgets/_form.html.erb b/modules/budgets/app/views/budgets/_form.html.erbindex e3162429f05..85339408acd 100644--- a/modules/budgets/app/views/budgets/_form.html.erb+++ b/modules/budgets/app/views/budgets/_form.html.erb@@ -28,6 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% resource = budget_attachment_representer(f.object) %>+<%= error_messages_for_contract @budget, @errors %><div class="form--field -required"><%= f.text_field :subject, required: true, autofocus: true, container_class: '-wide' %>diff --git a/modules/budgets/app/views/budgets/new.html.erb b/modules/budgets/app/views/budgets/new.html.erbindex 5e8729f9f5e..3f872e89f79 100644--- a/modules/budgets/app/views/budgets/new.html.erb+++ b/modules/budgets/app/views/budgets/new.html.erb@@ -34,7 +34,6 @@ See docs/COPYRIGHT.rdoc for more details.:url => projects_budgets_path(@project),:as => :budget,:html => {:multipart => true, :id => 'budget_form'} do |f| %>- <%= error_messages_for 'budget' %><%= render :partial => 'form', :locals => {:f => f} %><%= styled_button_tag t(:button_create), class: '-with-icon icon-checkmark' %><%= styled_button_tag t(:button_create_and_continue), :name => 'continue',