Index: trunk/extensions/SemanticForms/includes/SF_FormClasses.php |
— | — | @@ -228,8 +228,12 @@ |
229 | 229 | foreach ( $this->fields as $field ) { |
230 | 230 | $text .= $field->creationHTML( $template_num ); |
231 | 231 | } |
232 | | - $text .= ' <p><input type="submit" name="del_' . $template_num . |
233 | | - '" value="' . wfMsg( 'sf_createform_removetemplate' ) . '"></p>' . "\n"; |
| 232 | + $removeTemplateButton = Xml::element( 'input', array( |
| 233 | + 'type' => 'submit', |
| 234 | + 'name' => 'del_' . $template_num, |
| 235 | + 'value' => wfMsg( 'sf_createform_removetemplate' ) |
| 236 | + ) ); |
| 237 | + $text .= "\t" . Xml::tags( 'p', null, $removeTemplateButton ) . "\n"; |
234 | 238 | $text .= " </div>\n"; |
235 | 239 | return $text; |
236 | 240 | } |
— | — | @@ -237,13 +241,16 @@ |
238 | 242 | function createMarkup() { |
239 | 243 | $text = ""; |
240 | 244 | $text .= "{{{for template|" . $this->template_name; |
241 | | - if ( $this->allow_multiple ) |
| 245 | + if ( $this->allow_multiple ) { |
242 | 246 | $text .= "|multiple"; |
243 | | - if ( $this->label != '' ) |
| 247 | + } |
| 248 | + if ( $this->label != '' ) { |
244 | 249 | $text .= "|label=" . $this->label; |
| 250 | + } |
245 | 251 | $text .= "}}}\n"; |
246 | | - // for now, HTML for templates differs for multiple-instance templates; |
247 | | - // this may change if handling of form definitions gets more sophisticated |
| 252 | + // For now, HTML for templates differs for multiple-instance |
| 253 | + // templates; this may change if handling of form definitions |
| 254 | + // gets more sophisticated. |
248 | 255 | if ( ! $this->allow_multiple ) { $text .= "{| class=\"formtable\"\n"; } |
249 | 256 | foreach ( $this->fields as $i => $field ) { |
250 | 257 | $is_last_field = ( $i == count( $this->fields ) - 1 ); |