Issue #2119997 by Sharique, ursula, vijaycs85, dimaro, quietone, dawehner, mpdonadio, Bojhan: Change UI to remove display machine name for date formats
parent
93cb20d61d
commit
57738ab822
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue