mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 01:22:07 +01:00
Do not use FieldRowPanel for scheduled publishing fields
To prevent inconsistent layout if only one of the fields has an error
This commit is contained in:
parent
876b0e0f19
commit
994698d76c
@ -1,10 +1,5 @@
|
|||||||
// Styles for the fields in the scheduled publishing dialog
|
// Styles for the fields in the scheduled publishing dialog
|
||||||
.w-dialog.publishing {
|
.w-dialog.publishing {
|
||||||
.w-panel__wrapper {
|
|
||||||
margin-top: theme('spacing.2');
|
|
||||||
margin-bottom: theme('spacing.2');
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-field--date_time_field input {
|
.w-field--date_time_field input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ from wagtail.admin.widgets.datetime import AdminDateTimeInput
|
|||||||
from wagtail.models import Page
|
from wagtail.models import Page
|
||||||
|
|
||||||
from .field_panel import FieldPanel
|
from .field_panel import FieldPanel
|
||||||
from .group import FieldRowPanel, MultiFieldPanel
|
from .group import MultiFieldPanel
|
||||||
|
|
||||||
|
|
||||||
# This allows users to include the publishing panel in their own per-model override
|
# This allows users to include the publishing panel in their own per-model override
|
||||||
@ -16,21 +16,17 @@ class PublishingPanel(MultiFieldPanel):
|
|||||||
js_overlay_parent_selector = "#schedule-publishing-dialog"
|
js_overlay_parent_selector = "#schedule-publishing-dialog"
|
||||||
updated_kwargs = {
|
updated_kwargs = {
|
||||||
"children": [
|
"children": [
|
||||||
FieldRowPanel(
|
FieldPanel(
|
||||||
[
|
"go_live_at",
|
||||||
FieldPanel(
|
widget=AdminDateTimeInput(
|
||||||
"go_live_at",
|
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||||
widget=AdminDateTimeInput(
|
),
|
||||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
),
|
||||||
),
|
FieldPanel(
|
||||||
),
|
"expire_at",
|
||||||
FieldPanel(
|
widget=AdminDateTimeInput(
|
||||||
"expire_at",
|
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||||
widget=AdminDateTimeInput(
|
),
|
||||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
"classname": "publishing",
|
"classname": "publishing",
|
||||||
|
Loading…
Reference in New Issue
Block a user