Skip to content

Commit ff78be4

Browse files
committed
Move over widht and height attributes to the cropping tab, and rename to Dimensions
1 parent d2fec4e commit ff78be4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

djangocms_frontend/contrib/image/cms_plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ class ImagePlugin(
6565
"classes": ("collapse",),
6666
"fields": (
6767
"use_responsive_image",
68-
("width", "height"),
6968
"alignment",
7069
),
7170
},
7271
),
7372
(
74-
_("Cropping"),
73+
_("Dimensions"),
7574
{
7675
"classes": ("collapse",),
7776
"fields": (
77+
("width", "height"),
7878
("use_crop", "use_upscale"),
7979
"thumbnail_options",
8080
),

djangocms_frontend/contrib/image/forms.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,19 @@ class Meta:
118118
label=_("Width"),
119119
required=False,
120120
min_value=1,
121-
help_text=_('The image width as number in pixels. Example: "720" and not "720px".'),
121+
help_text=_(
122+
'The image width as number in pixels (eg, "720" and not "720px"). '
123+
),
122124
)
123125
height = forms.IntegerField(
124126
label=_("Height"),
125127
required=False,
126128
min_value=1,
127-
help_text=_('The image height as number in pixels. Example: "720" and not "720px".'),
129+
help_text=_(
130+
'The image height as number in pixels (eg, "720" and not "720px"). '
131+
"Note: if width is set, height will be calculated automatically to preserve aspect ratio. "
132+
"In case of cropping, then both width and height are applied as given."
133+
),
128134
)
129135
alignment = forms.ChoiceField(
130136
label=_("Alignment"),

0 commit comments

Comments
 (0)