From ca016903054fe53be08b8afeb53c019f44247cf9 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 2 Dec 2015 14:31:15 +0100 Subject: [PATCH] Add cancel button to forms that didn't have one already --- app/views/groups/new.html.haml | 1 + app/views/profiles/show.html.haml | 8 +++----- app/views/projects/new.html.haml | 1 + app/views/projects/services/_form.html.haml | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 3e602559ae0..4bc31cabea6 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -23,3 +23,4 @@ .form-actions = f.submit 'Create group', class: "btn btn-create", tabindex: 3 + = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index ac7355dde1f..faab12ca0b9 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -96,8 +96,6 @@ = link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar" - .row - .col-md-7 - .form-group - .col-sm-offset-2.col-sm-10 - = f.submit 'Save changes', class: "btn btn-success" + .form-actions + = f.submit 'Save changes', class: "btn btn-success" + = link_to "Cancel", user_path(current_user), class: "btn btn-cancel" diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index fa75a624222..2670b9d9cda 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -100,6 +100,7 @@ .form-actions = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 + = link_to 'Cancel', dashboard_projects_path, class: 'btn btn-cancel' - if current_user.can_create_group? .pull-right diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index fecd157c6dc..ea5a2302a56 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -15,3 +15,4 @@ - if @service.valid? && @service.activated? - disabled = @service.can_test? ? '':'disabled' = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}" + = link_to "Cancel", namespace_project_services_path(@project.namespace, @project), class: "btn btn-cancel"