Index: trunk/phase3/includes/Xml.php |
— | — | @@ -129,9 +129,10 @@ |
130 | 130 | * |
131 | 131 | * @param $selected Mixed: the month which should be selected, default '' |
132 | 132 | * @param $allmonths String: value of a special item denoting all month. Null to not include (default) |
| 133 | + * @param string $id Element identifier |
133 | 134 | * @return String: Html string containing the month selector |
134 | 135 | */ |
135 | | - public static function monthSelector( $selected = '', $allmonths = null ) { |
| 136 | + public static function monthSelector( $selected = '', $allmonths = null, $id = 'month' ) { |
136 | 137 | global $wgLang; |
137 | 138 | $options = array(); |
138 | 139 | if( is_null( $selected ) ) |
— | — | @@ -140,7 +141,7 @@ |
141 | 142 | $options[] = self::option( wfMsg( 'monthsall' ), $allmonths, $selected === $allmonths ); |
142 | 143 | for( $i = 1; $i < 13; $i++ ) |
143 | 144 | $options[] = self::option( $wgLang->getMonthName( $i ), $i, $selected === $i ); |
144 | | - return self::openElement( 'select', array( 'id' => 'month', 'name' => 'month' ) ) |
| 145 | + return self::openElement( 'select', array( 'id' => $id, 'name' => 'month' ) ) |
145 | 146 | . implode( "\n", $options ) |
146 | 147 | . self::closeElement( 'select' ); |
147 | 148 | } |