From 65e66003ee6362ce345aca1e1ee5e342ee54ba1a Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 6 May 2020 18:51:06 +0200 Subject: [PATCH] Fix theme deletion not working --- app/views/settings/_theme.haml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/views/settings/_theme.haml b/app/views/settings/_theme.haml index 69896805..9c4b7160 100644 --- a/app/views/settings/_theme.haml +++ b/app/views/settings/_theme.haml @@ -1,16 +1,20 @@ -= bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f| - .card - .card-body - %h1 Theming - %p.lead Welcome to the Theme Editor! - %p - Here you'll be able to modify your Retrospring experience by adjusting all available colors. - To further help you with adjusting needs, there are a few example elements using the specified colors, and sections will include - descriptions on their general use on the site! +.card + .card-body + %h1 Theming + %p.lead Welcome to the Theme Editor! + %p + Here you'll be able to modify your Retrospring experience by adjusting all available colors. + To further help you with adjusting needs, there are a few example elements using the specified colors, and sections will include + descriptions on their general use on the site! - %p - And with that: - %b Happy Theming! + %p + And with that: + %b Happy Theming! + + - if current_user.theme + .pull-right + = button_to 'Delete Theme', delete_user_theme_path, data: { confirm: "Are you sure?" }, tabindex: -1, method: :delete, class: "btn btn-danger" += bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f| .card .card-body %h2 General @@ -129,7 +133,3 @@ .card-body .pull-left = f.submit t('views.actions.save'), class: 'btn btn-primary' - - - if current_user.theme - .pull-right - = button_to 'Delete Theme', delete_user_theme_path, data: { confirm: "Are you sure?" }, tabindex: -1, method: :delete, class: "btn btn-danger"