Skip to content

Commit

Permalink
Merge branch '2.3' of ezsystems/ezplatform-admin-ui into 4.5 (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Mar 28, 2024
2 parents dbbf868 + 2dde025 commit 44388a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/bundle/Resources/public/js/scripts/fieldType/ezimageasset.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@
return field.fieldDefinitionIdentifier === imageAssetMapping['contentFieldIdentifier'];
});

if (imageField.fieldValue === null) {
showErrorNotification(
Translator.trans(
/* @Desc("The chosen asset has no image data available.") */ 'ezimageasset.empty_data.message.error',
{},
'fieldtypes_edit',
),
);

return;
}

this.updateData(
response.ContentInfo.Content._id,
response.ContentInfo.Content.TranslatedName,
Expand Down
5 changes: 5 additions & 0 deletions src/bundle/Resources/translations/fieldtypes_edit.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<target state="new">The image has been published and can now be reused</target>
<note>key: ezimageasset.create.message.success</note>
</trans-unit>
<trans-unit id="75c1175bca5f2a2334ffe321afdaedf7fa6887bd" resname="ezimageasset.empty_data.message.error">
<source>The chosen asset has no image data available.</source>
<target state="new">The chosen asset has no image data available.</target>
<note>key: ezimageasset.empty_data.message.error</note>
</trans-unit>
<trans-unit id="d10ad93186c93b5a79a7aa921eb874b7df716935" resname="ezmaplocation.create.message.error">
<source>Area below needs correction</source>
<target state="new">Area below needs correction</target>
Expand Down

0 comments on commit 44388a7

Please sign in to comment.