return false;
}
+ /**
+ * True if this field type is able to display errors; false if validation errors need to be
+ * displayed in the main HTMLForm error area.
+ * @return bool
+ */
+ public function canDisplayErrors() {
+ return true;
+ }
+
/**
* Get a translated interface message
*
* Returns the given attributes from the parameters
*
* @param array $list List of attributes to get
- * @param array $mappings Optional - Key/value map of attribute names to use instead of the ones passed in
+ * @param array $mappings Optional - Key/value map of attribute names to use
+ * instead of the ones passed in.
* @return array Attributes
*/
public function getAttributes( array $list, array $mappings = null ) {
- static $boolAttribs = array( 'disabled', 'required', 'multiple', 'readonly' );
+ static $boolAttribs = array( 'disabled', 'required', 'autofocus', 'multiple', 'readonly' );
$ret = array();
foreach ( $list as $key ) {
if ( in_array( $key, $boolAttribs ) ) {
if ( !empty( $this->mParams[$key] ) ) {
- $ret[$mappedKey] = '';
+ $ret[$mappedKey] = $mappedKey;
}
} elseif ( isset( $this->mParams[$key] ) ) {
$ret[$mappedKey] = $this->mParams[$key];