BigW Consortium Gitlab

Commit 63969337 by Douwe Maan

Merge branch 'applications_form' into 'master'

Fix UI issues in Applications form @douwe Thanks for reviewing this small fix. --- Before: ![application_form_before](https://dev.gitlab.org/gitlab/gitlabhq/uploads/11fbee17ad6a4c9456cd7d6cba5ae429/application_form_before.png) --- After: ![application_form_after](https://dev.gitlab.org/gitlab/gitlabhq/uploads/0c64214ccda6c77095f468fcb8c748f3/application_form_after.png) See merge request !1859
parents b65f40b5 4cf7d8d9
= 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
......@@ -19,6 +24,7 @@
Use
%code= Doorkeeper.configuration.native_redirect_uri
for local tests
.form-actions
= f.submit 'Submit', class: "btn btn-primary wide"
= link_to "Cancel", applications_profile_path, class: "btn btn-default"
= f.submit 'Submit', class: "btn btn-create"
= link_to "Cancel", applications_profile_path, class: "btn btn-cancel"
%h3.page-title New application
- page_title "New Application"
%h3.page-title New Application
%hr
= render 'form', application: @application
\ No newline at end of file
......@@ -9,7 +9,7 @@
= icon('gear fw')
%span
Account
= nav_link(path: ['profiles#applications', 'applications#edit', 'applications#show', 'applications#new']) do
= nav_link(path: ['profiles#applications', 'applications#edit', 'applications#show', 'applications#new', 'applications#create']) do
= link_to applications_profile_path, title: 'Applications', data: {placement: 'right'} do
= icon('cloud fw')
%span
......
......@@ -176,7 +176,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
step 'I should see application form' do
expect(page).to have_content "New application"
expect(page).to have_content "New Application"
end
step 'I fill application form out and submit' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment