Skip to content
Snippets Groups Projects
Commit 91fa9127 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #80749 by wdp: don't generate empty attributes.

parent 97568421
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
...@@ -1348,9 +1348,10 @@ function theme_markup($element) { ...@@ -1348,9 +1348,10 @@ function theme_markup($element) {
*/ */
function theme_password($element) { function theme_password($element) {
$size = $element['#size'] ? ' size="'. $element['#size'] .'" ' : ''; $size = $element['#size'] ? ' size="'. $element['#size'] .'" ' : '';
$maxlength = $element['#maxlength'] ? ' maxlength="'. $element['#maxlength'] .'" ' : '';
_form_set_class($element, array('form-text')); _form_set_class($element, array('form-text'));
$output = '<input type="password" maxlength="'. $element['#maxlength'] .'" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. $size . drupal_attributes($element['#attributes']) .' />'; $output = '<input type="password" name="'. $element['#name'] .'" id="'. $element['#id'] .'" '. $maxlength . $size . drupal_attributes($element['#attributes']) .' />';
return theme('form_element', $element, $output); return theme('form_element', $element, $output);
} }
......
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