diff --git a/core/includes/form.inc b/core/includes/form.inc
index c037ce1..73e13f0 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -2324,31 +2324,18 @@ function form_process_autocomplete($element, &$form_state) {
}
/**
- * Preprocesses variables for theme_input().
+ * Prepares variables for input templates.
*
- * @param array $variables
- * An associative array containing:
- * - element: An associative array containing the properties of the element.
- */
-function template_preprocess_input(&$variables) {
- $element = $variables['element'];
- $variables['attributes'] = new Attribute($element['#attributes']);
-}
-
-/**
- * Returns HTML for an input form element.
+ * Default template: input.html.twig.
*
* @param array $variables
* An associative array containing:
* - element: An associative array containing the properties of the element.
* Properties used: #attributes.
- *
- * @ingroup themeable
*/
-function theme_input($variables) {
+function template_preprocess_input(&$variables) {
$element = $variables['element'];
- $attributes = $variables['attributes'];
- return '' . drupal_render_children($element);
+ $variables['children'] = $element['#children'];
}
/**
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 12c11e6..da16438 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2623,6 +2623,7 @@ function drupal_common_theme() {
// From form.inc.
'input' => array(
'render element' => 'element',
+ 'template' => 'input',
),
'select' => array(
'render element' => 'element',
diff --git a/core/modules/system/templates/input.html.twig b/core/modules/system/templates/input.html.twig
new file mode 100644
index 0000000..209bdd0
--- /dev/null
+++ b/core/modules/system/templates/input.html.twig
@@ -0,0 +1,15 @@
+{#
+/**
+ * @file
+ * Default theme implementation for an 'input' #type form element.
+ *
+ * Available variables:
+ * - attributes: A list of HTML attributes for the input element.
+ * - children: The rendered child elements.
+ *
+ * @see template_preprocess_input()
+ *
+ * @ingroup themeable
+ */
+#}
+{{ children }}