Comments

steveoliver’s picture

Title: convert theme_system_date_format_localize_form to twig. » theme('system_date_format_localize_form')
Status: Needs review » Needs work
Issue tags: +Twig
+++ b/core/modules/system/system.module
@@ -208,10 +208,44 @@ function system_theme() {
+      'template' => 'system-date-format-localize-form',

We don't need this, as we already look for template files by theme hook name (after replacing underscores with dashes).

+++ b/core/modules/system/system.module
@@ -208,10 +208,44 @@ function system_theme() {
+  * Default theme implementation to display a locale date format form.

Make this read "Preprocess variables for locale date format form templates."

+++ b/core/modules/system/system.module
@@ -208,10 +208,44 @@ function system_theme() {
+  *
+  * $variables
+  *   An associative array containing:
+  *   - form: A render element representing the form.
+  *
+  * @see system-date-format-localize-form.html.twig
+  *
+  * @ingroup themeable

Remove all these lines.

artofeclipse’s picture

Component: Twig templates » Twig templates (front-end branch)
StatusFileSize
new2.23 KB

applied all changes.

artofeclipse’s picture

Status: Needs work » Needs review
steveoliver’s picture

Component: Twig templates (front-end branch) » Twig templates conversion (front-end branch)

working on getting '/admin/config' fixed before I can review.

artofeclipse’s picture

steveoliver’s picture

Assigned: artofeclipse » steveoliver
Status: Needs review » Needs work

Needs some cleanup in the template docblock. I will finish this up.

joelpittet’s picture

Also have a go at the theme() function so it doesn't throw errors due to the new stuff it's getting from the preprocessor. (Hint you won't see errors in bartik because of #1855520: System status messages missing from Bartik)

steveoliver’s picture

What's a path for viewing this theme output?

It seems it should be something like admin/config/regional/date-time/formats/long/edit, but it's not (apparently).

artofeclipse’s picture

@steveoliver you can find it by visiting admin/config/regional/date-time/locale but before that you have to enable local module.

steveoliver’s picture

Thanks, artofeclipse. I'll be able to check it out later today.

steveoliver’s picture

sorting doesn't work.

mordonez’s picture

StatusFileSize
new101.76 KB

@steveoliver the system_date_format_localize_form function only affects the edit locale form format. For example: admin/config/regional/date-time/locale/en/edit (see the attach)

This table is not sortable.

steveoliver’s picture

Assigned: steveoliver » Unassigned
Status: Needs work » Closed (duplicate)

OK, Cool. Let's roll this into #1898454: system.module - Convert PHPTemplate templates to Twig. Could you please post this patch to that issue?

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1750250)