r94645 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94644‎ | r94645 | r94646 >
Date:15:31, 16 August 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
adding some cosmetic changes
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_Utils.php
@@ -31,7 +31,6 @@
3232 global $wgCapitalLinks;
3333 return $wgCapitalLinks;
3434 }
35 -
3635 }
3736
3837 /**
@@ -112,7 +111,6 @@
113112 return array_unique( $values );
114113 }
115114 }
116 -
117115 /**
118116 * Helper function - gets names of categories for a page;
119117 * based on Title::getParentCategories(), but simpler
@@ -257,12 +255,12 @@
258256 $obj = $pageSchemaObj->getObject('Form');
259257 $form_array = $obj['sf'];
260258
261 - $form_html_text .= '<p><legend>semanticForms:Form</legend> </p>
 259+ $form_html_text .= '<fieldset style="background: #00FF00;"><p><legend>Form</legend> </p>
262260 <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>';
267265 foreach ( $template_all as $template ) {
268266 $field_all = $template->getFields();
269267 $field_count = 0; //counts the number of fields
@@ -271,8 +269,8 @@
272270 $field_count++;
273271 $sf_array = $field->getObject('FormInput');//this returns an array with property values filled
274272 $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>
277275 <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>';
278276 $param_value_str= "";
279277 foreach($form_input_array as $param => $value){
@@ -284,7 +282,7 @@
285283 }
286284 }
287285 }
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>';
289287 $html_text_array[] = $html_text;
290288 }
291289 }
@@ -295,18 +293,18 @@
296294 public static function getHtmlTextForPS( &$js_extensions ,&$text_extensions ) {
297295 $html_text = "";
298296 $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>
301299 <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>';
306304
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>
309307 <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>';
311309
312310 $text_extensions['sf'] = $html_text;
313311 $text_extensions['sf_form'] = $form_text;