From 57738ab822a7655434f49edb86724784a36e2b4d Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 30 Jul 2015 15:07:09 +0100 Subject: [PATCH] Issue #2119997 by Sharique, ursula, vijaycs85, dimaro, quietone, dawehner, mpdonadio, Bojhan: Change UI to remove display machine name for date formats --- core/modules/system/src/DateFormatListBuilder.php | 7 ------- .../system/src/Tests/System/DateFormatsLockedTest.php | 2 +- core/modules/system/src/Tests/System/DateTimeTest.php | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/core/modules/system/src/DateFormatListBuilder.php b/core/modules/system/src/DateFormatListBuilder.php index ba7511bcfbf..29b201cd63e 100644 --- a/core/modules/system/src/DateFormatListBuilder.php +++ b/core/modules/system/src/DateFormatListBuilder.php @@ -59,7 +59,6 @@ class DateFormatListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildHeader() { - $header['id'] = t('Machine name'); $header['label'] = t('Name'); $header['pattern'] = t('Pattern'); return $header + parent::buildHeader(); @@ -69,12 +68,6 @@ class DateFormatListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildRow(EntityInterface $entity) { - if ($entity->isLocked()) { - $row['id'] = $this->t('@entity_id (locked)', array('@entity_id' => $entity->id())); - } - else { - $row['id'] = $entity->id(); - } $row['label'] = $this->getLabel($entity); $row['pattern'] = $this->dateFormatter->format(REQUEST_TIME, $entity->id()); return $row + parent::buildRow($entity); diff --git a/core/modules/system/src/Tests/System/DateFormatsLockedTest.php b/core/modules/system/src/Tests/System/DateFormatsLockedTest.php index 13b70625ff2..fbe069024bc 100644 --- a/core/modules/system/src/Tests/System/DateFormatsLockedTest.php +++ b/core/modules/system/src/Tests/System/DateFormatsLockedTest.php @@ -28,7 +28,7 @@ class DateFormatsLockedTest extends WebTestBase { $this->drupalGet('admin/config/regional/date-time'); $this->assertLinkByHref('admin/config/regional/date-time/formats/manage/short'); $this->assertNoLinkByHref('admin/config/regional/date-time/formats/manage/html_date'); - $this->assertText('fallback (locked)'); + $this->assertText('Fallback date format'); $this->assertNoText('short (locked)'); // Locked date formats are not editable. diff --git a/core/modules/system/src/Tests/System/DateTimeTest.php b/core/modules/system/src/Tests/System/DateTimeTest.php index 9f0b0ac750f..88868e99552 100644 --- a/core/modules/system/src/Tests/System/DateTimeTest.php +++ b/core/modules/system/src/Tests/System/DateTimeTest.php @@ -88,7 +88,7 @@ class DateTimeTest extends WebTestBase { $this->drupalPostForm('admin/config/regional/date-time/formats/add', $edit, t('Add format')); $this->assertUrl(\Drupal::url('entity.date_format.collection', [], ['absolute' => TRUE]), [], 'Correct page redirection.'); $this->assertText(t('Custom date format added.'), 'Date format added confirmation message appears.'); - $this->assertText($date_format_id, 'Custom date format appears in the date format list.'); + $this->assertText($name, 'Custom date format appears in the date format list.'); $this->assertText(t('Delete'), 'Delete link for custom date format appears.'); // Edit the custom date format and re-save without editing the format.