Skip to content
Snippets Groups Projects
Commit bf7cddbd authored by Harumi Jang's avatar Harumi Jang
Browse files

Add todo and change prefix line to remove dummy field name

parent 27f52708
No related branches found
No related tags found
No related merge requests found
...@@ -138,6 +138,7 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -138,6 +138,7 @@ public function form(array $form, FormStateInterface $form_state) {
$field_storage = $this->entity->getFieldStorageDefinition(); $field_storage = $this->entity->getFieldStorageDefinition();
$bundles = $this->entityTypeBundleInfo->getBundleInfo($this->entity->getTargetEntityTypeId()); $bundles = $this->entityTypeBundleInfo->getBundleInfo($this->entity->getTargetEntityTypeId());
// @todo Change this.
$form_title = $this->t('Field settings for %bundle', [ $form_title = $this->t('Field settings for %bundle', [
'%bundle' => $bundles[$this->entity->getTargetBundle()]['label'], '%bundle' => $bundles[$this->entity->getTargetBundle()]['label'],
]); ]);
...@@ -145,7 +146,7 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -145,7 +146,7 @@ public function form(array $form, FormStateInterface $form_state) {
if ($field_storage->isLocked()) { if ($field_storage->isLocked()) {
$form['locked'] = [ $form['locked'] = [
'#markup' => $this->t('The field is locked and cannot be edited.') '#markup' => $this->t('The field is locked and cannot be edited.'),
]; ];
return $form; return $form;
} }
...@@ -413,7 +414,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { ...@@ -413,7 +414,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
'label' => $values['label'], 'label' => $values['label'],
// Field translatability should be explicitly enabled by the users. // Field translatability should be explicitly enabled by the users.
'translatable' => FALSE, 'translatable' => FALSE,
'entity_type' => $this->entity->getTargetEntityTypeId(), 'entity_type' => $this->entity->getTargetEntityTypeId(),
'bundle' => $this->entity->getTargetBundle(), 'bundle' => $this->entity->getTargetBundle(),
]; ];
$field_storage_values = [ $field_storage_values = [
......
...@@ -91,7 +91,7 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -91,7 +91,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state); $form = parent::form($form, $form_state);
$field_label = $form_state->get('field_config')->label(); $field_label = $form_state->get('field_config')->label();
$form['#prefix'] = '<p>' . $this->t('These settings apply to the %field field everywhere it is used. Some also impact the way that data is stored and cannot be changed once data has been created.', ['%field' => $field_label]) . '</p>'; $form['#prefix'] = '<p>' . $this->t('These settings apply to this field everywhere it is used. Some also impact the way that data is stored and cannot be changed once data has been created.') . '</p>';
// Add settings provided by the field module. The field module is // Add settings provided by the field module. The field module is
// responsible for not returning settings that cannot be changed if // responsible for not returning settings that cannot be changed if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment