diff --git a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/DateFormat.php b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/DateFormat.php index 18fcc2a..461a1d8 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/DateFormat.php +++ b/core/modules/system/lib/Drupal/system/Plugin/Core/Entity/DateFormat.php @@ -84,7 +84,7 @@ class DateFormat extends ConfigEntityBase implements DateFormatInterface { */ public function uri() { return array( - 'path' => 'admin/config/regional/date-time/formats/' . $this->id(), + 'path' => 'admin/config/regional/date-time/formats/manage/' . $this->id(), 'options' => array( 'entity_type' => $this->entityType, 'entity' => $this, diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLockedTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLockedTest.php index baf71ad..e10f106 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLockedTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/DateFormatsLockedTest.php @@ -33,19 +33,19 @@ public function testDateLocking() { // Locked date formats do not show on the listing page. $this->drupalGet('admin/config/regional/date-time'); - $this->assertLinkByHref('admin/config/regional/date-time/formats/short'); - $this->assertNoLinkByHref('admin/config/regional/date-time/formats/html_date'); + $this->assertLinkByHref('admin/config/regional/date-time/formats/manage/short'); + $this->assertNoLinkByHref('admin/config/regional/date-time/formats/manage/html_date'); // Locked date formats are not editable. - $this->drupalGet('admin/config/regional/date-time/formats/short'); + $this->drupalGet('admin/config/regional/date-time/formats/manage/short'); $this->assertResponse(200); - $this->drupalGet('admin/config/regional/date-time/formats/html_date'); + $this->drupalGet('admin/config/regional/date-time/formats/manage/html_date'); $this->assertResponse(403); // Locked date formats are not deletable. - $this->drupalGet('admin/config/regional/date-time/formats/short/delete'); + $this->drupalGet('admin/config/regional/date-time/formats/manage/short/delete'); $this->assertResponse(200); - $this->drupalGet('admin/config/regional/date-time/formats/html_date/delete'); + $this->drupalGet('admin/config/regional/date-time/formats/manage/html_date/delete'); $this->assertResponse(403); } diff --git a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php index 6028f46..b9752b4 100644 --- a/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/System/DateTimeTest.php @@ -108,7 +108,7 @@ function testDateFormatConfiguration() { // Delete custom date format. $this->clickLink(t('Delete')); - $this->drupalPost('admin/config/regional/date-time/formats/' . $date_format_id . '/delete', array(), t('Remove')); + $this->drupalPost('admin/config/regional/date-time/formats/manage/' . $date_format_id . '/delete', array(), t('Remove')); $this->assertEqual($this->getUrl(), url('admin/config/regional/date-time', array('absolute' => TRUE)), 'Correct page redirection.'); $this->assertText(t('Removed date format ' . $name), 'Custom date format removed.'); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index b90830f..756e266 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1919,6 +1919,20 @@ function system_update_8045() { $config->save(); } } + + // Install the new HTML date formats. + $new_formats = array( + 'system.date_format.html_date', + 'system.date_format.html_datetime', + 'system.date_format.html_month', + 'system.date_format.html_time', + 'system.date_format.html_week', + 'system.date_format.html_year', + 'system.date_format.html_yearless_date', + ); + foreach ($new_formats as $new_format) { + update_7_to_8_install_default_config('module', $new_format); + } } /** diff --git a/core/modules/system/system.module b/core/modules/system/system.module index e32baa6..2423945 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -876,12 +876,12 @@ function system_menu() { 'route_name' => 'date_format_add', 'weight' => -10, ); - $items['admin/config/regional/date-time/formats/%'] = array( + $items['admin/config/regional/date-time/formats/manage/%'] = array( 'title' => 'Edit date format', 'description' => 'Allow users to edit a configured date format.', 'route_name' => 'date_format_edit', ); - $items['admin/config/regional/date-time/formats/%/delete'] = array( + $items['admin/config/regional/date-time/formats/manage/%/delete'] = array( 'title' => 'Delete date format', 'description' => 'Allow users to delete a configured date format.', 'route_name' => 'date_format_delete', diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml index 652eb48..0883da0 100644 --- a/core/modules/system/system.routing.yml +++ b/core/modules/system/system.routing.yml @@ -94,17 +94,17 @@ date_format_add: defaults: _entity_form: 'date_format.add' requirements: - _entity_access: 'date_format.create' + _permission: 'administer site configuration' date_format_edit: - pattern: '/admin/config/regional/date-time/formats/{date_format}' + pattern: '/admin/config/regional/date-time/formats/manage/{date_format}' defaults: _entity_form: 'date_format.edit' requirements: _entity_access: 'date_format.update' date_format_delete: - pattern: 'admin/config/regional/date-time/formats/{date_format}/delete' + pattern: 'admin/config/regional/date-time/formats/manage/{date_format}/delete' defaults: _form: '\Drupal\system\Form\DateFormatDeleteForm' requirements: