-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplicate locale defintion in TranslatableCreateView template (#580)
* For Wagtail versions below 3.0, the locale must be added at this point. * Extended "test_create_view" to also ensure a forrect form action URL Co-authored-by: benmth <b@omegabyte.lu>
- Loading branch information
b
and
benmth
authored
Jun 5, 2022
1 parent
5168e76
commit f2e5add
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/translatable_create.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{% 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 %} | ||
{% block form_action %}{{ view.create_url }}{% if wagtail_version < "3.0" %}?locale={{ locale.language_code }}{% endif %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters