Handling parameters with type=password - Joomla! Forum - community, help and support
currently, class mosparameters not handle parameters type='password'. can enabled adding following member function mosparameters class in includes/joomla.xml.php:
is there somewhere suggest such enhancements added code?
rosco
code: select all
/**
* @param string name of form element
* @param string value of element
* @param object xml element parameter
* @param string control name
* @return string html element
*/
function _form_password( $name, $value, &$node, $control_name ) {
$size = $node->getattribute( 'size' );
return '<input type="password" name="'. $control_name .'['. $name .']" value="'. htmlspecialchars($value) .'" class="text_area" size="'. $size .'" />';
}
is there somewhere suggest such enhancements added code?
rosco
another possibly useful handler using component i'm developing, 1 allows select list of joomla contacts:
hope finds useful.
rosco
code: select all
/**
* @param string name of form element
* @param string value of element
* @param object xml element parameter
* @param string control name
* @return string html element
*/
function _form_mos_contact( $name, $value, &$node, $control_name ) {
global $database;
$query = "select id, name"
. "\n #__contact_details"
. "\n published =1"
;
$database->setquery( $query );
$options = $database->loadobjectlist();
array_unshift( $options, moshtml::makeoption( '0', '- select contact -', 'id', 'name' ) );
return moshtml::selectlist( $options, ''. $control_name .'['. $name .']', 'class="inputbox"', 'id', 'name', $value );
}
hope finds useful.
rosco
Comments
Post a Comment