Skip to content

Added flag to display a single model error for MediaLibraryPickerField#8700

Merged
MatteoPiovanelli merged 2 commits into
OrchardCMS:devfrom
LaserSrl:8699_localized_mplf_modelerror
Jun 30, 2023
Merged

Added flag to display a single model error for MediaLibraryPickerField#8700
MatteoPiovanelli merged 2 commits into
OrchardCMS:devfrom
LaserSrl:8699_localized_mplf_modelerror

Conversation

@AndreaPiovanelli

Copy link
Copy Markdown
Contributor

Added flag to display a single model error by LocalizationExtensionHandler if media have been removed from the field only. This ensures that no duplicate model error has displayed.

The flag is true when the field is set to remove items without localization and one or more media items cannot be localized.
Afterwards, to display a model error, this flag is checked in combination with the previously implemented checks (if field is required and any media item is selected).

…media have been removed from the field only. This ensures that no duplicate model error has displayed.
@AndreaPiovanelli

Copy link
Copy Markdown
Contributor Author

Hi @sebastienros
Any comment on this pr? Can we merge it?

mediaItem.As<MediaPart>().FileName));
}
else {
} else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: that's not how it should be formatted, it was fine on a separate line

@MatteoPiovanelli
MatteoPiovanelli merged commit 0b001c7 into OrchardCMS:dev Jun 30, 2023
@MatteoPiovanelli
MatteoPiovanelli deleted the 8699_localized_mplf_modelerror branch June 30, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants