Skip to content
Snippets Groups Projects
Commit 57738ab8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2119997 by Sharique, ursula, vijaycs85, dimaro, quietone, dawehner,...

Issue #2119997 by Sharique, ursula, vijaycs85, dimaro, quietone, dawehner, mpdonadio, Bojhan: Change UI to remove display machine name for date formats
parent 93cb20d6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -59,7 +59,6 @@ public static function createInstance(ContainerInterface $container, EntityTypeI
* {@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 @@ public function buildHeader() {
* {@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 @@ public function testDateLocking() {
$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 @@ function testDateFormatConfiguration() {
$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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment