Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -31,7 +31,6 @@ |
32 | 32 | global $wgCapitalLinks; |
33 | 33 | return $wgCapitalLinks; |
34 | 34 | } |
35 | | - |
36 | 35 | } |
37 | 36 | |
38 | 37 | /** |
— | — | @@ -112,7 +111,6 @@ |
113 | 112 | return array_unique( $values ); |
114 | 113 | } |
115 | 114 | } |
116 | | - |
117 | 115 | /** |
118 | 116 | * Helper function - gets names of categories for a page; |
119 | 117 | * based on Title::getParentCategories(), but simpler |
— | — | @@ -257,12 +255,12 @@ |
258 | 256 | $obj = $pageSchemaObj->getObject('Form'); |
259 | 257 | $form_array = $obj['sf']; |
260 | 258 | |
261 | | - $form_html_text .= '<p><legend>semanticForms:Form</legend> </p> |
| 259 | + $form_html_text .= '<fieldset style="background: #00FF00;"><p><legend>Form</legend> </p> |
262 | 260 | <p> Name: <input size="15" name="sf_form_name_starter" value= "'.$form_array['name'].'" ></p> |
263 | | - <p> PageNameFormula: <input size="20" name="sf_page_name_formula_starter" value="'.$form_array['PageNameFormula'].'" ></p> |
264 | | - <p> CreateTite: <input size="25" name="sf_create_title_starter" value="'.$form_array['CreateTite'].'" ></p> |
265 | | - <p> EditTitle: <input size="25" name="sf_edit_title_starter" value="'.$form_array['EditTitle'].'" ></p> |
266 | | - '; |
| 261 | + <p> Page name formula: <input size="20" name="sf_page_name_formula_starter" value="'.$form_array['PageNameFormula'].'" ></p> |
| 262 | + <p> Create tite: <input size="25" name="sf_create_title_starter" value="'.$form_array['CreateTite'].'" ></p> |
| 263 | + <p> Edit title: <input size="25" name="sf_edit_title_starter" value="'.$form_array['EditTitle'].'" ></p> |
| 264 | + </fieldset>'; |
267 | 265 | foreach ( $template_all as $template ) { |
268 | 266 | $field_all = $template->getFields(); |
269 | 267 | $field_count = 0; //counts the number of fields |
— | — | @@ -271,8 +269,8 @@ |
272 | 270 | $field_count++; |
273 | 271 | $sf_array = $field->getObject('FormInput');//this returns an array with property values filled |
274 | 272 | $form_input_array = $sf_array['sf']; |
275 | | - $html_text = '<p><legend>semanticForms:FormInput</legend> </p> |
276 | | - <p> Input-Type: <input size="15" name="sf_input_type_starter" value='.$form_input_array['InputType'].'></p> |
| 273 | + $html_text = '<fieldset style="background: #00FF00;"><p><legend>Form input</legend> </p> |
| 274 | + <p> Input type: <input size="15" name="sf_input_type_starter" value='.$form_input_array['InputType'].'></p> |
277 | 275 | <p>Parameter name and its value as a key=value pair,seperated by comma (if a value contains a comma, replace it with "\,"): For eg. Size=20,mandatory=true</p>'; |
278 | 276 | $param_value_str= ""; |
279 | 277 | foreach($form_input_array as $param => $value){ |
— | — | @@ -284,7 +282,7 @@ |
285 | 283 | } |
286 | 284 | } |
287 | 285 | } |
288 | | - $html_text .= '<p><input name="sf_key_values_starter" size="80" value="'.$param_value_str.'" ></p>'; |
| 286 | + $html_text .= '<p><input name="sf_key_values_starter" size="80" value="'.$param_value_str.'" ></fieldset></p>'; |
289 | 287 | $html_text_array[] = $html_text; |
290 | 288 | } |
291 | 289 | } |
— | — | @@ -295,18 +293,18 @@ |
296 | 294 | public static function getHtmlTextForPS( &$js_extensions ,&$text_extensions ) { |
297 | 295 | $html_text = ""; |
298 | 296 | $form_text = "" ; |
299 | | - |
300 | | - $form_text .= '<p><legend>semanticForms:Form</legend> </p> |
| 297 | + //'<fieldset style="background: #00FF00;"><p><legend>Form input</legend> </p> |
| 298 | + $form_text .= '<fieldset style="background: #00FF00;"><p><legend>Form</legend> </p> |
301 | 299 | <p> Name: <input size="15" name="sf_form_name_starter"></p> |
302 | | - <p> PageNameFormula: <input size="20" name="sf_page_name_formula_starter"></p> |
303 | | - <p> CreateTite: <input size="25" name="sf_create_title_starter"></p> |
304 | | - <p> EditTitle: <input size="25" name="sf_edit_title_starter"></p> |
305 | | - '; |
| 300 | + <p> Page name formula: <input size="20" name="sf_page_name_formula_starter"></p> |
| 301 | + <p> Create tite: <input size="25" name="sf_create_title_starter"></p> |
| 302 | + <p> Edit title: <input size="25" name="sf_edit_title_starter"></p> |
| 303 | + </fieldset>'; |
306 | 304 | |
307 | | - $html_text .= '<p><legend>semanticForms:FormInput</legend> </p> |
308 | | - <p> Input-Type: <input size="15" name="sf_input_type_starter"></p> |
| 305 | + $html_text .= '<fieldset style="background: #00FF00;"> <p><legend>Form input</legend> </p> |
| 306 | + <p> Input type: <input size="15" name="sf_input_type_starter"></p> |
309 | 307 | <p>Parameter name and its value as a key=value pair,seperated by comma (if a value contains a comma, replace it with "\,"): For eg. Size=20,mandatory=true</p> |
310 | | - <p><input value="" name="sf_key_values_starter" size="80"></p>'; |
| 308 | + <p><input value="" name="sf_key_values_starter" size="80"></p></fieldset>'; |
311 | 309 | |
312 | 310 | $text_extensions['sf'] = $html_text; |
313 | 311 | $text_extensions['sf_form'] = $form_text; |