X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXml.php;h=d5501fea318fb234f8b7e9254d86f84a5d11b80e;hb=d3f05c3c01b96105c11b35e1f21a1e3eb14d5838;hp=223061a1a724de75341d7fbc40886dde614194e0;hpb=a60d05d0e07654a117db1ccd7bb333639e448245;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Xml.php b/includes/Xml.php index 223061a1a7..d5501fea31 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -741,9 +741,10 @@ class Xml { * Output optionally includes a submit button. * @param array $fields Associative array, key is the name of a message that contains a description for the field, value is an HTML string containing the appropriate input. * @param string $submitLabel The name of a message containing a label for the submit button. + * @param array $submitAttribs The attributes to add to the submit button * @return string HTML form. */ - public static function buildForm( $fields, $submitLabel = null ) { + public static function buildForm( $fields, $submitLabel = null, $submitAttribs = array() ) { $form = ''; $form .= ""; @@ -763,7 +764,7 @@ class Xml { if ( $submitLabel ) { $form .= Xml::openElement( 'tr' ); $form .= Xml::tags( 'td', array(), '' ); - $form .= Xml::openElement( 'td', array( 'class' => 'mw-submit' ) ) . Xml::submitButton( wfMessage( $submitLabel )->text() ) . Xml::closeElement( 'td' ); + $form .= Xml::openElement( 'td', array( 'class' => 'mw-submit' ) ) . Xml::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs ) . Xml::closeElement( 'td' ); $form .= Xml::closeElement( 'tr' ); }