It seems there's no way in the D8 version of this module to change the label of the 'Title' field for a bundle, like there was in Drupal 7 (see #1597348: Custom label for title). Or maybe I'm just missing it?

Comments

geerlingguy created an issue. See original summary.

geerlingguy’s picture

lahoosascoots’s picture

Category: Support request » Feature request
StatusFileSize
new3.91 KB

This should do it. I'm not 100% sure why "title" was being unset for overrides in eck_entity_bundle_field_info_alter, but I got rid of it to make this patch to work. Hopefully the maintainers have some input here.

May just need a little bit of cleanup and some tests.

geerlingguy’s picture

Status: Active » Needs review
legolasbo’s picture

Issue tags: +Needs tests

The code looks good to me besides the comment below. However I would like to see tests for this functionality.

+++ b/src/Form/EntityBundle/EckEntityBundleForm.php
@@ -90,6 +101,27 @@ class EckEntityBundleForm extends EntityForm {
+        $title = $field === 'uid' ? 'author' : $field;

Doesn't the field definition have a label we can use for this?

legolasbo’s picture

Status: Needs review » Needs work

Forgot to set to needs work.

lahoosascoots’s picture

Status: Needs work » Needs review
StatusFileSize
new3.97 KB

Fixed the issue brought up about the field labels. Note that I stole that original code from EckEntityTypeFormBase if you want to update it there too.

Still needs tests.

lahoosascoots’s picture

Status: Needs review » Needs work
manuel.adan’s picture

Changes:

  • Ported to the latest -dev
  • Empty value means that the default label should be used
  • No label overriding fieldset in entity type form If no base field present in the entity type
  • Some CS in affected files fixed

Note that to translate the overridden labels via UI the core bug #2869124: Base field overrides cannot be translated which renders some entity form labels untranslatable must be fixed.

Waiting for some feedback before adding tests.

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed f0b696d on 8.x-1.x authored by manuel.adan
    Issue #2839979 by lahoosascoots, manuel.adan, geerlingguy, pifagor,...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.