Skip to content

Commit

Permalink
There is no need to override the form_action block, as it's already d…
Browse files Browse the repository at this point in the history
…oing what we want.

Quite the opposite: Adding the locale parameter to the URL at this point will result in a malformed URL, which causes a defect of the Create View.
  • Loading branch information
benmth committed May 27, 2022
1 parent 23d0bb7 commit af80179
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{% extends "modeladmin/create.html" %}

{% block header %}
{% include "wagtailadmin/shared/header_with_locale_selector.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon tabbed=1 merged=1 %}
{% include "wagtailadmin/shared/header_with_locale_selector.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon tabbed=1 merged=1 %}
{% endblock %}

{% block form_action %}{{ view.create_url }}?locale={{ locale.language_code }}{% endblock %}

0 comments on commit af80179

Please sign in to comment.