diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-04-07 05:14:41 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-04-07 20:01:30 +0300 |
commit | b9069f31b98a7b6b2c1ad512c6becd1b6e70ea6c (patch) | |
tree | 18273e3a8e84832da4850ac9d100ed01b4db5970 /app/views | |
parent | 7d57d8b783eedd73997a193ca09563a49109c557 (diff) |
Make the New Application form's error messages visible
Diffstat (limited to 'app/views')
-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' |