Index: trunk/extensions/SemanticForms/specials/SF_CreateCategory.php |
— | — | @@ -80,26 +80,23 @@ |
81 | 81 | END; |
82 | 82 | $text .= SFFormUtils::hiddenFieldHTML( 'title', "$special_namespace:CreateCategory" ); |
83 | 83 | $firstRow = wfMsg( 'sf_createcategory_name' ) . ' ' . |
84 | | - Xml::element( 'input', |
85 | | - array( |
86 | | - 'size' => 25, |
87 | | - 'name' => 'category_name', |
88 | | - ), null ) . "\n"; |
| 84 | + Html::input( 'category_name', null, 'text', |
| 85 | + array( 'size' => 25 ) ) . "\n"; |
89 | 86 | if ( !is_null( $category_name_error_str ) ) { |
90 | | - $firstRow .= Xml::element( 'span', |
| 87 | + $firstRow .= Html::element( 'span', |
91 | 88 | array( 'style' => 'color: red;' ), |
92 | 89 | $category_name_error_str ) . "\n"; |
93 | 90 | } |
94 | 91 | $firstRow .= "\t" . wfMsg( 'sf_createcategory_defaultform' ) . "\n"; |
95 | | - $formSelector = "\t" . Xml::element( 'option', null, null ). "\n"; |
| 92 | + $formSelector = "\t" . Html::element( 'option', null, null ). "\n"; |
96 | 93 | foreach ( $all_forms as $form ) { |
97 | | - $formSelector .= "\t" . Xml::element( 'option', null, $form ) . "\n"; |
| 94 | + $formSelector .= "\t" . Html::element( 'option', null, $form ) . "\n"; |
98 | 95 | } |
99 | 96 | |
100 | | - $firstRow .= Xml::tags( 'select', |
| 97 | + $firstRow .= Html::rawElement( 'select', |
101 | 98 | array( 'id' => 'form_dropdown', 'name' => 'default_form' ), |
102 | 99 | $formSelector ); |
103 | | - $text .= Xml::tags( 'p', null, $firstRow ); |
| 100 | + $text .= Html::rawElement( 'p', null, $firstRow ); |
104 | 101 | $subcategory_label = wfMsg( 'sf_createcategory_makesubcategory' ); |
105 | 102 | $text .= <<<END |
106 | 103 | <p>$subcategory_label |
— | — | @@ -110,12 +107,12 @@ |
111 | 108 | $categories = SFUtils::getCategoriesForPage(); |
112 | 109 | foreach ( $categories as $category ) { |
113 | 110 | $category = str_replace( '_', ' ', $category ); |
114 | | - $text .= "\t" . Xml::element( 'option', null, $category ) . "\n"; |
| 111 | + $text .= "\t" . Html::element( 'option', null, $category ) . "\n"; |
115 | 112 | } |
116 | 113 | $text .= "\t</select>\n"; |
117 | | - $editButtonsText = "\t" . Xml::element( 'input', array( 'type' => 'submit', 'id' => 'wpSave', 'name' => 'wpSave', 'value' => wfMsg( 'savearticle' ) ) ) . "\n"; |
118 | | - $editButtonsText .= "\t" . Xml::element( 'input', array( 'type' => 'submit', 'id' => 'wpPreview', 'name' => 'wpPreview', 'value' => wfMsg( 'preview' ) ) ) . "\n"; |
119 | | - $text .= "\t" . Xml::tags( 'div', array( 'class' => 'editButtons' ), $editButtonsText ) . "\n"; |
| 114 | + $editButtonsText = "\t" . Html::input( 'wpSave', wfMsg( 'savearticle' ), 'submit', array( 'id' => 'wpSave' ) ) . "\n"; |
| 115 | + $editButtonsText .= "\t" . Html::input( 'wpPreview', wfMsg( 'preview' ), 'submit', array( 'id' => 'wpPreview' ) ) . "\n"; |
| 116 | + $text .= "\t" . Html::rawElement( 'div', array( 'class' => 'editButtons' ), $editButtonsText ) . "\n"; |
120 | 117 | $text .= <<<END |
121 | 118 | <br /><hr /<br /> |
122 | 119 | |
— | — | @@ -123,7 +120,7 @@ |
124 | 121 | |
125 | 122 | $sk = $wgUser->getSkin(); |
126 | 123 | $create_form_link = SFUtils::linkForSpecialPage( $sk, 'CreateForm' ); |
127 | | - $text .= "\t" . Xml::tags( 'p', null, $create_form_link . '.' ) . "\n"; |
| 124 | + $text .= "\t" . Html::rawElement( 'p', null, $create_form_link . '.' ) . "\n"; |
128 | 125 | $text .= "\t</form>\n"; |
129 | 126 | |
130 | 127 | $wgOut->addExtensionStyle( $sfgScriptPath . "/skins/SemanticForms.css" ); |
Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | } |
89 | 89 | |
90 | 90 | if ( ( !$form_title || !$form_title->exists() ) && ( $form_name !== '' ) ) { |
91 | | - $text = Xml::tags( 'p', array( 'class' => 'error' ), wfMsgExt( 'sf_formstart_badform', 'parseinline', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
| 91 | + $text = Html::rawElement( 'p', array( 'class' => 'error' ), wfMsgExt( 'sf_formstart_badform', 'parseinline', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
92 | 92 | } else { |
93 | 93 | if ( $form_name === '' ) { |
94 | 94 | $description = htmlspecialchars( wfMsg( 'sf_formstart_noform_docu', $form_name ) ); |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $text .= SFFormUtils::hiddenFieldHTML( 'namespace', $target_namespace ); |
113 | 113 | $text .= SFFormUtils::hiddenFieldHTML( 'super_page', $super_page ); |
114 | 114 | $text .= SFFormUtils::hiddenFieldHTML( 'params', $params ); |
115 | | - $text .= "\t" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'sf_formstart_createoredit' ) ) ) . "\n"; |
| 115 | + $text .= "\t" . Html::input( null, wfMsg( 'sf_formstart_createoredit' ), 'submit' ) . "\n"; |
116 | 116 | $text .= "\t</form>\n"; |
117 | 117 | } |
118 | 118 | $wgOut->addHTML( $text ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | $text .= SFFormUtils::hiddenFieldHTML( 'title', $this->getTitle()->getPrefixedText() ); |
223 | 223 | $text .= "\t<p>" . wfMsg( 'sf_createform_nameinput' ) . ' ' . wfMsg( 'sf_createform_nameinputdesc' ) . ' <input size=25 name="form_name" value="' . $form_name . '" />'; |
224 | 224 | if ( ! empty( $form_name_error_str ) ) |
225 | | - $text .= "\t" . Xml::element( 'font', array( 'color' => 'red' ), $form_name_error_str ); |
| 225 | + $text .= "\t" . Html::element( 'font', array( 'color' => 'red' ), $form_name_error_str ); |
226 | 226 | $text .= "</p>\n"; |
227 | 227 | |
228 | 228 | $text .= $form->creationHTML(); |
— | — | @@ -230,9 +230,9 @@ |
231 | 231 | |
232 | 232 | $select_body = ""; |
233 | 233 | foreach ( $all_templates as $template ) { |
234 | | - $select_body .= " " . Xml::element( 'option', array( 'value' => $template ), $template ) . "\n"; |
| 234 | + $select_body .= " " . Html::element( 'option', array( 'value' => $template ), $template ) . "\n"; |
235 | 235 | } |
236 | | - $text .= "\t" . Xml::tags( 'select', array( 'name' => 'new_template' ), $select_body ) . "\n"; |
| 236 | + $text .= "\t" . Html::rawElement( 'select', array( 'name' => 'new_template' ), $select_body ) . "\n"; |
237 | 237 | // If a template has already been added, show a dropdown letting |
238 | 238 | // the user choose where in the list to add a new dropdown. |
239 | 239 | if ( count( $form_templates ) > 0 ) { |
— | — | @@ -240,12 +240,12 @@ |
241 | 241 | $text .= $before_template_msg; |
242 | 242 | $select_body = ""; |
243 | 243 | foreach ( $form_templates as $i => $ft ) { |
244 | | - $select_body .= "\t" . Xml::element( 'option', array( 'value' => $i ), $ft->getTemplateName() ) . "\n"; |
| 244 | + $select_body .= "\t" . Html::element( 'option', array( 'value' => $i ), $ft->getTemplateName() ) . "\n"; |
245 | 245 | } |
246 | 246 | $final_index = count( $form_templates ); |
247 | 247 | $at_end_msg = wfMsg( 'sf_createform_atend' ); |
248 | | - $select_body .= "\t" . Xml::element( 'option', array( 'value' => $final_index, 'selected' => 'selected' ), $at_end_msg ); |
249 | | - $text .= Xml::tags( 'select', array( 'name' => 'before_template' ), $select_body ) . "\n"; |
| 248 | + $select_body .= "\t" . Html::element( 'option', array( 'value' => $final_index, 'selected' => 'selected' ), $at_end_msg ); |
| 249 | + $text .= Html::rawElement( 'select', array( 'name' => 'before_template' ), $select_body ) . "\n"; |
250 | 250 | } |
251 | 251 | |
252 | 252 | // Disable 'save' and 'preview' buttons if user has not yet |
— | — | @@ -254,31 +254,35 @@ |
255 | 255 | $add_button_text = wfMsg( 'sf_createform_add' ); |
256 | 256 | $sk = $wgUser->getSkin(); |
257 | 257 | $create_template_link = SFUtils::linkForSpecialPage( $sk, 'CreateTemplate' ); |
258 | | - $text .= "\t" . Xml::element( 'input', array( 'type' => 'submit', 'name' => 'add_field', 'value' => $add_button_text ) ); |
| 258 | + $text .= "\t" . Html::input( 'add_field', $add_button_text, 'submit' ); |
259 | 259 | $text .= <<<END |
260 | 260 | </p> |
261 | 261 | <br /> |
262 | 262 | |
263 | 263 | END; |
264 | | - $saveAttrs = array( 'type' => 'submit', 'id' => 'wpSave', 'name' => 'wpSave', 'value' => wfMsg( 'savearticle' ) ); |
265 | | - if ( count( $form_templates ) == 0 ) { $saveAttrs['disabled'] = 'disabled'; } |
266 | | - $editButtonsText = "\t" . Xml::element( 'input', $saveAttrs ) . "\n"; |
267 | | - $previewAttrs = array( 'type' => 'submit', 'id' => 'wpPreview', 'name' => 'wpPreview', 'value' => wfMsg( 'preview' ) ); |
268 | | - if ( count( $form_templates ) == 0 ) { $previewAttrs['disabled'] = 'disabled'; } |
269 | | - $editButtonsText .= "\t" . Xml::element( 'input', $previewAttrs ) . "\n"; |
270 | | - $text .= "\t" . Xml::tags( 'div', array( 'class' => 'editButtons' ), |
271 | | - Xml::tags( 'p', array(), $editButtonsText ) . "\n" ) . "\n"; |
| 264 | + $saveAttrs = array( 'id' => 'wpSave' ); |
| 265 | + if ( count( $form_templates ) == 0 ) { |
| 266 | + $saveAttrs['disabled'] = true; |
| 267 | + } |
| 268 | + $editButtonsText = "\t" . Html::input( 'wpSave', wfMsg( 'savearticle' ), 'submit', $saveAttrs ) . "\n"; |
| 269 | + $previewAttrs = array( 'id' => 'wpPreview' ); |
| 270 | + if ( count( $form_templates ) == 0 ) { |
| 271 | + $previewAttrs['disabled'] = true; |
| 272 | + } |
| 273 | + $editButtonsText .= "\t" . Html::input( 'wpPreview', wfMsg( 'preview' ), 'submit', $previewAttrs ) . "\n"; |
| 274 | + $text .= "\t" . Html::rawElement( 'div', array( 'class' => 'editButtons' ), |
| 275 | + Html::rawElement( 'p', array(), $editButtonsText ) . "\n" ) . "\n"; |
272 | 276 | // Explanatory message if buttons are disabled because no |
273 | 277 | // templates have been added. |
274 | 278 | if ( count( $form_templates ) == 0 ) { |
275 | | - $text .= "\t" . Xml::element( 'p', null, "(" . wfMsg( 'sf_createtemplate_addtemplatebeforesave' ) . ")" ); |
| 279 | + $text .= "\t" . Html::element( 'p', null, "(" . wfMsg( 'sf_createtemplate_addtemplatebeforesave' ) . ")" ); |
276 | 280 | } |
277 | 281 | $text .= <<<END |
278 | 282 | </form> |
279 | 283 | <hr /><br /> |
280 | 284 | |
281 | 285 | END; |
282 | | - $text .= "\t" . Xml::tags( 'p', null, $create_template_link . '.' ); |
| 286 | + $text .= "\t" . Html::rawElement( 'p', null, $create_template_link . '.' ); |
283 | 287 | |
284 | 288 | $wgOut->addExtensionStyle( $sfgScriptPath . "/skins/SemanticForms.css" ); |
285 | 289 | $wgOut->addHTML( $text ); |
— | — | @@ -286,26 +290,26 @@ |
287 | 291 | |
288 | 292 | /** |
289 | 293 | * Prints an input for a form-field parameter. |
290 | | - * Code borrowed heavily from Semantic MediaWiki's |
| 294 | + * Code borrowed from Semantic MediaWiki's |
291 | 295 | * SMWAskPage::addOptionInput(). |
292 | 296 | */ |
293 | 297 | public static function inputTypeParamInput( $type, $paramName, $cur_value, array $param, array $paramValues, $fieldFormText ) { |
294 | 298 | if ( $type == 'int' ) { |
295 | | - return Xml::element( 'input', array( |
296 | | - 'type' => 'text', |
297 | | - 'name' => $paramName . '_' . $fieldFormText, |
298 | | - 'value' => $cur_value, |
299 | | - 'size' => 6 |
300 | | - ) ); |
| 299 | + return Html::input( |
| 300 | + $paramName . '_' . $fieldFormText, |
| 301 | + $cur_value, |
| 302 | + 'text', |
| 303 | + array( 'size' => 6 ) |
| 304 | + ); |
301 | 305 | } elseif ( $type == 'string' ) { |
302 | | - return Xml::element( 'input', array( |
303 | | - 'type' => 'text', |
304 | | - 'name' => $paramName . '_' . $fieldFormText, |
305 | | - 'value' => $cur_value, |
306 | | - 'size' => 32 |
307 | | - ) ); |
| 306 | + return Html::input( |
| 307 | + $paramName . '_' . $fieldFormText, |
| 308 | + $cur_value, |
| 309 | + 'text', |
| 310 | + array( 'size' => 32 ) |
| 311 | + ); |
308 | 312 | } elseif ( $type == 'text' ) { |
309 | | - return Xml::element( 'textarea', array( |
| 313 | + return Html::element( 'textarea', array( |
310 | 314 | 'name' => $paramName . '_' . $fieldFormText, |
311 | 315 | 'rows' => 4 |
312 | 316 | ), $cur_value ); |
— | — | @@ -331,12 +335,9 @@ |
332 | 336 | } |
333 | 337 | return $text; |
334 | 338 | } elseif ( $type == 'boolean' ) { |
335 | | - $checkboxAttrs = array( |
336 | | - 'type' => 'checkbox', |
337 | | - 'name' => $paramName . '_' . $fieldFormText |
338 | | - ); |
339 | | - if ( $cur_value) { $checkboxAttrs['checked'] = 'checked'; } |
340 | | - return Xml::element( 'input', $checkboxAttrs ); |
| 339 | + $checkboxAttrs = array(); |
| 340 | + if ( $cur_value) { $checkboxAttrs['checked'] = true; } |
| 341 | + return Html::input( $paramName . '_' . $fieldFormText, null, 'checkbox', $checkboxAttrs ); |
341 | 342 | } |
342 | 343 | } |
343 | 344 | |
— | — | @@ -387,7 +388,7 @@ |
388 | 389 | $text .= "<div style=\"width: 30%; padding: 5px; float: left;\">$paramName:\n"; |
389 | 390 | |
390 | 391 | $text .= self::inputTypeParamInput( $type, $paramName, $cur_value, $param, array(), $fieldFormText ); |
391 | | - $text .= "\n<br />" . Xml::tags( 'em', null, $desc ) . "\n</div>\n"; |
| 392 | + $text .= "\n<br />" . Html::rawElement( 'em', null, $desc ) . "\n</div>\n"; |
392 | 393 | |
393 | 394 | if ( $i % 3 == 2 || $i == count( $params ) - 1 ) { |
394 | 395 | $text .= "<div style=\"clear: both\";></div></div>\n"; |
Index: trunk/extensions/SemanticForms/specials/SF_CreateProperty.php |
— | — | @@ -127,9 +127,9 @@ |
128 | 128 | END; |
129 | 129 | $select_body = ""; |
130 | 130 | foreach ( $datatype_labels as $label ) { |
131 | | - $select_body .= " " . Xml::element( 'option', null, $label ) . "\n"; |
| 131 | + $select_body .= " " . Html::element( 'option', null, $label ) . "\n"; |
132 | 132 | } |
133 | | - $text .= Xml::tags( 'select', array( 'id' => 'property_dropdown', 'name' => 'property_type', 'onChange' => 'toggleDefaultForm(this.value); toggleAllowedValues(this.value);' ), $select_body ) . "\n"; |
| 133 | + $text .= Html::rawElement( 'select', array( 'id' => 'property_dropdown', 'name' => 'property_type', 'onChange' => 'toggleDefaultForm(this.value); toggleAllowedValues(this.value);' ), $select_body ) . "\n"; |
134 | 134 | |
135 | 135 | $default_form_input = wfMsg( 'sf_createproperty_linktoform' ); |
136 | 136 | $values_input = wfMsg( 'sf_createproperty_allowedvalsinput' ); |
— | — | @@ -144,9 +144,9 @@ |
145 | 145 | </div> |
146 | 146 | |
147 | 147 | END; |
148 | | - $edit_buttons = "\t" . Xml::element( 'input', array( 'id' => 'wpSave', 'type' => 'submit', 'name' => 'wpSave', 'value' => $save_button_text ) ); |
149 | | - $edit_buttons .= "\t" . Xml::element( 'input', array( 'id' => 'wpPreview', 'type' => 'submit', 'name' => 'wpPreview', 'value' => $preview_button_text ) ); |
150 | | - $text .= "\t" . Xml::tags( 'div', array( 'class' => 'editButtons' ), $edit_buttons ) . "\n"; |
| 148 | + $edit_buttons = "\t" . Html::input( 'wpSave', $save_button_text, 'submit', array( 'id' => 'wpSave' ) ); |
| 149 | + $edit_buttons .= "\t" . Html::input( 'wpPreview', $preview_button_text, 'submit', array( 'id' => 'wpPreview' ) ); |
| 150 | + $text .= "\t" . Html::rawElement( 'div', array( 'class' => 'editButtons' ), $edit_buttons ) . "\n"; |
151 | 151 | $text .= "\t</form>\n"; |
152 | 152 | |
153 | 153 | $wgOut->addExtensionStyle( $sfgScriptPath . "/skins/SemanticForms.css" ); |
Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php |
— | — | @@ -204,18 +204,18 @@ |
205 | 205 | </div> |
206 | 206 | |
207 | 207 | END; |
208 | | - $add_another_button = Xml::element( 'input', |
| 208 | + $add_another_button = Html::element( 'input', |
209 | 209 | array( |
210 | 210 | 'type' => 'button', |
211 | 211 | 'value' => wfMsg( 'sf_formedit_addanother' ), |
212 | 212 | 'onclick' => "createClassAddRow()" |
213 | 213 | ) |
214 | 214 | ); |
215 | | - $text .= Xml::tags( 'p', null, $add_another_button ) . "\n"; |
| 215 | + $text .= Html::rawElement( 'p', null, $add_another_button ) . "\n"; |
216 | 216 | // Set 'title' as hidden field, in case there's no URL niceness |
217 | 217 | $cc = $this->getTitle(); |
218 | 218 | $text .= SFFormUtils::hiddenFieldHTML( 'title', SFUtils::titleURLString( $cc ) ); |
219 | | - $text .= Xml::element( 'input', |
| 219 | + $text .= Html::element( 'input', |
220 | 220 | array( |
221 | 221 | 'type' => 'submit', |
222 | 222 | 'name' => 'save', |
Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | |
61 | 61 | $this->mError = wfMsg( $msg, $msgdata ); |
62 | 62 | |
63 | | - $wgOut->addHTML( Xml::element( 'p', array( 'class' => 'error' ), $this->mError ) ); |
| 63 | + $wgOut->addHTML( Html::element( 'p', array( 'class' => 'error' ), $this->mError ) ); |
64 | 64 | |
65 | 65 | } else { |
66 | 66 | $this->mError = null; |
— | — | @@ -145,10 +145,10 @@ |
146 | 146 | . "</div>\n"; |
147 | 147 | |
148 | 148 | } else { |
149 | | - $text = Xml::tags( 'p', array( 'class' => 'error' ), wfMsgExt( 'sf_formstart_badform', 'parseinline', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
| 149 | + $text = Html::rawElement( 'p', array( 'class' => 'error' ), wfMsgExt( 'sf_formstart_badform', 'parseinline', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
150 | 150 | } |
151 | 151 | } elseif ( $target_name === '' && $page_name_formula === '' ) { |
152 | | - $text = Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_formedit_badurl' ) ) . "\n"; |
| 152 | + $text = Html::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_formedit_badurl' ) ) . "\n"; |
153 | 153 | } else { |
154 | 154 | |
155 | 155 | $save_page = $wgRequest->getCheck( 'wpSave' ); |
Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -38,9 +38,9 @@ |
39 | 39 | |
40 | 40 | if ( !$form_title || !$form_title->exists() ) { |
41 | 41 | if ( $form_name === '' ) { |
42 | | - $text = Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_runquery_badurl' ) ) . "\n"; |
| 42 | + $text = Html::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_runquery_badurl' ) ) . "\n"; |
43 | 43 | } else { |
44 | | - $text = Xml::tags( 'p', array( 'class' => 'error' ), |
| 44 | + $text = Html::rawElement( 'p', array( 'class' => 'error' ), |
45 | 45 | wfMsgExt( 'sf_formstart_badform', 'parseinline', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
46 | 46 | } |
47 | 47 | $wgOut->addHTML( $text ); |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | // the query form is at the top or bottom) is displayed |
113 | 113 | // if the form has already been submitted. |
114 | 114 | if ( $form_submitted ) { |
115 | | - $additionalQueryHeader = "\n" . Xml::element( 'h2', null, wfMsg( 'sf_runquery_additionalquery' ) ) . "\n"; |
| 115 | + $additionalQueryHeader = "\n" . Html::element( 'h2', null, wfMsg( 'sf_runquery_additionalquery' ) ) . "\n"; |
116 | 116 | $dividerText = "\n<hr style=\"margin: 15px 0;\" />\n"; |
117 | 117 | } |
118 | 118 | $action = htmlspecialchars( $this->getTitle( $form_name )->getLocalURL() ); |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | | - // Finally, set the page title - for MW <= 1.16, this has to be |
| 160 | + // Finally, set the page title - for MW 1.16, this has to be |
161 | 161 | // called after addParserOutputNoText() for it to take effect. |
162 | 162 | if ( !$embedded ) { |
163 | 163 | if ( $form_page_title != null ) { |
Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php |
— | — | @@ -66,21 +66,21 @@ |
67 | 67 | foreach ( $all_properties as $prop_name ) { |
68 | 68 | $optionAttrs = array( 'value' => $prop_name ); |
69 | 69 | if ( $selected_property == $prop_name ) { $optionAttrs['selected'] = 'selected'; } |
70 | | - $selectBody .= Xml::element( 'option', $optionAttrs, $prop_name ) . "\n"; |
| 70 | + $selectBody .= Html::element( 'option', $optionAttrs, $prop_name ) . "\n"; |
71 | 71 | } |
72 | | - return Xml::tags( 'select', array( 'name' => "semantic_property_$id" ), $selectBody ) . "\n"; |
| 72 | + return Html::rawElement( 'select', array( 'name' => "semantic_property_$id" ), $selectBody ) . "\n"; |
73 | 73 | } |
74 | 74 | |
75 | 75 | public static function printFieldEntryBox( $id, $all_properties, $display = true ) { |
76 | 76 | $fieldString = $display ? '' : 'id="starterField" style="display: none"'; |
77 | 77 | $text = "\t<div class=\"fieldBox\" $fieldString>\n"; |
78 | 78 | $text .= "\t<p>" . wfMsg( 'sf_createtemplate_fieldname' ) . ' ' . |
79 | | - Xml::element( 'input', |
80 | | - array( 'size' => '15', 'name' => 'name_' . $id ), null |
| 79 | + Html::input( 'name_' . $id, null, 'text', |
| 80 | + array( 'size' => '15' ) |
81 | 81 | ) . "\n"; |
82 | 82 | $text .= "\t" . wfMsg( 'sf_createtemplate_displaylabel' ) . ' ' . |
83 | | - Xml::element( 'input', |
84 | | - array( 'size' => '15', 'name' => 'label_' . $id ), null |
| 83 | + Html::input( 'label_' . $id, null, 'text', |
| 84 | + array( 'size' => '15' ) |
85 | 85 | ) . "\n"; |
86 | 86 | |
87 | 87 | $dropdown_html = self::printPropertiesDropdown( $all_properties, $id ); |
— | — | @@ -189,8 +189,8 @@ |
190 | 190 | $text .= "\t<p id=\"template_name_p\">" . wfMsg( 'sf_createtemplate_namelabel' ) . ' <input size="25" id="template_name" name="template_name" /></p>' . "\n"; |
191 | 191 | $text .= "\t<p>" . wfMsg( 'sf_createtemplate_categorylabel' ) . ' <input size="25" name="category" /></p>' . "\n"; |
192 | 192 | $text .= "\t<fieldset>\n"; |
193 | | - $text .= "\t" . Xml::element( 'legend', null, wfMsg( 'sf_createtemplate_templatefields' ) ) . "\n"; |
194 | | - $text .= "\t" . Xml::element( 'p', null, wfMsg( 'sf_createtemplate_fieldsdesc' ) ) . "\n"; |
| 193 | + $text .= "\t" . Html::element( 'legend', null, wfMsg( 'sf_createtemplate_templatefields' ) ) . "\n"; |
| 194 | + $text .= "\t" . Html::element( 'p', null, wfMsg( 'sf_createtemplate_fieldsdesc' ) ) . "\n"; |
195 | 195 | |
196 | 196 | $all_properties = self::getAllPropertyNames(); |
197 | 197 | $text .= '<div id="fieldsList">' . "\n"; |
— | — | @@ -198,34 +198,29 @@ |
199 | 199 | $text .= self::printFieldEntryBox( "starter", $all_properties, false ); |
200 | 200 | $text .= "</div>\n"; |
201 | 201 | |
202 | | - $add_field_button = Xml::element( 'input', |
203 | | - array( |
204 | | - 'type' => 'button', |
205 | | - 'value' => wfMsg( 'sf_createtemplate_addfield' ), |
206 | | - 'onclick' => "createTemplateAddField()" |
207 | | - ) |
| 202 | + $add_field_button = Html::input( |
| 203 | + null, |
| 204 | + wfMsg( 'sf_createtemplate_addfield' ), |
| 205 | + 'button', |
| 206 | + array( 'onclick' => "createTemplateAddField()" ) |
208 | 207 | ); |
209 | | - $text .= Xml::tags( 'p', null, $add_field_button ) . "\n"; |
| 208 | + $text .= Html::rawElement( 'p', null, $add_field_button ) . "\n"; |
210 | 209 | $text .= "\t</fieldset>\n"; |
211 | 210 | $text .= "\t<fieldset>\n"; |
212 | | - $text .= "\t" . Xml::element( 'legend', null, wfMsg( 'sf_createtemplate_aggregation' ) ) . "\n"; |
213 | | - $text .= "\t" . Xml::element( 'p', null, wfMsg( 'sf_createtemplate_aggregationdesc' ) ) . "\n"; |
| 211 | + $text .= "\t" . Html::element( 'legend', null, wfMsg( 'sf_createtemplate_aggregation' ) ) . "\n"; |
| 212 | + $text .= "\t" . Html::element( 'p', null, wfMsg( 'sf_createtemplate_aggregationdesc' ) ) . "\n"; |
214 | 213 | $text .= "\t<p>" . wfMsg( 'sf_createtemplate_semanticproperty' ) . ' ' . |
215 | 214 | self::printPropertiesDropdown( $all_properties, "aggregation" ) . "</p>\n"; |
216 | 215 | $text .= "\t<p>" . wfMsg( 'sf_createtemplate_aggregationlabel' ) . ' ' . |
217 | | - Xml::element( 'input', |
218 | | - array( 'size' => '25', 'name' => 'aggregation_label' ), null ) . |
| 216 | + Html::input( 'aggregation_label', null, 'text', |
| 217 | + array( 'size' => '25' ) ) . |
219 | 218 | "</p>\n"; |
220 | 219 | $text .= "\t</fieldset>\n"; |
221 | 220 | $text .= "\t<p>" . wfMsg( 'sf_createtemplate_outputformat' ) . "\n"; |
222 | | - $text .= "\t" . Xml::element( 'input', array( |
223 | | - 'type' => 'radio', |
224 | | - 'name' => 'template_format', |
225 | | - 'checked' => 'checked', |
226 | | - 'value' => 'standard' |
| 221 | + $text .= "\t" . Html::input( 'template_format', 'standard', 'radio', array( |
| 222 | + 'checked' => true, |
227 | 223 | ), null ) . ' ' . wfMsg( 'sf_createtemplate_standardformat' ) . "\n"; |
228 | | - $text .= "\t" . Xml::element( 'input', |
229 | | - array( 'type' => 'radio', 'name' => 'template_format', 'value' => 'infobox'), null ) . |
| 224 | + $text .= "\t" . Html::input( 'template_format', 'infobox', 'radio', null ) . |
230 | 225 | ' ' . wfMsg( 'sf_createtemplate_infoboxformat' ) . "</p>\n"; |
231 | 226 | $save_button_text = wfMsg( 'savearticle' ); |
232 | 227 | $preview_button_text = wfMsg( 'preview' ); |
— | — | @@ -240,7 +235,7 @@ |
241 | 236 | $sk = $wgUser->getSkin(); |
242 | 237 | $create_property_link = SFUtils::linkForSpecialPage( $sk, 'CreateProperty' ); |
243 | 238 | $text .= "\t<br /><hr /><br />\n"; |
244 | | - $text .= "\t" . Xml::tags( 'p', null, $create_property_link . '.' ) . "\n"; |
| 239 | + $text .= "\t" . Html::rawElement( 'p', null, $create_property_link . '.' ) . "\n"; |
245 | 240 | |
246 | 241 | $wgOut->addExtensionStyle( $sfgScriptPath . "/skins/SemanticForms.css" ); |
247 | 242 | $wgOut->addHTML( $text ); |
Index: trunk/extensions/SemanticForms/includes/SF_FormField.php |
— | — | @@ -83,6 +83,7 @@ |
84 | 84 | $f->mInputName = $inputName; |
85 | 85 | $f->mIsDisabled = $isDisabled; |
86 | 86 | $f->mIsList = $isList; |
| 87 | + $f->mAllFields = $allFields; |
87 | 88 | return $f; |
88 | 89 | } |
89 | 90 | |
— | — | @@ -156,7 +157,7 @@ |
157 | 158 | $hidden_text = wfMsg( 'sf_createform_hidden' ); |
158 | 159 | $selected_str = ( $cur_input_type == 'hidden' ) ? "selected" : ""; |
159 | 160 | $dropdownHTML .= " <option value=\"hidden\" $selected_str>($hidden_text)</option>\n"; |
160 | | - $text = "\t" . Xml::tags( 'select', |
| 161 | + $text = "\t" . Html::rawElement( 'select', |
161 | 162 | array( |
162 | 163 | 'class' => 'inputTypeSelector', |
163 | 164 | 'name' => 'input_type_' . $field_form_text, |
— | — | @@ -197,17 +198,16 @@ |
198 | 199 | $propertyTypeStr = SFUtils::linkText( SMW_NS_TYPE, $propertyTypeLabel ); |
199 | 200 | } |
200 | 201 | } |
201 | | - $text .= Xml::tags( 'p', null, wfMsgExt( $propDisplayMsg, 'parseinline', $prop_link_text, $propertyTypeStr ) ) . "\n"; |
| 202 | + $text .= Html::rawElement( 'p', null, wfMsgExt( $propDisplayMsg, 'parseinline', $prop_link_text, $propertyTypeStr ) ) . "\n"; |
202 | 203 | } |
203 | 204 | // If it's not a semantic field - don't add any text. |
204 | 205 | $form_label_text = wfMsg( 'sf_createform_formlabel' ); |
205 | | - $form_label_input = Xml::element( 'input', |
206 | | - array( |
207 | | - 'type' => 'text', |
208 | | - 'name' => 'label_' . $field_form_text, |
209 | | - 'size' => 20, |
210 | | - 'value' => $template_field->getLabel(), |
211 | | - ), null ); |
| 206 | + $form_label_input = Html::input( |
| 207 | + 'label_' . $field_form_text, |
| 208 | + $template_field->getLabel(), |
| 209 | + 'text', |
| 210 | + array( 'size' => 20 ) |
| 211 | + ); |
212 | 212 | $input_type_text = wfMsg( 'sf_createform_inputtype' ); |
213 | 213 | $text .= <<<END |
214 | 214 | <div class="formField"> |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | } |
248 | 248 | |
249 | 249 | $text .= "<fieldset class=\"sfCollapsibleFieldset\"><legend>Other parameters</legend>\n"; |
250 | | - $text .= Xml::tags( 'div', array( 'class' => 'otherInputParams' ), |
| 250 | + $text .= Html::rawElement( 'div', array( 'class' => 'otherInputParams' ), |
251 | 251 | SFCreateForm::showInputTypeOptions( $cur_input_type, $field_form_text, $paramValues ) ) . "\n"; |
252 | 252 | $text .= "</fieldset>\n"; |
253 | 253 | $text .= <<<END |
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -235,8 +235,6 @@ |
236 | 236 | global $sfgTabIndex, $sfgScriptPath; |
237 | 237 | |
238 | 238 | $attributes = array( |
239 | | - 'type' => 'button', |
240 | | - 'value' => wfMsg( 'sf_formedit_remove' ), |
241 | 239 | 'tabindex' => $sfgTabIndex, |
242 | 240 | 'class' => 'remover', |
243 | 241 | ); |
— | — | @@ -248,7 +246,7 @@ |
249 | 247 | $rearranger = ''; |
250 | 248 | } |
251 | 249 | |
252 | | - $removeButton = Xml::element( 'input', $attributes ); |
| 250 | + $removeButton = Html::input( null, wfMsg( 'sf_formedit_remove' ), 'button', $attributes ); |
253 | 251 | |
254 | 252 | $text = <<<END |
255 | 253 | <table> |
— | — | @@ -278,7 +276,7 @@ |
279 | 277 | // with from any inputs added by the Javascript. |
280 | 278 | $section = str_replace( '[num]', "[{$instance_num}a]", $section ); |
281 | 279 | |
282 | | - $text = "\t\t" . Xml::tags( 'div', |
| 280 | + $text = "\t\t" . Html::rawElement( 'div', |
283 | 281 | array( |
284 | 282 | // The "multipleTemplate" class is there for |
285 | 283 | // backwards-compatibility with any custom CSS on people's |
— | — | @@ -293,7 +291,7 @@ |
294 | 292 | // template - print all the sections |
295 | 293 | // necessary for adding additional |
296 | 294 | // instances. |
297 | | - $text = "\t\t" . Xml::tags( 'div', |
| 295 | + $text = "\t\t" . Html::rawElement( 'div', |
298 | 296 | array( |
299 | 297 | 'class' => "multipleTemplateStarter", |
300 | 298 | 'style' => "display: none", |
— | — | @@ -302,13 +300,11 @@ |
303 | 301 | ) . "\n"; |
304 | 302 | |
305 | 303 | $attributes = array( |
306 | | - 'type' => 'button', |
307 | | - 'value' => Sanitizer::decodeCharReferences( $add_button_text ), |
308 | 304 | 'tabindex' => $sfgTabIndex, |
309 | 305 | 'class' => 'multipleTemplateAdder', |
310 | 306 | ); |
311 | | - if ( $form_is_disabled ) $attributes['disabled'] = 'disabled'; |
312 | | - $button = Xml::element( 'input', $attributes ); |
| 307 | + if ( $form_is_disabled ) $attributes['disabled'] = true; |
| 308 | + $button = Html::input( null, Sanitizer::decodeCharReferences( $add_button_text ), 'button', $attributes ); |
313 | 309 | $text .= <<<END |
314 | 310 | </div><!-- multipleTemplateList --> |
315 | 311 | <p>$button</p> |
Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | if ( $label == null ) |
88 | 88 | $label = wfMsg( 'summary' ); |
89 | 89 | $disabled_text = ( $is_disabled ) ? " disabled" : ""; |
90 | | - $attr = Xml::expandAttributes( $attr ); |
| 90 | + $attr = Html::expandAttributes( $attr ); |
91 | 91 | $text = <<<END |
92 | 92 | <span id='wpSummaryLabel'><label for='wpSummary'>$label</label></span> |
93 | 93 | <input tabindex="$sfgTabIndex" type='text' value="" name='wpSummary' id='wpSummary' maxlength='200' size='60'$disabled_text$attr/> |
— | — | @@ -109,10 +109,10 @@ |
110 | 110 | 'tabindex' => $sfgTabIndex, |
111 | 111 | ); |
112 | 112 | if ( $is_disabled ) { |
113 | | - $attrs['disabled'] = 'disabled'; |
| 113 | + $attrs['disabled'] = true; |
114 | 114 | } |
115 | 115 | $text = "\t" . Xml::check( 'wpMinoredit', $checked, $attrs ) . "\n"; |
116 | | - $text .= "\t" . Xml::element( 'label', array( |
| 116 | + $text .= "\t" . Html::element( 'label', array( |
117 | 117 | 'for' => 'wpMinoredit', |
118 | 118 | 'title' => $tooltip |
119 | 119 | ), $label ) . "\n"; |
— | — | @@ -145,11 +145,11 @@ |
146 | 146 | 'tabindex' => $sfgTabIndex, |
147 | 147 | ); |
148 | 148 | if ( $is_disabled ) { |
149 | | - $attrs['disabled'] = 'disabled'; |
| 149 | + $attrs['disabled'] = true; |
150 | 150 | } |
151 | 151 | $text = "\t" . Xml::check( 'wpWatchthis', $checked, $attrs ) . "\n"; |
152 | 152 | $tooltip = htmlspecialchars( wfMsg( 'tooltip-watch' ) ); |
153 | | - $text .= "\t" . Xml::element( 'label', array( |
| 153 | + $text .= "\t" . Html::element( 'label', array( |
154 | 154 | 'for' => 'wpWatchthis', |
155 | 155 | 'title' => $tooltip |
156 | 156 | ), $label ) . "\n"; |
— | — | @@ -160,29 +160,27 @@ |
161 | 161 | /** |
162 | 162 | * Helper function to display a simple button |
163 | 163 | */ |
164 | | - static function buttonHTML( $values ) { |
165 | | - return "\t\t" . Xml::element( 'input', $values, '' ) . "\n"; |
| 164 | + static function buttonHTML( $name, $value, $type, $attrs ) { |
| 165 | + return "\t\t" . Html::input( $name, $value, $type, $attrs ) . "\n"; |
166 | 166 | } |
167 | 167 | |
168 | 168 | static function saveButtonHTML( $is_disabled, $label = null, $attr = array() ) { |
169 | 169 | global $sfgTabIndex; |
170 | 170 | |
171 | 171 | $sfgTabIndex++; |
172 | | - if ( $label == null ) |
| 172 | + if ( $label == null ) { |
173 | 173 | $label = wfMsg( 'savearticle' ); |
| 174 | + } |
174 | 175 | $temp = $attr + array( |
175 | 176 | 'id' => 'wpSave', |
176 | | - 'name' => 'wpSave', |
177 | | - 'type' => 'submit', |
178 | 177 | 'tabindex' => $sfgTabIndex, |
179 | | - 'value' => $label, |
180 | 178 | 'accesskey' => wfMsg( 'accesskey-save' ), |
181 | 179 | 'title' => wfMsg( 'tooltip-save' ), |
182 | 180 | ); |
183 | 181 | if ( $is_disabled ) { |
184 | | - $temp['disabled'] = ''; |
| 182 | + $temp['disabled'] = true; |
185 | 183 | } |
186 | | - return self::buttonHTML( $temp ); |
| 184 | + return self::buttonHTML( 'wpSave', $label, 'submit', $temp ); |
187 | 185 | } |
188 | 186 | |
189 | 187 | static function saveAndContinueButtonHTML( $is_disabled, $label = null, $attr = array() ) { |
— | — | @@ -196,11 +194,8 @@ |
197 | 195 | |
198 | 196 | $temp = $attr + array( |
199 | 197 | 'id' => 'wpSaveAndContinue', |
200 | | - 'name' => 'wpSaveAndContinue', |
201 | | - 'type' => 'button', |
202 | 198 | 'tabindex' => $sfgTabIndex, |
203 | | - 'value' => $label, |
204 | | - 'disabled' => 'disabled', |
| 199 | + 'disabled' => true, |
205 | 200 | 'accesskey' => wfMsg( 'sf_formedit_accesskey_saveandcontinueediting' ), |
206 | 201 | 'title' => wfMsg( 'sf_formedit_tooltip_saveandcontinueediting' ), |
207 | 202 | ); |
— | — | @@ -211,49 +206,45 @@ |
212 | 207 | $temp['class'] = 'sf-save_and_continue'; |
213 | 208 | } |
214 | 209 | |
215 | | - return self::buttonHTML( $temp ); |
| 210 | + return self::buttonHTML( 'wpSaveAndContinue', $label, 'button', $temp ); |
216 | 211 | } |
217 | 212 | |
218 | 213 | static function showPreviewButtonHTML( $is_disabled, $label = null, $attr = array() ) { |
219 | 214 | global $sfgTabIndex; |
220 | 215 | |
221 | 216 | $sfgTabIndex++; |
222 | | - if ( $label == null ) |
| 217 | + if ( $label == null ) { |
223 | 218 | $label = wfMsg( 'showpreview' ); |
| 219 | + } |
224 | 220 | $temp = $attr + array( |
225 | 221 | 'id' => 'wpPreview', |
226 | | - 'name' => 'wpPreview', |
227 | | - 'type' => 'submit', |
228 | 222 | 'tabindex' => $sfgTabIndex, |
229 | | - 'value' => $label, |
230 | 223 | 'accesskey' => wfMsg( 'accesskey-preview' ), |
231 | 224 | 'title' => wfMsg( 'tooltip-preview' ), |
232 | 225 | ); |
233 | 226 | if ( $is_disabled ) { |
234 | | - $temp['disabled'] = ''; |
| 227 | + $temp['disabled'] = true; |
235 | 228 | } |
236 | | - return self::buttonHTML( $temp ); |
| 229 | + return self::buttonHTML( 'wpPreview', $label, 'submit', $temp ); |
237 | 230 | } |
238 | 231 | |
239 | 232 | static function showChangesButtonHTML( $is_disabled, $label = null, $attr = array() ) { |
240 | 233 | global $sfgTabIndex; |
241 | 234 | |
242 | 235 | $sfgTabIndex++; |
243 | | - if ( $label == null ) |
| 236 | + if ( $label == null ) { |
244 | 237 | $label = wfMsg( 'showdiff' ); |
| 238 | + } |
245 | 239 | $temp = $attr + array( |
246 | 240 | 'id' => 'wpDiff', |
247 | | - 'name' => 'wpDiff', |
248 | | - 'type' => 'submit', |
249 | 241 | 'tabindex' => $sfgTabIndex, |
250 | | - 'value' => $label, |
251 | 242 | 'accesskey' => wfMsg( 'accesskey-diff' ), |
252 | 243 | 'title' => wfMsg( 'tooltip-diff' ), |
253 | 244 | ); |
254 | 245 | if ( $is_disabled ) { |
255 | | - $temp['disabled'] = ''; |
| 246 | + $temp['disabled'] = true; |
256 | 247 | } |
257 | | - return self::buttonHTML( $temp ); |
| 248 | + return self::buttonHTML( 'wpDiff', $label, 'submit', $temp ); |
258 | 249 | } |
259 | 250 | |
260 | 251 | static function cancelLinkHTML( $is_disabled, $label = null, $attr = array() ) { |
— | — | @@ -284,12 +275,10 @@ |
285 | 276 | if ( $label == null ) { |
286 | 277 | $label = wfMsg( 'runquery' ); |
287 | 278 | } |
288 | | - return self::buttonHTML( $attr + array( |
| 279 | + return self::buttonHTML( 'wpRunQuery', $label, 'submit', |
| 280 | + $attr + array( |
289 | 281 | 'id' => 'wpRunQuery', |
290 | | - 'name' => 'wpRunQuery', |
291 | | - 'type' => 'submit', |
292 | 282 | 'tabindex' => $sfgTabIndex, |
293 | | - 'value' => $label, |
294 | 283 | 'title' => $label, |
295 | 284 | ) ); |
296 | 285 | } |
Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -246,14 +246,14 @@ |
247 | 247 | } |
248 | 248 | if ( $inLinkType == 'button' ) { |
249 | 249 | $str = |
250 | | - Xml::tags( 'form', array( 'action' => $link_url, 'method' => 'get', 'class' => $classStr ), |
251 | | - Xml::tags( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
| 250 | + Html::rawElement( 'form', array( 'action' => $link_url, 'method' => 'get', 'class' => $classStr ), |
| 251 | + Html::rawElement( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
252 | 252 | $hidden_inputs |
253 | 253 | ); |
254 | 254 | } elseif ( $inLinkType == 'post button' ) { |
255 | 255 | $str = |
256 | | - Xml::tags( 'form', array( 'action' => $link_url, 'method' => 'post', 'class' => $classStr ), |
257 | | - Xml::tags( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
| 256 | + Html::rawElement( 'form', array( 'action' => $link_url, 'method' => 'post', 'class' => $classStr ), |
| 257 | + Html::rawElement( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
258 | 258 | $hidden_inputs |
259 | 259 | ); |
260 | 260 | } else { |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | $classStr .= " new"; |
267 | 267 | } |
268 | 268 | } |
269 | | - $str = Xml::tags( 'a', array( 'href' => $link_url, 'class' => $classStr, 'title' => $inTooltip ), $inLinkStr ); |
| 269 | + $str = Html::rawElement( 'a', array( 'href' => $link_url, 'class' => $classStr, 'title' => $inTooltip ), $inLinkStr ); |
270 | 270 | } |
271 | 271 | // hack to remove newline from beginning of output, thanks to |
272 | 272 | // http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function |
— | — | @@ -334,12 +334,7 @@ |
335 | 335 | <p> |
336 | 336 | |
337 | 337 | END; |
338 | | - $formInputAttrs = array( |
339 | | - 'type' => 'text', |
340 | | - 'name' => 'page_name', |
341 | | - 'size' => $inSize, |
342 | | - 'value' => $inValue, |
343 | | - ); |
| 338 | + $formInputAttrs = array( 'size' => $inSize ); |
344 | 339 | |
345 | 340 | // Now apply the necessary settings and Javascript, depending |
346 | 341 | // on whether or not there's autocompletion (and whether the |
— | — | @@ -373,7 +368,7 @@ |
374 | 369 | } |
375 | 370 | } |
376 | 371 | |
377 | | - $str .= "\t" . Xml::element( 'input', $formInputAttrs ) . "\n"; |
| 372 | + $str .= "\t" . Html::input( 'page_name', $inValue, 'text', $formInputAttrs ) . "\n"; |
378 | 373 | |
379 | 374 | // if the form start URL looks like "index.php?title=Special:FormStart" |
380 | 375 | // (i.e., it's in the default URL style), add in the title as a |
— | — | @@ -399,14 +394,7 @@ |
400 | 395 | $key = ( isset( $subcomponents[0] ) ) ? $subcomponents[0] : ''; |
401 | 396 | $val = ( isset( $subcomponents[1] ) ) ? $subcomponents[1] : ''; |
402 | 397 | if ( ! empty( $key ) ) { |
403 | | - $str .= ' ' . |
404 | | - Xml::element( 'input', |
405 | | - array( |
406 | | - 'type' => 'hidden', |
407 | | - 'name' => $key, |
408 | | - 'value' => $val, |
409 | | - ) |
410 | | - ) . "\n"; |
| 398 | + $str .= '\t\t\t' . Html::hidden( $key, $val ) . "\n"; |
411 | 399 | } |
412 | 400 | } |
413 | 401 | $button_str = ( $inButtonStr != '' ) ? $inButtonStr : wfMsg( 'sf_formstart_createoredit' ); |
— | — | @@ -416,8 +404,8 @@ |
417 | 405 | |
418 | 406 | END; |
419 | 407 | if ( ! empty( $inAutocompletionSource ) ) { |
420 | | - $str .= ' ' . |
421 | | - Xml::element( 'div', |
| 408 | + $str .= "\t\t\t" . |
| 409 | + Html::element( 'div', |
422 | 410 | array( |
423 | 411 | 'class' => 'page_name_auto_complete', |
424 | 412 | 'id' => "div_$input_num", |
— | — | @@ -611,35 +599,34 @@ |
612 | 600 | // To do that they need to use htmlentities instead of |
613 | 601 | // braces and brackets |
614 | 602 | $formcontent .= |
615 | | - Xml::input( $key, false, Sanitizer::decodeCharReferences( $value ) , array( 'type' => 'hidden' ) ); |
| 603 | + Html::hidden( $key, Sanitizer::decodeCharReferences( $value ) ); |
616 | 604 | } |
617 | 605 | } |
618 | 606 | |
619 | 607 | if ( $linkString == null ) return null; |
620 | 608 | |
621 | 609 | if ( $linkType == 'button' ) { |
622 | | - $linkElement = Xml::tags( "button", array( 'class' => $classString ), $linkString ); |
| 610 | + $linkElement = Html::rawElement( 'button', array( 'class' => $classString ), $linkString ); |
623 | 611 | } elseif ( $linkType == 'link' ) { |
624 | | - $linkElement = Xml::tags( "a", array( 'class' => $classString, 'href' => "#" ), $linkString ); |
| 612 | + $linkElement = Html::rawElement( 'a', array( 'class' => $classString, 'href' => "#" ), $linkString ); |
625 | 613 | } else { |
626 | | - $linkElement = Xml::tags( "span", array( 'class' => $classString ), $linkString ); |
| 614 | + $linkElement = Html::rawElement( 'span', array( 'class' => $classString ), $linkString ); |
627 | 615 | } |
628 | 616 | |
629 | 617 | if ( $summary == null ) { |
630 | 618 | $summary = wfMsg( 'sf_autoedit_summary', "[[$wgTitle]]" ); |
631 | 619 | } |
632 | 620 | |
633 | | - $formcontent .= |
634 | | - Xml::input( 'wpSummary', false, $summary, array( 'type' => 'hidden' ) ); |
| 621 | + $formcontent .= Html::hidden( 'wpSummary', $summary ); |
635 | 622 | |
636 | | - $form = Xml::tags( 'form', array( 'class' => 'autoedit-data' ), $formcontent ); |
| 623 | + $form = Html::rawElement( 'form', array( 'class' => 'autoedit-data' ), $formcontent ); |
637 | 624 | |
638 | 625 | // ensure loading of jQuery and style sheets |
639 | 626 | self::loadScriptsForAutoEdit( $parser ); |
640 | 627 | |
641 | | - $output = Xml::tags( "div", array( 'class' => "autoedit" ), |
| 628 | + $output = Html::rawElement( 'div', array( 'class' => 'autoedit' ), |
642 | 629 | $linkElement . |
643 | | - Xml::tags( "span", array( 'class' => "autoedit-result" ), null ) . |
| 630 | + Html::rawElement( 'span', array( 'class' => "autoedit-result" ), null ) . |
644 | 631 | $form |
645 | 632 | ); |
646 | 633 | |
Index: trunk/extensions/SemanticForms/includes/SF_TemplateInForm.php |
— | — | @@ -174,12 +174,12 @@ |
175 | 175 | foreach ( $this->mFields as $field ) { |
176 | 176 | $text .= $field->creationHTML( $template_num ); |
177 | 177 | } |
178 | | - $removeTemplateButton = Xml::element( 'input', array( |
179 | | - 'type' => 'submit', |
180 | | - 'name' => 'del_' . $template_num, |
181 | | - 'value' => wfMsg( 'sf_createform_removetemplate' ) |
182 | | - ) ); |
183 | | - $text .= "\t" . Xml::tags( 'p', null, $removeTemplateButton ) . "\n"; |
| 178 | + $removeTemplateButton = Html::input( |
| 179 | + 'del_' . $template_num, |
| 180 | + wfMsg( 'sf_createform_removetemplate' ), |
| 181 | + 'submit' |
| 182 | + ); |
| 183 | + $text .= "\t" . Html::rawElement( 'p', null, $removeTemplateButton ) . "\n"; |
184 | 184 | $text .= " </div>\n"; |
185 | 185 | return $text; |
186 | 186 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_ListBoxInput.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | if ( in_array( $possible_value, $cur_values ) ) { |
55 | 55 | $optionAttrs['selected'] = 'selected'; |
56 | 56 | } |
57 | | - $optionsText .= Xml::element( 'option', $optionAttrs, $optionLabel ); |
| 57 | + $optionsText .= Html::element( 'option', $optionAttrs, $optionLabel ); |
58 | 58 | } |
59 | 59 | $selectAttrs = array( |
60 | 60 | 'id' => $input_id, |
— | — | @@ -68,10 +68,10 @@ |
69 | 69 | if ( $is_disabled ) { |
70 | 70 | $selectAttrs['disabled'] = 'disabled'; |
71 | 71 | } |
72 | | - $text = Xml::tags( 'select', $selectAttrs, $optionsText ); |
| 72 | + $text = Html::rawElement( 'select', $selectAttrs, $optionsText ); |
73 | 73 | $text .= SFFormUtils::hiddenFieldHTML( $input_name . '[is_list]', 1 ); |
74 | 74 | if ( $is_mandatory ) { |
75 | | - $text = Xml::tags( 'span', array( 'class' => 'inputSpan mandatoryFieldSpan' ), $text ); |
| 75 | + $text = Html::rawElement( 'span', array( 'class' => 'inputSpan mandatoryFieldSpan' ), $text ); |
76 | 76 | } |
77 | 77 | |
78 | 78 | if ( array_key_exists( 'show on select', $other_args ) ) { |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextInput.php |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | 'data-input-id' => $input_id |
129 | 129 | ); |
130 | 130 | |
131 | | - $text = "\t" . Xml::element( 'a', $linkAttrs, $upload_label ) . "\n"; |
| 131 | + $text = "\t" . Html::element( 'a', $linkAttrs, $upload_label ) . "\n"; |
132 | 132 | |
133 | 133 | if ( $showPreview ) { |
134 | 134 | $text .= Html::rawElement( |
— | — | @@ -182,12 +182,9 @@ |
183 | 183 | } |
184 | 184 | |
185 | 185 | $inputAttrs = array( |
186 | | - 'type' => 'text', |
187 | 186 | 'id' => $input_id, |
188 | 187 | 'tabindex' => $sfgTabIndex, |
189 | 188 | 'class' => $className, |
190 | | - 'name' => $input_name, |
191 | | - 'value' => $cur_value, |
192 | 189 | 'size' => $size |
193 | 190 | ); |
194 | 191 | if ( $is_disabled ) { |
— | — | @@ -199,7 +196,7 @@ |
200 | 197 | if ( array_key_exists( 'placeholder', $other_args ) ) { |
201 | 198 | $inputAttrs['placeholder'] = $other_args['placeholder']; |
202 | 199 | } |
203 | | - $text = Xml::element( 'input', $inputAttrs ); |
| 200 | + $text = Html::input( $input_name, $cur_value, 'text', $inputAttrs ); |
204 | 201 | |
205 | 202 | if ( array_key_exists( 'uploadable', $other_args ) && $other_args['uploadable'] == true ) { |
206 | 203 | if ( array_key_exists( 'is_list', $other_args ) && $other_args['is_list'] == true ) { |
— | — | @@ -226,7 +223,7 @@ |
227 | 224 | if ( $is_mandatory ) { |
228 | 225 | $spanClass .= ' mandatoryFieldSpan'; |
229 | 226 | } |
230 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 227 | + $text = Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
231 | 228 | return $text; |
232 | 229 | } |
233 | 230 | |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_CategoriesInput.php |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | if ( $is_mandatory ) { |
113 | 113 | $spanClass .= ' mandatoryFieldSpan'; |
114 | 114 | } |
115 | | - $text = "\n" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ) . "\n"; |
| 115 | + $text = "\n" . Html::rawElement( 'span', array( 'class' => $spanClass ), $text ) . "\n"; |
116 | 116 | |
117 | 117 | return $text; |
118 | 118 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php |
— | — | @@ -70,17 +70,14 @@ |
71 | 71 | $input_id = "input_$sfgFieldNum"; |
72 | 72 | |
73 | 73 | $radiobutton_attrs = array( |
74 | | - 'type' => 'radio', |
75 | 74 | 'id' => $input_id, |
76 | 75 | 'tabindex' => $sfgTabIndex, |
77 | | - 'name' => $input_name, |
78 | | - 'value' => $possible_value, |
79 | 76 | ); |
80 | 77 | if ( $cur_value == $possible_value ) { |
81 | | - $radiobutton_attrs['checked'] = 'checked'; |
| 78 | + $radiobutton_attrs['checked'] = true; |
82 | 79 | } |
83 | 80 | if ( $is_disabled ) { |
84 | | - $radiobutton_attrs['disabled'] = 'disabled'; |
| 81 | + $radiobutton_attrs['disabled'] = true; |
85 | 82 | } |
86 | 83 | if ( $possible_value === '' ) { // blank/"None" value |
87 | 84 | $label = wfMsg( 'sf_formedit_none' ); |
— | — | @@ -95,9 +92,9 @@ |
96 | 93 | $label = $possible_value; |
97 | 94 | } |
98 | 95 | |
99 | | - $text .= "\t" . Xml::openElement( 'span', $itemAttrs ) . |
100 | | - Xml::element( 'input', $radiobutton_attrs ) . " $label\n" . |
101 | | - Xml::closeElement( 'span' ); |
| 96 | + $text .= "\t" . Html::openElement( 'span', $itemAttrs ) . |
| 97 | + Html::input( $input_name, $possible_value, 'radio', $radiobutton_attrs ) . " $label\n" . |
| 98 | + Html::closeElement( 'span' ); |
102 | 99 | } |
103 | 100 | |
104 | 101 | $spanClass = 'radioButtonSpan'; |
— | — | @@ -125,7 +122,7 @@ |
126 | 123 | 'id' => $spanID, |
127 | 124 | 'class' => $spanClass |
128 | 125 | ); |
129 | | - $text = Xml::tags( 'span', $spanAttrs, $text ); |
| 126 | + $text = Html::rawElement( 'span', $spanAttrs, $text ); |
130 | 127 | |
131 | 128 | return $text; |
132 | 129 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php |
— | — | @@ -139,12 +139,7 @@ |
140 | 140 | $textarea_attrs = $other_args['placeholder']; |
141 | 141 | } |
142 | 142 | |
143 | | - // Bug in Xml::element()? It doesn't close the textarea tag |
144 | | - // properly if the text inside is null - set it to '' instead. |
145 | | - if ( is_null( $cur_value ) ) { |
146 | | - $cur_value = ''; |
147 | | - } |
148 | | - $textarea_input = Xml::element( 'textarea', $textarea_attrs, $cur_value, false ); |
| 143 | + $textarea_input = Html::element( 'textarea', $textarea_attrs, $cur_value ); |
149 | 144 | $text .= $textarea_input; |
150 | 145 | |
151 | 146 | if ( array_key_exists( 'uploadable', $other_args ) && $other_args['uploadable'] == true ) { |
— | — | @@ -160,7 +155,7 @@ |
161 | 156 | if ( $is_mandatory ) { |
162 | 157 | $spanClass .= ' mandatoryFieldSpan'; |
163 | 158 | } |
164 | | - $text = "\n" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 159 | + $text = "\n" . Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
165 | 160 | |
166 | 161 | return $text; |
167 | 162 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_DropdownInput.php |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | } else { |
84 | 84 | $label = $possible_value; |
85 | 85 | } |
86 | | - $innerDropdown .= Xml::element( 'option', $optionAttrs, $label ); |
| 86 | + $innerDropdown .= Html::element( 'option', $optionAttrs, $label ); |
87 | 87 | } |
88 | 88 | $selectAttrs = array( |
89 | 89 | 'id' => $input_id, |
— | — | @@ -93,12 +93,12 @@ |
94 | 94 | if ( $is_disabled ) { |
95 | 95 | $selectAttrs['disabled'] = 'disabled'; |
96 | 96 | } |
97 | | - $text = Xml::tags( 'select', $selectAttrs, $innerDropdown ); |
| 97 | + $text = Html::rawElement( 'select', $selectAttrs, $innerDropdown ); |
98 | 98 | $spanClass = 'inputSpan'; |
99 | 99 | if ( $is_mandatory ) { |
100 | 100 | $spanClass .= ' mandatoryFieldSpan'; |
101 | 101 | } |
102 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 102 | + $text = Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
103 | 103 | return $text; |
104 | 104 | } |
105 | 105 | |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextWithAutocompleteInput.php |
— | — | @@ -145,10 +145,7 @@ |
146 | 146 | } |
147 | 147 | |
148 | 148 | $inputAttrs = array( |
149 | | - 'type' => 'text', |
150 | 149 | 'id' => $input_id, |
151 | | - 'name' => $input_name, |
152 | | - 'value' => $cur_value, |
153 | 150 | 'size' => $size, |
154 | 151 | 'class' => $className, |
155 | 152 | 'tabindex' => $sfgTabIndex, |
— | — | @@ -161,7 +158,7 @@ |
162 | 159 | $inputAttrs['autocompletedatatype'] = $remoteDataType; |
163 | 160 | } |
164 | 161 | if ( $is_disabled ) { |
165 | | - $inputAttrs['disabled'] = 'disabled'; |
| 162 | + $inputAttrs['disabled'] = true; |
166 | 163 | } |
167 | 164 | if ( array_key_exists( 'maxlength', $other_args ) ) { |
168 | 165 | $inputAttrs['maxlength'] = $other_args['maxlength']; |
— | — | @@ -169,7 +166,7 @@ |
170 | 167 | if ( array_key_exists( 'placeholder', $other_args ) ) { |
171 | 168 | $inputAttrs['placeholder'] = $other_args['placeholder']; |
172 | 169 | } |
173 | | - $text = "\n\t" . Xml::element( 'input', $inputAttrs ) . "\n"; |
| 170 | + $text = "\n\t" . Html::input( $input_name, $cur_value, 'text', $inputAttrs ) . "\n"; |
174 | 171 | |
175 | 172 | if ( array_key_exists( 'uploadable', $other_args ) && $other_args['uploadable'] == true ) { |
176 | 173 | if ( array_key_exists( 'default filename', $other_args ) ) { |
— | — | @@ -184,7 +181,7 @@ |
185 | 182 | if ( $is_mandatory ) { |
186 | 183 | $spanClass .= ' mandatoryFieldSpan'; |
187 | 184 | } |
188 | | - $text = "\n" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 185 | + $text = "\n" . Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
189 | 186 | |
190 | 187 | return $text; |
191 | 188 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_ComboBoxInput.php |
— | — | @@ -63,9 +63,9 @@ |
64 | 64 | } |
65 | 65 | $autocompletionSource = str_replace( "'", "\'", $autocompletionSource ); |
66 | 66 | |
67 | | - $optionsText = Xml::element( 'option', array( 'value' => $cur_value ), null, false ) . "\n"; |
| 67 | + $optionsText = Html::element( 'option', array( 'value' => $cur_value ), null, false ) . "\n"; |
68 | 68 | foreach ( $values as $value ) { |
69 | | - $optionsText .= Xml::element( 'option', array( 'value' => $value ), $value ) . "\n"; |
| 69 | + $optionsText .= Html::element( 'option', array( 'value' => $value ), $value ) . "\n"; |
70 | 70 | } |
71 | 71 | |
72 | 72 | $selectAttrs = array( |
— | — | @@ -82,13 +82,13 @@ |
83 | 83 | if ( array_key_exists( 'existing values only', $other_args ) ) { |
84 | 84 | $selectAttrs['existingvaluesonly'] = 'true'; |
85 | 85 | } |
86 | | - $selectText = Xml::tags( 'select', $selectAttrs, $optionsText ); |
| 86 | + $selectText = Html::rawElement( 'select', $selectAttrs, $optionsText ); |
87 | 87 | |
88 | 88 | $divClass = 'ui-widget'; |
89 | 89 | if ( $is_mandatory ) { |
90 | 90 | $divClass .= ' mandatory'; |
91 | 91 | } |
92 | | - $text = Xml::tags( 'div', array( 'class' => $divClass ), $selectText ); |
| 92 | + $text = Html::rawElement( 'div', array( 'class' => $divClass ), $selectText ); |
93 | 93 | return $text; |
94 | 94 | } |
95 | 95 | |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_CategoryInput.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | if ( $is_mandatory ) { |
108 | 108 | $spanClass .= ' mandatoryFieldSpan'; |
109 | 109 | } |
110 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 110 | + $text = Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
111 | 111 | |
112 | 112 | return $text; |
113 | 113 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_DateInput.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | if ( $name == $cur_month || ( $i + 1 ) == $cur_month ) { |
34 | 34 | $optionAttrs['selected'] = 'selected'; |
35 | 35 | } |
36 | | - $optionsText .= Xml::element( 'option', $optionAttrs, $name ); |
| 36 | + $optionsText .= Html::element( 'option', $optionAttrs, $name ); |
37 | 37 | } |
38 | 38 | $selectAttrs = array( |
39 | 39 | 'class' => 'monthInput', |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | if ( $is_disabled ) { |
44 | 44 | $selectAttrs['disabled'] = 'disabled'; |
45 | 45 | } |
46 | | - $text = Xml::tags( 'select', $selectAttrs, $optionsText ); |
| 46 | + $text = Html::rawElement( 'select', $selectAttrs, $optionsText ); |
47 | 47 | return $text; |
48 | 48 | } |
49 | 49 | |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | if ( $is_mandatory ) { |
108 | 108 | $spanClass .= ' mandatoryFieldSpan'; |
109 | 109 | } |
110 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 110 | + $text = Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
111 | 111 | return $text; |
112 | 112 | } |
113 | 113 | |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php |
— | — | @@ -122,17 +122,12 @@ |
123 | 123 | $textarea_attrs['placeholder'] = $other_args['placeholder']; |
124 | 124 | } |
125 | 125 | |
126 | | - // Bug in Xml::element()? It doesn't close the textarea tag |
127 | | - // properly if the text inside is null - set it to '' instead. |
128 | | - if ( is_null( $cur_value ) ) { |
129 | | - $cur_value = ''; |
130 | | - } |
131 | | - $text = Xml::element( 'textarea', $textarea_attrs, $cur_value, false ); |
| 126 | + $text = Html::element( 'textarea', $textarea_attrs, $cur_value ); |
132 | 127 | $spanClass = 'inputSpan'; |
133 | 128 | if ( $is_mandatory ) { |
134 | 129 | $spanClass .= ' mandatoryFieldSpan'; |
135 | 130 | } |
136 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 131 | + $text = Html::rawElement( 'span', array( 'class' => $spanClass ), $text ); |
137 | 132 | |
138 | 133 | return $text; |
139 | 134 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_CheckboxesInput.php |
— | — | @@ -63,11 +63,8 @@ |
64 | 64 | } |
65 | 65 | |
66 | 66 | $checkbox_attrs = array( |
67 | | - 'type' => 'checkbox', |
68 | 67 | 'id' => $input_id, |
69 | 68 | 'tabindex' => $sfgTabIndex, |
70 | | - 'name' => $cur_input_name, |
71 | | - 'value' => $possible_value, |
72 | 69 | 'class' => $checkbox_class, |
73 | 70 | ); |
74 | 71 | if ( in_array( $possible_value, $cur_values ) ) { |
— | — | @@ -76,10 +73,10 @@ |
77 | 74 | if ( $is_disabled ) { |
78 | 75 | $checkbox_attrs['disabled'] = 'disabled'; |
79 | 76 | } |
80 | | - $checkbox_input = Xml::element( 'input', $checkbox_attrs ); |
| 77 | + $checkbox_input = Html::element( $cur_input_name, $possible_value, 'checkbox', $checkbox_attrs ); |
81 | 78 | |
82 | 79 | // Make a span around each checkbox, for CSS purposes. |
83 | | - $text .= ' ' . Xml::tags( 'span', |
| 80 | + $text .= "\t" . Html::rawElement( 'span', |
84 | 81 | array( 'class' => $span_class ), |
85 | 82 | $checkbox_input . ' ' . $label |
86 | 83 | ) . "\n"; |
— | — | @@ -106,7 +103,7 @@ |
107 | 104 | |
108 | 105 | $text .= SFFormUtils::hiddenFieldHTML( $input_name . '[is_list]', 1 ); |
109 | 106 | $outerSpanAttrs = array( 'id' => $outerSpanID, 'class' => $outerSpanClass ); |
110 | | - $text = "\t" . Xml::tags( 'span', $outerSpanAttrs, $text ) . "\n"; |
| 107 | + $text = "\t" . Html::rawElement( 'span', $outerSpanAttrs, $text ) . "\n"; |
111 | 108 | |
112 | 109 | return $text; |
113 | 110 | } |
Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | if ( $watch_this ) { |
232 | 232 | $form_body .= SFFormUtils::hiddenFieldHTML( 'wpWatchthis', null ); |
233 | 233 | } |
234 | | - $text .= Xml::tags( |
| 234 | + $text .= Html::rawElement( |
235 | 235 | 'form', |
236 | 236 | array( |
237 | 237 | 'id' => 'editform', |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | 'href' => $css_file |
348 | 348 | ); |
349 | 349 | if ( !is_null( $parser ) ) { |
350 | | - $parser->getOutput()->addHeadItem( Xml::element( 'link', $link ) ); |
| 350 | + $parser->getOutput()->addHeadItem( Html::element( 'link', $link ) ); |
351 | 351 | } else { |
352 | 352 | $wgOut->addLink( $link ); |
353 | 353 | } |
— | — | @@ -423,9 +423,9 @@ |
424 | 424 | $form_names = SFUtils::getAllForms(); |
425 | 425 | $select_body = "\n"; |
426 | 426 | foreach ( $form_names as $form_name ) { |
427 | | - $select_body .= "\t" . Xml::element( 'option', null, $form_name ) . "\n"; |
| 427 | + $select_body .= "\t" . Html::element( 'option', null, $form_name ) . "\n"; |
428 | 428 | } |
429 | | - return "\t" . Xml::tags( 'label', array( 'for' => 'formSelector' ), $form_label . wfMsg( 'colon-separator' ) ) . "\n" . Xml::tags( 'select', array( 'id' => 'formSelector', 'name' => 'form' ), $select_body ) . "\n"; |
| 429 | + return "\t" . Html::rawElement( 'label', array( 'for' => 'formSelector' ), $form_label . wfMsg( 'colon-separator' ) ) . "\n" . Html::rawElement( 'select', array( 'id' => 'formSelector', 'name' => 'form' ), $select_body ) . "\n"; |
430 | 430 | } |
431 | 431 | |
432 | 432 | /** |
Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | $msg = $msg[0]; |
171 | 171 | } |
172 | 172 | |
173 | | - $wgOut->addHTML( Xml::element( 'p', array( 'class' => 'error' ), wfMsg( $msg, $msgdata ) ) ); |
| 173 | + $wgOut->addHTML( Html::element( 'p', array( 'class' => 'error' ), wfMsg( $msg, $msgdata ) ) ); |
174 | 174 | |
175 | 175 | } |
176 | 176 | |