Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-11 15:01:50 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-04-11 15:01:50 +0300
commit5999fec7a3aa7f663d0ade254e37fda3391fa17a (patch)
tree11ab4556b1e36b9820f860046929ef3164daa48d /app/views/groups
parent1794e934ce44b5058be598c2da43172bf80aac16 (diff)
parent7a2370f74060b2f065e3602700fe1b33fda4685c (diff)
Merge branch 'rs-form_errors' into 'master'
Standardize the way we check for and display form errors - Some views had a "Close" button. We've removed this, because we don't want users accidentally hiding the validation errors and not knowing what needs to be fixed. - Some views used `li`, some used `p`, some used `span`. We've standardized on `li`. - Some views only showed the first error. We've standardized on showing all of them. - Some views added an `#error_explanation` div, which we've made standard. See merge request !3531
Diffstat (limited to 'app/views/groups')
-rw-r--r--app/views/groups/edit.html.haml4
-rw-r--r--app/views/groups/new.html.haml5
2 files changed, 2 insertions, 7 deletions
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index ea5a0358392..a698cbbe9db 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -5,9 +5,7 @@
Group settings
.panel-body
= form_for @group, html: { multipart: true, class: "form-horizontal" }, authenticity_token: true do |f|
- - if @group.errors.any?
- .alert.alert-danger
- %span= @group.errors.full_messages.first
+ = form_errors(@group)
= render 'shared/group_form', f: f
.form-group
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index 30ab8aeba13..2b8bc269e64 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -6,10 +6,7 @@
%hr
= form_for @group, html: { class: 'group-form form-horizontal' } do |f|
- - if @group.errors.any?
- .alert.alert-danger
- %span= @group.errors.full_messages.first
-
+ = form_errors(@group)
= render 'shared/group_form', f: f, autofocus: true
.form-group.group-description-holder