Merged 9.2.13.
commit
14259fd34f
|
@ -1218,7 +1218,7 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
|
|||
// #access=FALSE on an element usually allow access for some users, so forms
|
||||
// submitted with self::submitForm() may bypass access restriction and be
|
||||
// treated as high-privilege users instead.
|
||||
$process_input = empty($element['#disabled']) && (($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) || ($form_state->isProcessingInput() && (!isset($element['#access']) || $element['#access'])));
|
||||
$process_input = empty($element['#disabled']) && ($element['#type'] !== 'value') && (($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) || ($form_state->isProcessingInput() && (!isset($element['#access']) || $element['#access'])));
|
||||
|
||||
// Set the element's #value property.
|
||||
if (!isset($element['#value']) && !array_key_exists('#value', $element)) {
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Drupal\quickedit;
|
|||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Core\Field\FieldItemListInterface;
|
||||
use Drupal\Core\StringTranslation\TranslatableMarkup;
|
||||
use Drupal\quickedit\Access\QuickEditEntityFieldAccessCheckInterface;
|
||||
use Drupal\Core\Entity\Entity\EntityViewDisplay;
|
||||
|
||||
|
@ -55,7 +56,10 @@ class MetadataGenerator implements MetadataGeneratorInterface {
|
|||
*/
|
||||
public function generateEntityMetadata(EntityInterface $entity) {
|
||||
return [
|
||||
'label' => $entity->label(),
|
||||
'label' => $entity->access('view label') ? $entity->label() : new TranslatableMarkup('@label @id', [
|
||||
'@label' => $entity->getEntityType()->getSingularLabel(),
|
||||
'@id' => $entity->id()
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue