diff options
author | Nicolas <nicolas@gitlab.com> | 2015-06-14 18:37:58 +0300 |
---|---|---|
committer | Nicolas <nicolas@gitlab.com> | 2015-06-15 22:27:15 +0300 |
commit | f18a24f0ac96d2cafffc7dbf08bb644d5243a421 (patch) | |
tree | fb63267923fdaac5672f35496f0cc7fdb86b987b /app | |
parent | eccdbe367efa638c287ec426f763ec03791a7cf3 (diff) |
Fix layout issue when New Application validation fails.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/doorkeeper/applications/_form.html.haml | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/app/views/doorkeeper/applications/_form.html.haml b/app/views/doorkeeper/applications/_form.html.haml index a5fec2fabdb..a157c9af297 100644 --- a/app/views/doorkeeper/applications/_form.html.haml +++ b/app/views/doorkeeper/applications/_form.html.haml @@ -1,17 +1,22 @@ = form_for application, url: doorkeeper_submit_path(application), 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 - = f.label :name, class: 'col-sm-2 control-label' + .alert.alert-danger + %ul + - application.errors.full_messages.each do |msg| + %li= msg + + .form-group + = f.label :name, class: '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 - = f.label :redirect_uri, class: 'col-sm-2 control-label' + = f.text_field :name, class: 'form-control', required: true + + .form-group + = f.label :redirect_uri, class: 'control-label' + .col-sm-10 - = f.text_area :redirect_uri, class: 'form-control' - = doorkeeper_errors_for application, :redirect_uri + = f.text_area :redirect_uri, class: 'form-control', required: true + %span.help-block Use one line per URI - if Doorkeeper.configuration.native_redirect_uri |