Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | SpecialPage::addPage( new SpecialPage('CreateForm','',true,'doSpecialCreateForm',false) ); |
17 | 17 | |
18 | 18 | function doSpecialCreateForm() { |
19 | | - global $wgOut, $wgRequest; |
| 19 | + global $wgOut, $wgRequest, $wgUser; |
20 | 20 | $fname = "CreateForm::doSpecialCreateForm()"; |
21 | 21 | $db =& wfGetDB( DB_SLAVE ); |
22 | 22 | |
— | — | @@ -119,6 +119,8 @@ |
120 | 120 | </script> |
121 | 121 | |
122 | 122 | END; |
| 123 | + $wgOut->addHTML($text); |
| 124 | + return; |
123 | 125 | } |
124 | 126 | } |
125 | 127 | |
— | — | @@ -126,7 +128,6 @@ |
127 | 129 | // set 'title' field, in case there's no URL niceness |
128 | 130 | $text .= ' <input type="hidden" name="title" value="Special:CreateForm">' . "\n"; |
129 | 131 | $text .= ' <p>' . wfMsg('sf_createform_nameinput') . ' <input size=25 name="form_name" value="' . $form_name . '"> <font color="red">' . $form_name_error_str . '</font></p>' . "\n"; |
130 | | - $text .= " <br />\n"; |
131 | 132 | |
132 | 133 | $text .= $form->creationHTML(); |
133 | 134 | |
— | — | @@ -148,6 +149,9 @@ |
149 | 150 | $final_index = count($form_templates); |
150 | 151 | $preview_button_text = wfMsg('preview'); |
151 | 152 | $add_button_text = wfMsg('sf_createform_add'); |
| 153 | + $sk = $wgUser->getSkin(); |
| 154 | + $ct = SpecialPage::getPage('CreateTemplate'); |
| 155 | + $create_template_link = $sk->makeKnownLinkObj($ct->getTitle(), $ct->getDescription()); |
152 | 156 | $text .= ' <option value="' . $final_index . '" selected="selected">' . |
153 | 157 | wfMsg('sf_createform_atend') . "</option>\n"; |
154 | 158 | $text .=<<<END |
— | — | @@ -156,9 +160,12 @@ |
157 | 161 | </p> |
158 | 162 | <p><input type="submit" name="preview" value="$preview_button_text"></p> |
159 | 163 | </form> |
| 164 | + <br /><hr /<br /> |
| 165 | + <p>$create_template_link.</p> |
160 | 166 | |
161 | 167 | END; |
162 | 168 | |
| 169 | + |
163 | 170 | $wgOut->addLink( array( |
164 | 171 | 'rel' => 'stylesheet', |
165 | 172 | 'type' => 'text/css', |