mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-25 05:02:57 +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
|
||||
.w-dialog.publishing {
|
||||
.w-panel__wrapper {
|
||||
margin-top: theme('spacing.2');
|
||||
margin-bottom: theme('spacing.2');
|
||||
}
|
||||
|
||||
.w-field--date_time_field input {
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ from wagtail.admin.widgets.datetime import AdminDateTimeInput
|
||||
from wagtail.models import Page
|
||||
|
||||
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
|
||||
@ -16,21 +16,17 @@ class PublishingPanel(MultiFieldPanel):
|
||||
js_overlay_parent_selector = "#schedule-publishing-dialog"
|
||||
updated_kwargs = {
|
||||
"children": [
|
||||
FieldRowPanel(
|
||||
[
|
||||
FieldPanel(
|
||||
"go_live_at",
|
||||
widget=AdminDateTimeInput(
|
||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||
),
|
||||
),
|
||||
FieldPanel(
|
||||
"expire_at",
|
||||
widget=AdminDateTimeInput(
|
||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||
),
|
||||
),
|
||||
],
|
||||
FieldPanel(
|
||||
"go_live_at",
|
||||
widget=AdminDateTimeInput(
|
||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||
),
|
||||
),
|
||||
FieldPanel(
|
||||
"expire_at",
|
||||
widget=AdminDateTimeInput(
|
||||
js_overlay_parent_selector=js_overlay_parent_selector,
|
||||
),
|
||||
),
|
||||
],
|
||||
"classname": "publishing",
|
||||
|
Loading…
Reference in New Issue
Block a user