r45421 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45420‎ | r45421 | r45422 >
Date:18:26, 5 January 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fix to get 'values=' field parameters working for properties of type 'Page'
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormInputs.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.inc
@@ -274,10 +274,13 @@
275275 }
276276
277277 function textInputWithAutocompleteHTML($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args) {
278 - // if 'no autocomplete' was specified, call the regular text entry instead
 278+ // if 'no autocomplete' was specified, print a regular text entry instead
279279 if (array_key_exists('no autocomplete', $other_args) &&
280280 $other_args['no autocomplete'] == true)
281281 return SFFormInputs::textEntryHTML($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args);
 282+ // if a set of values was specified, print a dropdown instead
 283+ if (array_key_exists('possible_values', $other_args) && $other_args['possible_values'] != null)
 284+ return SFFormInputs::dropdownHTML($cur_value, $input_name, $is_mandatory, $is_disabled, $other_args);
282285
283286 global $sfgTabIndex, $sfgFieldNum;
284287

Status & tagging log