Fix theme deletion not working

This commit is contained in:
Andreas Nedbal 2020-05-06 18:51:06 +02:00
parent f8448405a4
commit 65e66003ee
1 changed files with 16 additions and 16 deletions

View File

@ -1,5 +1,4 @@
= bootstrap_form_for(current_user.theme || Theme.new, url: {action: "update_theme"}, html: {id: 'update_theme'}, method: "patch") do |f|
.card
.card
.card-body
%h1 Theming
%p.lead Welcome to the Theme Editor!
@ -11,6 +10,11 @@
%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"