diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml index 402cdb44182fc733e7cd0ac53e64bf4548593f85..32080b767c634817f711637a1cc23cdbdd2c84c1 100644 --- a/app/views/projects/_issuable_form.html.haml +++ b/app/views/projects/_issuable_form.html.haml @@ -1,3 +1,10 @@ +- if issuable.errors.any? + .row + .col-sm-10.col-sm-offset-2 + .alert.alert-danger + - issuable.errors.full_messages.each do |msg| + %span= msg + %br .form-group = f.label :title, class: 'control-label' do %strong= 'Title *' diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index d063f92e87fc7801938177ddaa11db1bdfee45a2..a4a6b0005c743f8a915a8b8f7e5f17a4e3b6291a 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -9,13 +9,6 @@ = "Please review the #{link_to "guidelines for contribution", contribution_guide_url} to this repository.".html_safe = form_for [@project, @issue], html: { class: 'form-horizontal issue-form' } do |f| - -if @issue.errors.any? - .row - .col-sm-10.col-sm-offset-2 - .alert.alert-danger - - @issue.errors.full_messages.each do |msg| - %span= msg - %br = render 'projects/issuable_form', f: f, issuable: @issue .form-group = f.label :label_ids, class: 'control-label' do diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml index a97547aabeceaaebc4f1acdd285fd0144c65c5af..8ad47724fe7cbd995269ffcb4d9b4085c6f2f0d6 100644 --- a/app/views/projects/merge_requests/_form.html.haml +++ b/app/views/projects/merge_requests/_form.html.haml @@ -9,11 +9,6 @@ %strong #{link_to "guidelines for contribution", contribution_guide_url} to this repository. - -if @merge_request.errors.any? - .alert.alert-danger - - @merge_request.errors.full_messages.each do |msg| - %div= msg - .merge-request-form-info = render 'projects/issuable_form', f: f, issuable: @merge_request .form-group