diff --git a/lib/philomena_web/templates/image/_source.html.slime b/lib/philomena_web/templates/image/_source.html.slime index 7262d2e1..87b09772 100644 --- a/lib/philomena_web/templates/image/_source.html.slime +++ b/lib/philomena_web/templates/image/_source.html.slime @@ -1,5 +1,5 @@ .block - = form_for @changeset, Routes.image_source_path(@conn, :update, @image), [method: "put", class: "hidden", id: "source-form", data: [remote: true]], fn f -> + = form_for @changeset, Routes.image_source_path(@conn, :update, @image), [method: "put", class: "hidden", id: "source-form", data: [remote: "true"]], fn f -> = if can?(@conn, :edit_metadata, @image) and !@conn.assigns.current_ban do = if @changeset.action do diff --git a/lib/philomena_web/templates/image/_tags.html.slime b/lib/philomena_web/templates/image/_tags.html.slime index ed586fd9..d887964e 100644 --- a/lib/philomena_web/templates/image/_tags.html.slime +++ b/lib/philomena_web/templates/image/_tags.html.slime @@ -12,7 +12,7 @@ ' The following tags have been restricted on this image: code= Enum.map_join(@image.locked_tags, ", ", & &1.name) - = form_for @changeset, Routes.image_tag_path(@conn, :update, @image), [id: "tags-form", method: "put", data: [remote: true]], fn f -> + = form_for @changeset, Routes.image_tag_path(@conn, :update, @image), [id: "tags-form", method: "put", data: [remote: "true"]], fn f -> = if @changeset.action do .alert.alert-danger p Oops, something went wrong! Please check the errors below. diff --git a/lib/philomena_web/templates/image/description/_form.html.slime b/lib/philomena_web/templates/image/description/_form.html.slime index 68bf5212..6b4c4543 100644 --- a/lib/philomena_web/templates/image/description/_form.html.slime +++ b/lib/philomena_web/templates/image/description/_form.html.slime @@ -1,4 +1,4 @@ -= form_for @changeset, Routes.image_description_path(@conn, :update, @image), [class: "block hidden", id: "description-form", data: [remote: true]], fn f -> += form_for @changeset, Routes.image_description_path(@conn, :update, @image), [class: "block hidden", id: "description-form", data: [remote: "true"]], fn f -> = if @changeset.action do .alert.alert-danger p Oops, something went wrong! Please check the errors below. diff --git a/lib/philomena_web/templates/profile/commission/_listing_items.html.slime b/lib/philomena_web/templates/profile/commission/_listing_items.html.slime index 640ae10b..b57a80b1 100644 --- a/lib/philomena_web/templates/profile/commission/_listing_items.html.slime +++ b/lib/philomena_web/templates/profile/commission/_listing_items.html.slime @@ -55,4 +55,4 @@ = link "Edit item", to: Routes.profile_commission_item_path(@conn, :edit, @user, item) br br - = link "Delete item", to: Routes.profile_commission_item_path(@conn, :delete, @user, item), data: [confirm: "Are you really, really sure?", method: :delete] + = link "Delete item", to: Routes.profile_commission_item_path(@conn, :delete, @user, item), data: [confirm: "Are you really, really sure?", method: "delete"] diff --git a/lib/philomena_web/templates/profile/commission/_listing_sidebar.html.slime b/lib/philomena_web/templates/profile/commission/_listing_sidebar.html.slime index 51474803..ec68f27e 100644 --- a/lib/philomena_web/templates/profile/commission/_listing_sidebar.html.slime +++ b/lib/philomena_web/templates/profile/commission/_listing_sidebar.html.slime @@ -73,7 +73,7 @@ = if can?(@conn, :edit, @commission) do = link "Edit this listing", to: Routes.profile_commission_path(@conn, :edit, @user) br - = link "Delete this listing", to: Routes.profile_commission_path(@conn, :delete, @user), data: [confirm: "Are you really, really sure about that?", method: :delete] + = link "Delete this listing", to: Routes.profile_commission_path(@conn, :delete, @user), data: [confirm: "Are you really, really sure about that?", method: "delete"] br = link "Report this listing", to: Routes.profile_commission_report_path(@conn, :new, @user) diff --git a/lib/philomena_web/views/layout_view.ex b/lib/philomena_web/views/layout_view.ex index c7d600c1..a3d711ba 100644 --- a/lib/philomena_web/views/layout_view.ex +++ b/lib/philomena_web/views/layout_view.ex @@ -44,12 +44,12 @@ defmodule PhilomenaWeb.LayoutView do user_id: if(user, do: user.id, else: nil), user_name: if(user, do: user.name, else: nil), user_slug: if(user, do: user.slug, else: nil), - user_is_signed_in: !!user, - user_can_edit_filter: if(user, do: filter.user_id == user.id, else: false), + user_is_signed_in: if(user, do: "true", else: "false"), + user_can_edit_filter: if(user, do: filter.user_id == user.id, else: "false"), spoiler_type: if(user, do: user.spoiler_type, else: "static"), watched_tag_list: Jason.encode!(if(user, do: user.watched_tag_ids, else: [])), - fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: true), - fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: true), + fancy_tag_edit: if(user, do: user.fancy_tag_field_on_edit, else: "true"), + fancy_tag_upload: if(user, do: user.fancy_tag_field_on_upload, else: "true"), interactions: Jason.encode!(interactions), ignored_tag_list: Jason.encode!(ignored_tag_list(conn.assigns[:tags])), hide_staff_tools: conn.cookies["hide_staff_tools"]