Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | } |
87 | 87 | |
88 | 88 | if ( ( ! $form_title || ! $form_title->exists() ) && ( $form_name != '' ) ) { |
89 | | - $text = '<p>' . htmlspecialchars( wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . ".</p>\n"; |
| 89 | + $text = Xml::element( 'p', null, wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
90 | 90 | } else { |
91 | 91 | if ( $form_name == '' ) { |
92 | 92 | $description = htmlspecialchars( wfMsg( 'sf_formstart_noform_docu', $form_name ) ); |
— | — | @@ -94,11 +94,10 @@ |
95 | 95 | $description = htmlspecialchars( wfMsg( 'sf_formstart_docu', $form_name ) ); |
96 | 96 | } |
97 | 97 | |
98 | | - $button_text = htmlspecialchars( wfMsg( 'sf_formstart_createoredit' ) ); |
99 | 98 | $text = <<<END |
100 | 99 | <form action="" method="post"> |
101 | 100 | <p>$description</p> |
102 | | - <p><input type="text" size="40" name="page_name"> |
| 101 | + <p><input type="text" size="40" name="page_name" /> |
103 | 102 | |
104 | 103 | END; |
105 | 104 | // If no form was specified, display a dropdown letting |
— | — | @@ -106,19 +105,12 @@ |
107 | 106 | if ( $form_name == '' ) |
108 | 107 | $text .= SFUtils::formDropdownHTML(); |
109 | 108 | |
110 | | - $hidden_target_namespace = htmlspecialchars( $target_namespace ); |
111 | | - $hidden_super_page = htmlspecialchars( $super_page ); |
112 | | - $hidden_params = htmlspecialchars( $params ); |
113 | | - |
114 | | - $text .= <<<END |
115 | | - </p> |
116 | | - <input type="hidden" name="namespace" value="$hidden_target_namespace"> |
117 | | - <input type="hidden" name="super_page" value="$hidden_super_page"> |
118 | | - <input type="hidden" name="params" value="$hidden_params"> |
119 | | - <input type="Submit" value="$button_text"> |
120 | | - </form> |
121 | | - |
122 | | -END; |
| 109 | + $text .= "\t</p>\n"; |
| 110 | + $text .= "\t" . Xml::hidden( 'namespace', $target_namespace ) . "\n"; |
| 111 | + $text .= "\t" . Xml::hidden( 'super_page', $super_page ) . "\n"; |
| 112 | + $text .= "\t" . Xml::hidden( 'params', $params ) . "\n"; |
| 113 | + $text .= "\t" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'sf_formstart_createoredit' ) ) ) . "\n"; |
| 114 | + $text .= "\t</form>\n"; |
123 | 115 | } |
124 | 116 | $wgOut->addHTML( $text ); |
125 | 117 | } |