Index: trunk/extensions/SemanticForms/specials/SF_CreateCategory.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | <form action="" method="get"> |
80 | 80 | |
81 | 81 | END; |
82 | | - $text .= SFFormUtils::hiddenFieldHTML( 'title', "$special_namespace:CreateCategory" ); |
| 82 | + $text .= "\t" . Html::hidden( 'title', "$special_namespace:CreateCategory" ) . "\n"; |
83 | 83 | $firstRow = wfMsg( 'sf_createcategory_name' ) . ' ' . |
84 | 84 | Html::input( 'category_name', null, 'text', |
85 | 85 | array( 'size' => 25 ) ) . "\n"; |
Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -108,10 +108,10 @@ |
109 | 109 | $text .= SFUtils::formDropdownHTML(); |
110 | 110 | |
111 | 111 | $text .= "\t</p>\n"; |
112 | | - $text .= SFFormUtils::hiddenFieldHTML( 'namespace', $target_namespace ); |
113 | | - $text .= SFFormUtils::hiddenFieldHTML( 'super_page', $super_page ); |
114 | | - $text .= SFFormUtils::hiddenFieldHTML( 'params', $params ); |
115 | | - $text .= "\t" . Html::input( null, wfMsg( 'sf_formstart_createoredit' ), 'submit' ) . "\n"; |
| 112 | + $text .= Html::hidden( 'namespace', $target_namespace ); |
| 113 | + $text .= Html::hidden( 'super_page', $super_page ); |
| 114 | + $text .= Html::hidden( 'params', $params ); |
| 115 | + $text .= "\n\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 |
— | — | @@ -218,8 +218,8 @@ |
219 | 219 | |
220 | 220 | $text = "\t" . '<form action="" method="post">' . "\n"; |
221 | 221 | // Set 'title' field, in case there's no URL niceness |
222 | | - $text .= SFFormUtils::hiddenFieldHTML( 'title', $this->getTitle()->getPrefixedText() ); |
223 | | - $text .= "\t<p>" . wfMsg( 'sf_createform_nameinput' ) . ' ' . wfMsg( 'sf_createform_nameinputdesc' ) . ' <input size=25 name="form_name" value="' . $form_name . '" />'; |
| 222 | + $text .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); |
| 223 | + $text .= "\n\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 | 225 | $text .= "\t" . Html::element( 'font', array( 'color' => 'red' ), $form_name_error_str ); |
226 | 226 | $text .= "</p>\n"; |
Index: trunk/extensions/SemanticForms/specials/SF_CreateClass.php |
— | — | @@ -214,7 +214,7 @@ |
215 | 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 | | - $text .= SFFormUtils::hiddenFieldHTML( 'title', SFUtils::titleURLString( $cc ) ); |
| 218 | + $text .= Html::hidden( 'title', SFUtils::titleURLString( $cc ) ); |
219 | 219 | $text .= Html::element( 'input', |
220 | 220 | array( |
221 | 221 | 'type' => 'submit', |
Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | <form id="sfForm" name="createbox" action="$action" method="post" class="createbox"> |
121 | 121 | |
122 | 122 | END; |
123 | | - $fullFormText .= SFFormUtils::hiddenFieldHTML( 'query', 'true' ); |
| 123 | + $fullFormText .= Html::hidden( 'query', 'true' ); |
124 | 124 | $fullFormText .= $form_text; |
125 | 125 | } |
126 | 126 | |
Index: trunk/extensions/SemanticForms/specials/SF_CreateTemplate.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | |
187 | 187 | $text .= ' <form id="createTemplateForm" action="" method="post">' . "\n"; |
188 | 188 | // Set 'title' field, in case there's no URL niceness |
189 | | - $text .= SFFormUtils::hiddenFieldHTML( 'title', $this->getTitle()->getPrefixedText() ); |
| 189 | + $text .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
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"; |
Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -951,7 +951,7 @@ |
952 | 952 | // the page, using <free_text> tags - once all the free text |
953 | 953 | // is known (at the end), it will get substituted in. |
954 | 954 | if ( $is_hidden ) { |
955 | | - $new_text = SFFormUtils::hiddenFieldHTML( 'free_text', '!free_text!' ); |
| 955 | + $new_text = Html::hidden( 'free_text', '!free_text!' ); |
956 | 956 | } else { |
957 | 957 | $sfgTabIndex++; |
958 | 958 | $sfgFieldNum++; |
— | — | @@ -1228,9 +1228,9 @@ |
1229 | 1229 | // reason don't submit their value. |
1230 | 1230 | if ( $form_field->isDisabled() ) { |
1231 | 1231 | if ( $field_name == 'free text' || $field_name == '<freetext>' ) { |
1232 | | - $new_text .= SFFormUtils::hiddenFieldHTML( 'free_text', '!free_text!' ); |
| 1232 | + $new_text .= Html::hidden( 'free_text', '!free_text!' ); |
1233 | 1233 | } else { |
1234 | | - $new_text .= SFFormUtils::hiddenFieldHTML( $input_name, $cur_value ); |
| 1234 | + $new_text .= Html::hidden( $input_name, $cur_value ); |
1235 | 1235 | } |
1236 | 1236 | } |
1237 | 1237 | |
— | — | @@ -1463,7 +1463,7 @@ |
1464 | 1464 | // if it wasn't included in the form definition, add the |
1465 | 1465 | // 'free text' input as a hidden field at the bottom |
1466 | 1466 | if ( ! $free_text_was_included ) { |
1467 | | - $form_text .= SFFormUtils::hiddenFieldHTML( 'free_text', '!free_text!' ); |
| 1467 | + $form_text .= Html::hidden( 'free_text', '!free_text!' ); |
1468 | 1468 | } |
1469 | 1469 | // Get free text, and add to page data, as well as retroactively |
1470 | 1470 | // inserting it into the form. |
— | — | @@ -1474,7 +1474,7 @@ |
1475 | 1475 | if ( $form_is_partial ) { |
1476 | 1476 | if ( !$wgRequest->getCheck( 'partial' ) ) { |
1477 | 1477 | $free_text = $original_page_content; |
1478 | | - $form_text .= SFFormUtils::hiddenFieldHTML( 'partial', 1 ); |
| 1478 | + $form_text .= Html::hidden( 'partial', 1 ); |
1479 | 1479 | } else { |
1480 | 1480 | $free_text = null; |
1481 | 1481 | $existing_page_content = preg_replace( array( '/�\{/m', '/\}�/m' ), |
— | — | @@ -1539,8 +1539,8 @@ |
1540 | 1540 | $page_article = new Article( $this->mPageTitle, 0 ); |
1541 | 1541 | |
1542 | 1542 | if ( !$is_query ) { |
1543 | | - $form_text .= SFFormUtils::hiddenFieldHTML( 'wpStarttime', wfTimestampNow() ); |
1544 | | - $form_text .= SFFormUtils::hiddenFieldHTML( 'wpEdittime', $page_article->getTimestamp() ); |
| 1543 | + $form_text .= Html::hidden( 'wpStarttime', wfTimestampNow() ); |
| 1544 | + $form_text .= Html::hidden( 'wpEdittime', $page_article->getTimestamp() ); |
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | $form_text .= "\t</form>\n"; |
— | — | @@ -1599,7 +1599,7 @@ |
1600 | 1600 | $template_field = $form_field->getTemplateField(); |
1601 | 1601 | |
1602 | 1602 | if ( $form_field->isHidden() ) { |
1603 | | - $text = SFFormUtils::hiddenFieldHTML( $form_field->getInputName(), $cur_value ); |
| 1603 | + $text = Html::hidden( $form_field->getInputName(), $cur_value ); |
1604 | 1604 | } elseif ( $form_field->getInputType() !== '' && |
1605 | 1605 | array_key_exists( $form_field->getInputType(), $this->mInputTypeHooks ) && |
1606 | 1606 | $this->mInputTypeHooks[$form_field->getInputType()] != null ) { |
Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php |
— | — | @@ -41,10 +41,6 @@ |
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | |
45 | | - static function hiddenFieldHTML( $input_name, $cur_value ) { |
46 | | - return "\t" . Html::hidden( $input_name, $cur_value ) . "\n"; |
47 | | - } |
48 | | - |
49 | 45 | /** |
50 | 46 | * Add a hidden input for each field in the template call that's |
51 | 47 | * not handled by the form itself |
— | — | @@ -54,7 +50,7 @@ |
55 | 51 | foreach ( $templateContents as $key => $value ) { |
56 | 52 | if ( !is_null( $key ) && !is_numeric( $key ) ) { |
57 | 53 | $key = urlencode( $key ); |
58 | | - $text .= self::hiddenFieldHTML( '_unhandled_' . $templateName . '_' . $key, $value ); |
| 54 | + $text .= Html::hidden( '_unhandled_' . $templateName . '_' . $key, $value ); |
59 | 55 | } |
60 | 56 | } |
61 | 57 | return $text; |
Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -294,12 +294,12 @@ |
295 | 295 | // (i.e., it's in the default URL style), add in the title as a |
296 | 296 | // hidden value |
297 | 297 | if ( ( $pos = strpos( $fs_url, "title=" ) ) > - 1 ) { |
298 | | - $str .= SFFormUtils::hiddenFieldHTML( "title", urldecode( substr( $fs_url, $pos + 6 ) ) ); |
| 298 | + $str .= Html::hidden( "title", urldecode( substr( $fs_url, $pos + 6 ) ) ); |
299 | 299 | } |
300 | 300 | if ( $inFormName == '' ) { |
301 | 301 | $str .= SFUtils::formDropdownHTML(); |
302 | 302 | } else { |
303 | | - $str .= SFFormUtils::hiddenFieldHTML( "form", $inFormName ); |
| 303 | + $str .= Html::hidden( "form", $inFormName ); |
304 | 304 | } |
305 | 305 | |
306 | 306 | // Recreate the passed-in query string as a set of hidden variables. |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | foreach ( $query_components as $query_component ) { |
313 | 313 | $var_and_val = explode( '=', $query_component, 2 ); |
314 | 314 | if ( count( $var_and_val ) == 2 ) { |
315 | | - $str .= SFFormUtils::hiddenFieldHTML( urldecode( $var_and_val[0] ), urldecode( $var_and_val[1] ) ); |
| 315 | + $str .= Html::hidden( urldecode( $var_and_val[0] ), urldecode( $var_and_val[1] ) ); |
316 | 316 | } |
317 | 317 | } |
318 | 318 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_ListBoxInput.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | $selectAttrs['disabled'] = 'disabled'; |
71 | 71 | } |
72 | 72 | $text = Html::rawElement( 'select', $selectAttrs, $optionsText ); |
73 | | - $text .= SFFormUtils::hiddenFieldHTML( $input_name . '[is_list]', 1 ); |
| 73 | + $text .= Html::hidden( $input_name . '[is_list]', 1 ); |
74 | 74 | if ( $is_mandatory ) { |
75 | 75 | $text = Html::rawElement( 'span', array( 'class' => 'inputSpan mandatoryFieldSpan' ), $text ); |
76 | 76 | } |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_CategoriesInput.php |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | |
113 | 113 | $text = '<div style="overflow: auto; padding: 5px; border: 1px #aaaaaa solid; max-height: ' . $height . 'px; width: ' . $width . 'px;">' . $tree . '</div>'; |
114 | 114 | |
115 | | - $text .= SFFormUtils::hiddenFieldHTML( $input_name . '[is_list]', 1 ); |
| 115 | + $text .= Html::hidden( $input_name . '[is_list]', 1 ); |
116 | 116 | $spanClass = 'checkboxesSpan'; |
117 | 117 | if ( $is_mandatory ) { |
118 | 118 | $spanClass .= ' mandatoryFieldSpan'; |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_CheckboxesInput.php |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
105 | | - $text .= SFFormUtils::hiddenFieldHTML( $input_name . '[is_list]', 1 ); |
| 105 | + $text .= Html::hidden( $input_name . '[is_list]', 1 ); |
106 | 106 | $outerSpanAttrs = array( 'id' => $outerSpanID, 'class' => $outerSpanClass ); |
107 | 107 | $text = "\t" . Html::rawElement( 'span', $outerSpanAttrs, $text ) . "\n"; |
108 | 108 | |
Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -217,18 +217,18 @@ |
218 | 218 | <p style="position: absolute; left: 45%; top: 45%;"><img src="$sfgScriptPath/skins/loading.gif" /></p> |
219 | 219 | |
220 | 220 | END; |
221 | | - $form_body = SFFormUtils::hiddenFieldHTML( 'wpTextbox1', $page_contents ); |
222 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpSummary', $edit_summary ); |
223 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpStarttime', $start_time ); |
224 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpEdittime', $edit_time ); |
225 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpEditToken', $wgUser->isLoggedIn() ? $wgUser->editToken() : EDIT_TOKEN_SUFFIX ); |
226 | | - $form_body .= SFFormUtils::hiddenFieldHTML( $action, null ); |
| 221 | + $form_body = Html::hidden( 'wpTextbox1', $page_contents ); |
| 222 | + $form_body .= Html::hidden( 'wpSummary', $edit_summary ); |
| 223 | + $form_body .= Html::hidden( 'wpStarttime', $start_time ); |
| 224 | + $form_body .= Html::hidden( 'wpEdittime', $edit_time ); |
| 225 | + $form_body .= Html::hidden( 'wpEditToken', $wgUser->isLoggedIn() ? $wgUser->editToken() : EDIT_TOKEN_SUFFIX ); |
| 226 | + $form_body .= Html::hidden( $action, null ); |
227 | 227 | |
228 | 228 | if ( $is_minor_edit ) { |
229 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpMinoredit' , null ); |
| 229 | + $form_body .= Html::hidden( 'wpMinoredit' , null ); |
230 | 230 | } |
231 | 231 | if ( $watch_this ) { |
232 | | - $form_body .= SFFormUtils::hiddenFieldHTML( 'wpWatchthis', null ); |
| 232 | + $form_body .= Html::hidden( 'wpWatchthis', null ); |
233 | 233 | } |
234 | 234 | $text .= Html::rawElement( |
235 | 235 | 'form', |
— | — | @@ -974,7 +974,7 @@ |
975 | 975 | foreach ( $query_components as $query_component ) { |
976 | 976 | $var_and_val = explode( '=', $query_component, 2 ); |
977 | 977 | if ( count( $var_and_val ) == 2 ) { |
978 | | - $hidden_inputs .= SFFormUtils::hiddenFieldHTML( urldecode( $var_and_val[0] ), urldecode( $var_and_val[1] ) ); |
| 978 | + $hidden_inputs .= Html::hidden( urldecode( $var_and_val[0] ), urldecode( $var_and_val[1] ) ); |
979 | 979 | } |
980 | 980 | } |
981 | 981 | } else { |