Adjust form queries so selector doesn't pick delete button
This commit is contained in:
parent
2e251474dc
commit
f6828a24ad
|
@ -10,7 +10,7 @@ export default (): void => {
|
||||||
themeDocumentHandler();
|
themeDocumentHandler();
|
||||||
|
|
||||||
registerEvents([
|
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: '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_picture[type=file]'), handler: profilePictureChangeHandler },
|
||||||
{ type: 'change', target: document.querySelector('#user_profile_header[type=file]'), handler: profileHeaderChangeHandler },
|
{ type: 'change', target: document.querySelector('#user_profile_header[type=file]'), handler: profileHeaderChangeHandler },
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
- if current_user.theme
|
- if current_user.theme
|
||||||
.pull-right
|
.pull-right
|
||||||
= button_to t(".delete"), settings_theme_path, data: { confirm: t("voc.confirm") }, tabindex: -1, method: :delete, class: "btn btn-danger"
|
= 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
|
||||||
.card-body
|
.card-body
|
||||||
%h2= t(".general.heading")
|
%h2= t(".general.heading")
|
||||||
|
|
Loading…
Reference in New Issue