Support type=password in rcube_output::get_edit_field()

pull/5281/merge
Aleksander Machniak 8 years ago
parent 2c30feece1
commit 58c036116b

@ -213,10 +213,10 @@ abstract class rcube_output
/** /**
* Create an edit field for inclusion on a form * Create an edit field for inclusion on a form
* *
* @param string col field name * @param string $col Field name
* @param string value field value * @param string $value Field value
* @param array attrib HTML element attributes for field * @param array $attrib HTML element attributes for the field
* @param string type HTML element type (default 'text') * @param string $type HTML element type (default 'text')
* *
* @return string HTML field definition * @return string HTML field definition
*/ */
@ -241,7 +241,7 @@ abstract class rcube_output
$input->add('---', ''); $input->add('---', '');
$input->add(array_values($attrib['options']), array_keys($attrib['options'])); $input->add(array_values($attrib['options']), array_keys($attrib['options']));
} }
else if ($attrib['type'] == 'password') { else if ($type == 'password' || $attrib['type'] == 'password') {
$input = new html_passwordfield($attrib); $input = new html_passwordfield($attrib);
} }
else { else {

Loading…
Cancel
Save