Skip to content

Commit 7b9f5ac

Browse files
committed
Hide model description field take #2
Signed-off-by: Arnaud J Le Hors <[email protected]>
1 parent 0370003 commit 7b9f5ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/modules/mof/src/Entity/Model.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type): a
355355
'label' => 'above',
356356
'weight' => -90,
357357
])
358-
// The description field is not currently saved in the YAML model file so we may as well hide it away
359-
// until we decide whether to just get rid of it altogether or add it to the YAML file.
360-
->setDisplayOptions('view', ['region' => 'hidden'])
361-
->setDisplayOptions('form', ['region' => 'hidden'])
362358
->setDisplayConfigurable('view', TRUE)
363359
->setRequired(FALSE);
364360

web/modules/mof/src/Form/ModelForm.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ public function form(array $form, FormStateInterface $form_state): array {
118118
}
119119
}
120120

121+
// The description field is not currently saved in the YAML model file so we may as well hide it away
122+
// until we decide whether to just get rid of it altogether or add it to the YAML file.
123+
$form['details']['description']['#access'] = FALSE;
124+
121125
// Model licenses to populate fields with a default value.
122126
$model_licenses = $this->entity->getLicenses() ?? [];
123127
$model_components = $this->entity->getComponents() ?? [];

0 commit comments

Comments
 (0)