summaryrefslogtreecommitdiff
path: root/app/views/admin/applications/_form.html.haml
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-04-04 21:25:38 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-04-04 21:37:07 -0400
commit7a2370f74060b2f065e3602700fe1b33fda4685c (patch)
tree0c23a588515e857598d5e389cd55aa816d3cfe35 /app/views/admin/applications/_form.html.haml
parent2ed6cd9e469ffcdb60f21d1738de1eff8c258432 (diff)
downloadgitlab-ce-7a2370f74060b2f065e3602700fe1b33fda4685c.tar.gz
Standardize the way we check for and display form errorsrs-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.
Diffstat (limited to 'app/views/admin/applications/_form.html.haml')
-rw-r--r--app/views/admin/applications/_form.html.haml7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml
index e18f7b499dd..4aacbb8cd77 100644
--- a/app/views/admin/applications/_form.html.haml
+++ b/app/views/admin/applications/_form.html.haml
@@ -1,9 +1,6 @@
= form_for [:admin, @application], url: @url, html: {class: 'form-horizontal', role: 'form'} do |f|
- - if application.errors.any?
- .alert.alert-danger
- %button{ type: "button", class: "close", "data-dismiss" => "alert"} &times;
- - application.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(application)
+
= content_tag :div, class: 'form-group' do
= f.label :name, class: 'col-sm-2 control-label'
.col-sm-10