Index: trunk/extensions/SemanticForms/specials/SF_CreateCategory.php |
— | — | @@ -54,8 +54,6 @@ |
55 | 55 | $default_form = $wgRequest->getVal( 'default_form' ); |
56 | 56 | $parent_category = $wgRequest->getVal( 'parent_category' ); |
57 | 57 | |
58 | | - $save_button_text = wfMsg( 'savearticle' ); |
59 | | - $preview_button_text = wfMsg( 'preview' ); |
60 | 58 | $category_name_error_str = ''; |
61 | 59 | $save_page = $wgRequest->getCheck( 'wpSave' ); |
62 | 60 | $preview_page = $wgRequest->getCheck( 'wpPreview' ); |
— | — | @@ -84,8 +82,11 @@ |
85 | 83 | $form_label = wfMsg( 'sf_createcategory_defaultform' ); |
86 | 84 | $text = <<<END |
87 | 85 | <form action="" method="get"> |
88 | | - <input type="hidden" name="title" value="$special_namespace:CreateCategory"> |
89 | | - <p>$name_label <input size="25" name="category_name" value=""> |
| 86 | + |
| 87 | +END; |
| 88 | + $text .= "\t" . Xml::hidden( 'title', "$special_namespace:CreateCategory" ) . "\n"; |
| 89 | + $text .= <<<END |
| 90 | + <p>$name_label <input size="25" name="category_name" value="" /> |
90 | 91 | <span style="color: red;">$category_name_error_str</span> |
91 | 92 | $form_label |
92 | 93 | <select id="form_dropdown" name="default_form"> |
— | — | @@ -93,7 +94,7 @@ |
94 | 95 | |
95 | 96 | END; |
96 | 97 | foreach ( $all_forms as $form ) { |
97 | | - $text .= ' ' . Xml::element( 'option', null, $form ) . "\n"; |
| 98 | + $text .= "\t" . Xml::element( 'option', null, $form ) . "\n"; |
98 | 99 | } |
99 | 100 | |
100 | 101 | $subcategory_label = wfMsg( 'sf_createcategory_makesubcategory' ); |
— | — | @@ -109,14 +110,13 @@ |
110 | 111 | END; |
111 | 112 | foreach ( $categories as $category ) { |
112 | 113 | $category = str_replace( '_', ' ', $category ); |
113 | | - $text .= " " . Xml::element( 'option', null, $category ) . "\n"; |
| 114 | + $text .= "\t" . Xml::element( 'option', null, $category ) . "\n"; |
114 | 115 | } |
| 116 | + $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"; |
115 | 120 | $text .= <<<END |
116 | | - </select> |
117 | | - <div class="editButtons"> |
118 | | - <input type="submit" id="wpSave" name="wpSave" value="$save_button_text"> |
119 | | - <input type="submit" id="wpPreview" name="wpPreview" value="$preview_button_text"> |
120 | | - </div> |
121 | 121 | <br /><hr /<br /> |
122 | 122 | |
123 | 123 | END; |