Loading a11y_form_helpers.module +8 −8 Original line number Diff line number Diff line Loading @@ -53,12 +53,12 @@ function a11y_form_helpers_form_alter(&$form, FormStateInterface $form_state, $f */ function a11y_form_helpers_theme_registry_alter(&$theme_registry) { // Replace default theme form-element.html.twig template from core. if (strpos($theme_registry['form_element']['theme path'], 'core/') === 0) { $path = array_reverse(explode('/', $theme_registry['form_element']['theme path'])); if (strpos($theme_registry['form_element']['path'], 'core/') === 0) { $path = explode('/', $theme_registry['form_element']['path']); $module_path = drupal_get_path('module', 'a11y_form_helpers'); if (file_exists($module_path . '/templates/' . $path[0])) { $theme_registry['form_element']['path'] = $module_path . '/templates/' . $path[0]; if (file_exists($module_path . '/templates/' . $path[2])) { $theme_registry['form_element']['path'] = $module_path . '/templates/' . $path[2]; } else { $theme_registry['form_element']['path'] = $module_path . '/templates/system'; Loading @@ -68,12 +68,12 @@ function a11y_form_helpers_theme_registry_alter(&$theme_registry) { } // Replace default theme fieldset.html.twig template from core. if (strpos($theme_registry['fieldset']['theme path'], 'core/') === 0) { $path = array_reverse(explode('/', $theme_registry['fieldset']['theme path'])); if (strpos($theme_registry['fieldset']['path'], 'core/') === 0) { $path = explode('/', $theme_registry['fieldset']['path']); $module_path = drupal_get_path('module', 'a11y_form_helpers'); if (file_exists($module_path . '/templates/' . $path[0])) { $theme_registry['fieldset']['path'] = $module_path . '/templates/' . $path[0]; if (file_exists($module_path . '/templates/' . $path[2])) { $theme_registry['fieldset']['path'] = $module_path . '/templates/' . $path[2]; } else { $theme_registry['fieldset']['path'] = $module_path . '/templates/system'; Loading Loading
a11y_form_helpers.module +8 −8 Original line number Diff line number Diff line Loading @@ -53,12 +53,12 @@ function a11y_form_helpers_form_alter(&$form, FormStateInterface $form_state, $f */ function a11y_form_helpers_theme_registry_alter(&$theme_registry) { // Replace default theme form-element.html.twig template from core. if (strpos($theme_registry['form_element']['theme path'], 'core/') === 0) { $path = array_reverse(explode('/', $theme_registry['form_element']['theme path'])); if (strpos($theme_registry['form_element']['path'], 'core/') === 0) { $path = explode('/', $theme_registry['form_element']['path']); $module_path = drupal_get_path('module', 'a11y_form_helpers'); if (file_exists($module_path . '/templates/' . $path[0])) { $theme_registry['form_element']['path'] = $module_path . '/templates/' . $path[0]; if (file_exists($module_path . '/templates/' . $path[2])) { $theme_registry['form_element']['path'] = $module_path . '/templates/' . $path[2]; } else { $theme_registry['form_element']['path'] = $module_path . '/templates/system'; Loading @@ -68,12 +68,12 @@ function a11y_form_helpers_theme_registry_alter(&$theme_registry) { } // Replace default theme fieldset.html.twig template from core. if (strpos($theme_registry['fieldset']['theme path'], 'core/') === 0) { $path = array_reverse(explode('/', $theme_registry['fieldset']['theme path'])); if (strpos($theme_registry['fieldset']['path'], 'core/') === 0) { $path = explode('/', $theme_registry['fieldset']['path']); $module_path = drupal_get_path('module', 'a11y_form_helpers'); if (file_exists($module_path . '/templates/' . $path[0])) { $theme_registry['fieldset']['path'] = $module_path . '/templates/' . $path[0]; if (file_exists($module_path . '/templates/' . $path[2])) { $theme_registry['fieldset']['path'] = $module_path . '/templates/' . $path[2]; } else { $theme_registry['fieldset']['path'] = $module_path . '/templates/system'; Loading