mirror of
https://github.com/jbcr/core.git
synced 2026-03-31 05:12:11 +02:00
Image 'alt' attribute is there by default.
This commit is contained in:
@@ -232,7 +232,8 @@ export default {
|
||||
this.previewImage = null;
|
||||
this.filenameData = '';
|
||||
this.thumbnailData = '';
|
||||
this.altData = '';
|
||||
// only reset altData if alt should be displayed.
|
||||
if (this.altData !== undefined) this.altData = '';
|
||||
this.$emit('remove', this);
|
||||
},
|
||||
selectUploadFile() {
|
||||
|
||||
@@ -103,6 +103,10 @@ class ImageField extends Field implements FieldInterface, MediaAwareInterface
|
||||
|
||||
public function includeAlt(): bool
|
||||
{
|
||||
return $this->getDefinition()->has('alt') && $this->getDefinition()->get('alt') === true;
|
||||
if (! $this->getDefinition()->has('alt')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->getDefinition()->get('alt') === true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user