kopia lustrzana https://github.com/wagtail/wagtail
Fix read_only panels for fields with translatable choice labels
rodzic
1c12d96457
commit
e7bb3e9d22
|
@ -22,6 +22,7 @@ Changelog
|
|||
|
||||
* Introduce `wagtail.admin.ui.tables.BooleanColumn` to display boolean values as icons (Sage Abdullah)
|
||||
* Fix: Show not-`None` falsy values instead of blank in generic table cell template (Sage Abdullah)
|
||||
* Fix: Fix `read_only` panels for fields with translatable choice labels (Florent Lebreton)
|
||||
|
||||
|
||||
5.1 (01.08.2023)
|
||||
|
|
|
@ -722,6 +722,7 @@
|
|||
* Henry Harutyunyan
|
||||
* Alex Morega
|
||||
* Scott Foster
|
||||
* Florent Lebreton
|
||||
|
||||
## Translators
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ depth: 1
|
|||
### Bug fixes
|
||||
|
||||
* Show not-`None` falsy values instead of blank in generic table cell template (Sage Abdullah)
|
||||
* Fix `read_only` panels for fields with translatable choice labels (Florent Lebreton)
|
||||
|
||||
### Documentation
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ class FieldPanel(Panel):
|
|||
if not isinstance(choices, ModelChoiceIterator) and choices:
|
||||
labels = dict(choices)
|
||||
display_values = [
|
||||
labels.get(v, v) # Use raw value if no match found
|
||||
str(labels.get(v, v)) # Use raw value if no match found
|
||||
for v in (
|
||||
# Account for single AND multiple choice fields
|
||||
tuple(value)
|
||||
|
|
|
@ -81,8 +81,8 @@ from wagtail.snippets.models import register_snippet
|
|||
from .forms import FormClassAdditionalFieldPageForm, ValidatedPageForm
|
||||
|
||||
EVENT_AUDIENCE_CHOICES = (
|
||||
("public", "Public"),
|
||||
("private", "Private"),
|
||||
("public", _("Public")),
|
||||
("private", _("Private")),
|
||||
)
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue