kopia lustrzana https://github.com/wagtail/wagtail
Tiny cleanup for site root page chooser (#7407)
* Pulling in _editor_js.html is unnecessary - the only JS dependency that isn't in form media is now modal_workflow.js. (So close to being able to ditch the template override entirely!) * Omit the 'clear' button, as this is a required field.pull/7413/head
rodzic
ae14c8c718
commit
07402a545a
|
@ -11,6 +11,7 @@ Changelog
|
|||
* Fix: Delete button is now correct colour on snippets and modeladmin listings (Brandon Murch)
|
||||
* Fix: Ensure that StreamBlock / ListBlock-level validation errors are counted towards error counts (Matt Westcott)
|
||||
* Fix: InlinePanel add button is now keyboard navigatable (Jesse Menn)
|
||||
* Fix: Remove redundant 'clear' button from site root page chooser (Matt Westcott)
|
||||
|
||||
|
||||
2.14 (02.08.2021)
|
||||
|
|
|
@ -26,6 +26,7 @@ Bug fixes
|
|||
* Delete button is now correct colour on snippets and modeladmin listings (Brandon Murch)
|
||||
* Ensure that StreamBlock / ListBlock-level validation errors are counted towards error counts (Matt Westcott)
|
||||
* InlinePanel add button is now keyboard navigatable (Jesse Menn)
|
||||
* Remove redundant 'clear' button from site root page chooser (Matt Westcott)
|
||||
|
||||
Upgrade considerations
|
||||
======================
|
||||
|
|
|
@ -9,7 +9,8 @@ class SiteForm(forms.ModelForm):
|
|||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['root_page'].widget = AdminPageChooser(
|
||||
choose_one_text=_('Choose a root page'), choose_another_text=_('Choose a different root page')
|
||||
choose_one_text=_('Choose a root page'), choose_another_text=_('Choose a different root page'),
|
||||
show_clear_link=False
|
||||
)
|
||||
|
||||
required_css_class = "required"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "wagtailadmin/generic/create.html" %}
|
||||
{% load wagtailadmin_tags %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
{% include "wagtailadmin/pages/_editor_js.html" %}
|
||||
<script src="{% versioned_static 'wagtailadmin/js/modal-workflow.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "wagtailadmin/generic/edit.html" %}
|
||||
{% load wagtailadmin_tags %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
{% include "wagtailadmin/pages/_editor_js.html" %}
|
||||
<script src="{% versioned_static 'wagtailadmin/js/modal-workflow.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
|
Ładowanie…
Reference in New Issue