diff --git a/app/javascript/retrospring/features/settings/index.ts b/app/javascript/retrospring/features/settings/index.ts index ab96781c..39024af8 100644 --- a/app/javascript/retrospring/features/settings/index.ts +++ b/app/javascript/retrospring/features/settings/index.ts @@ -10,7 +10,7 @@ export default (): void => { themeDocumentHandler(); registerEvents([ - { type: 'submit', target: document.querySelector('[action="/settings/theme"]'), handler: themeSubmitHandler }, + { type: 'submit', target: document.querySelector('form.edit_theme, form.new_theme'), handler: themeSubmitHandler }, { type: 'submit', target: document.querySelector('#edit_user'), handler: userSubmitHandler }, { type: 'change', target: document.querySelector('#user_profile_picture[type=file]'), handler: profilePictureChangeHandler }, { type: 'change', target: document.querySelector('#user_profile_header[type=file]'), handler: profileHeaderChangeHandler }, diff --git a/app/views/settings/theme/edit.haml b/app/views/settings/theme/edit.haml index d536dd4d..81f85882 100644 --- a/app/views/settings/theme/edit.haml +++ b/app/views/settings/theme/edit.haml @@ -7,7 +7,7 @@ - if current_user.theme .pull-right = button_to t(".delete"), settings_theme_path, data: { confirm: t("voc.confirm") }, tabindex: -1, method: :delete, class: "btn btn-danger" -= bootstrap_form_for(current_user.theme || Theme.new, url: { action: "update" }, html: { id: "update" }, method: :patch) do |f| += bootstrap_form_for(current_user.theme || Theme.new, html: { id: "update" }, method: :patch) do |f| .card .card-body %h2= t(".general.heading")