Commit f96b954b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #7804 from cirosantilli/factor-issue-mr-form-error

Factor issue and MR edit form error list.
parents db12e2dc eb033aa6
- 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 .form-group
= f.label :title, class: 'control-label' do = f.label :title, class: 'control-label' do
%strong= 'Title *' %strong= 'Title *'
......
...@@ -9,13 +9,6 @@ ...@@ -9,13 +9,6 @@
= "Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe = "Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
= form_for [@project, @issue], html: { class: 'form-horizontal issue-form' } do |f| = 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 = render 'projects/issuable_form', f: f, issuable: @issue
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, class: 'control-label' do
......
...@@ -9,11 +9,6 @@ ...@@ -9,11 +9,6 @@
%strong #{link_to "guidelines for contribution", contribution_guide_url} %strong #{link_to "guidelines for contribution", contribution_guide_url}
to this repository. 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 .merge-request-form-info
= render 'projects/issuable_form', f: f, issuable: @merge_request = render 'projects/issuable_form', f: f, issuable: @merge_request
.form-group .form-group
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment