Skip to content

Commit

Permalink
[4.0] Media Action plugins (#29970)
Browse files Browse the repository at this point in the history
* [4.0] Media Action plugins

This PR does the following

1. removes unused strings
2. changes labelclass="d-none" to hiddenLabel in the xml
3. adds missing labels (even if they are not visible)

ToDo in a later PR change the radio buttons in rotate to real buttons in a button group. The current code breaks accessibility but thats for another PR

* xml
  • Loading branch information
brianteeman authored Jul 4, 2020
1 parent 6b4c059 commit 8d6d02d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_media-action_crop.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

PLG_MEDIA-ACTION_CROP="Media Action - Crop"
PLG_MEDIA-ACTION_CROP_LABEL="Crop"
PLG_MEDIA-ACTION_CROP_PARAM_ASPECT="Aspect Ratio"
PLG_MEDIA-ACTION_CROP_PARAM_DEFAULT_RATIO="Default aspect ratio"
PLG_MEDIA-ACTION_CROP_PARAM_HEIGHT="Height"
PLG_MEDIA-ACTION_CROP_PARAM_LANDSCAPE="Landscape"
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/plg_media-action_resize.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
PLG_MEDIA-ACTION_RESIZE="Media Action - Resize"
PLG_MEDIA-ACTION_RESIZE_BATCH_DESC="Settings for server side actions when images are created."
PLG_MEDIA-ACTION_RESIZE_BATCH_LABEL="Batch Settings"
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_DESC="The maximum height of an image to resize. When empty, no resizing is performed."
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_LABEL="Image Max Height"
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_DESC="The maximum width of an image to resize. When empty, no resizing is performed."
PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_LABEL="Image Max Width"
PLG_MEDIA-ACTION_RESIZE_LABEL="Resize"
PLG_MEDIA-ACTION_RESIZE_PARAM_HEIGHT="Height"
PLG_MEDIA-ACTION_RESIZE_PARAM_HEIGHT_SLIDER="Height Slider"
PLG_MEDIA-ACTION_RESIZE_PARAM_WIDTH="Width"
PLG_MEDIA-ACTION_RESIZE_PARAM_WIDTH_SLIDER="Width Slider"
PLG_MEDIA-ACTION_RESIZE_QUALITY="Quality"
PLG_MEDIA-ACTION_RESIZE_XML_DESCRIPTION="Resize functionality for images."
4 changes: 1 addition & 3 deletions administrator/language/en-GB/plg_media-action_rotate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PLG_MEDIA-ACTION_ROTATE="Media Action - Rotate"
PLG_MEDIA-ACTION_ROTATE_LABEL="Rotate"
PLG_MEDIA-ACTION_ROTATE_PARAM_ANGLE="Angle"
PLG_MEDIA-ACTION_ROTATE_PARAM_DIRECTION="Direction"
PLG_MEDIA-ACTION_ROTATE_PARAM_DIRECTION_LEFT="Left"
PLG_MEDIA-ACTION_ROTATE_PARAM_DIRECTION_RIGHT="Right"
PLG_MEDIA-ACTION_ROTATE_PARAM_BUTTONS="Angle Buttons"
PLG_MEDIA-ACTION_ROTATE_QUALITY="Quality"
PLG_MEDIA-ACTION_ROTATE_XML_DESCRIPTION="Adds rotate functionality for images."
1 change: 1 addition & 0 deletions plugins/media-action/crop/form/crop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<field
name="aspectRatio"
type="groupedlist"
label="PLG_MEDIA-ACTION_CROP_PARAM_ASPECT"
hiddenLabel="true"
class="crop-aspect-ratio-options"
default="1.111"
Expand Down
8 changes: 4 additions & 4 deletions plugins/media-action/resize/form/resize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<field
name="resize_w"
type="range"
label=""
label="PLG_MEDIA-ACTION_RESIZE_PARAM_WIDTH_SLIDER"
value="0"
labelclass="d-none"
hiddenLabel="true"
/>

<field
Expand All @@ -53,9 +53,9 @@
<field
name="resize_h"
type="range"
label=""
label="PLG_MEDIA-ACTION_RESIZE_PARAM_HEIGHT_SLIDER"
value="0"
labelclass="d-none"
hiddenLabel="true"
/>
</fieldset>
</form>
4 changes: 1 addition & 3 deletions plugins/media-action/resize/resize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</languages>
<config>
<fields name="params">
<fieldset
<fieldset
name="batch"
label="PLG_MEDIA-ACTION_RESIZE_BATCH_LABEL"
description="PLG_MEDIA-ACTION_RESIZE_BATCH_DESC"
Expand All @@ -29,15 +29,13 @@
name="batch_width"
type="text"
label="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_LABEL"
descripton="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_WIDTH_DESC"
addonAfter="px"
filter="integer"
/>
<field
name="batch_height"
type="text"
label="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_LABEL"
descripton="PLG_MEDIA-ACTION_RESIZE_BATCH_MAX_HEIGHT_DESC"
addonAfter="px"
filter="integer"
/>
Expand Down
4 changes: 2 additions & 2 deletions plugins/media-action/rotate/form/rotate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<field
name="rotate_distinct"
type="radio"
hiddenLabel="true"
class="btn-group btn-group-rotate"
label="PLG_MEDIA-ACTION_ROTATE_PARAM_BUTTONS"
class="btn-group"
default=""
>
<option value="0">0</option>
Expand Down

0 comments on commit 8d6d02d

Please sign in to comment.