Commit 27af4de9 authored by bojanz's avatar bojanz

Issue #2708481 by bojanz: Hide/disable "Revision log"

parent a2b2e670
......@@ -2,6 +2,7 @@
namespace Drupal\inline_entity_form\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
/**
......@@ -44,4 +45,16 @@ class NodeInlineForm extends EntityInlineForm {
return $fields;
}
/**
* {@inheritdoc}
*/
public function entityForm(array $entity_form, FormStateInterface $form_state) {
$entity_form = parent::entityForm($entity_form, $form_state);
// Remove the "Revision log" textarea, it can't be disabled in the
// form display and doesn't make sense in the inline form context.
$entity_form['revision_log']['#access'] = FALSE;
return $entity_form;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment