diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-08 11:14:08 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-08 11:14:08 +0000 |
commit | a4ff12772893ec0596f13b8b8103de2824b84072 (patch) | |
tree | 80a38ac8be00b01877b2ccb522a860e347977b19 | |
parent | 4902dca9661ebcaaaecd7deff967225b657423b5 (diff) | |
parent | b9069f31b98a7b6b2c1ad512c6becd1b6e70ea6c (diff) | |
download | gitlab-ce-a4ff12772893ec0596f13b8b8103de2824b84072.tar.gz |
Merge branch 'rs-application-form-messages' into 'master'
Make the "New Application" form's error messages visible
Prior, if you submit the form without values the error text and the form fields were white-on-white:

After:

See merge request !1752
-rw-r--r-- | app/views/admin/applications/_form.html.haml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index b77d188a38d..fa4e6335c73 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -1,13 +1,15 @@ = form_for [:admin, @application], url: @url, html: {class: 'form-horizontal', role: 'form'} do |f| - if application.errors.any? - .alert.alert-danger{"data-alert" => ""} - %p Whoops! Check your form for possible errors - = content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do + .alert.alert-danger + %button{ type: "button", class: "close", "data-dismiss" => "alert"} × + - application.errors.full_messages.each do |msg| + %p= msg + = content_tag :div, class: 'form-group' do = f.label :name, class: 'col-sm-2 control-label' .col-sm-10 = f.text_field :name, class: 'form-control' = doorkeeper_errors_for application, :name - = content_tag :div, class: "form-group#{' has-error' if application.errors[:redirect_uri].present?}" do + = content_tag :div, class: 'form-group' do = f.label :redirect_uri, class: 'col-sm-2 control-label' .col-sm-10 = f.text_area :redirect_uri, class: 'form-control' |