Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php |
— | — | @@ -84,17 +84,26 @@ |
85 | 85 | global $sfgTabIndex; |
86 | 86 | |
87 | 87 | $sfgTabIndex++; |
88 | | - $disabled_text = ( $is_disabled ) ? " disabled" : ""; |
89 | 88 | if ( $label == null ) |
90 | 89 | $label = wfMsgExt( 'minoredit', array( 'parseinline' ) ); |
91 | | - $accesskey = wfMsg( 'accesskey-minoredit' ); |
92 | 90 | $tooltip = wfMsg( 'tooltip-minoredit' ); |
93 | | - $attr = Xml::expandAttributes( $attr ); |
94 | | - $text = <<<END |
95 | | - <input tabindex="$sfgTabIndex" type="checkbox" value="" name="wpMinoredit" accesskey="$accesskey" id="wpMinoredit"$disabled_text$attr/> |
96 | | - <label for="wpMinoredit" title="$tooltip">$label</label> |
| 91 | + $attrs = $attr + array( |
| 92 | + 'type' => 'checkbox', |
| 93 | + 'value' => '', |
| 94 | + 'name' => 'wpMinoredit' |
| 95 | + 'id' => 'wpMinoredit', |
| 96 | + 'accesskey' => wfMsg( 'accesskey-minoredit' ), |
| 97 | + 'tabindex' => $sfgTabIndex, |
| 98 | + ); |
| 99 | + if ( $is_disabled ) { |
| 100 | + $attrs['disabled'] = 'disabled'; |
| 101 | + } |
| 102 | + $text = "\t" . Xml::element( 'input', $attrs ) . "\n"; |
| 103 | + $text .= "\t" . Xml::element( 'input', array( |
| 104 | + 'for' => 'wpMinoredit', |
| 105 | + 'title' => $tooltip |
| 106 | + ), $label ) . "\n"; |
97 | 107 | |
98 | | -END; |
99 | 108 | return $text; |
100 | 109 | } |
101 | 110 | |
— | — | @@ -223,8 +232,9 @@ |
224 | 233 | global $sfgTabIndex; |
225 | 234 | |
226 | 235 | $sfgTabIndex++; |
227 | | - if ( $label == null ) |
| 236 | + if ( $label == null ) { |
228 | 237 | $label = wfMsg( 'runquery' ); |
| 238 | + } |
229 | 239 | return self::buttonHTML( $attr + array( |
230 | 240 | 'id' => 'wpRunQuery', |
231 | 241 | 'name' => 'wpRunQuery', |