r60828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60827‎ | r60828 | r60829 >
Date:03:29, 8 January 2010
Author:yaron
Status:deferred
Tags:
Comment:
Switched order of 'if' clauses, to improve handling if there's a conflict between template and form
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc
@@ -924,13 +924,13 @@
925925 } else {
926926 $sfgJSValidationCalls[] = "validate_mandatory_field(\"input_$sfgFieldNum\", \"info_$sfgFieldNum\")";
927927 }
928 - } elseif (($form_field->template_field->is_list && $form_field->template_field->field_type == 'enumeration' && $input_type != 'listbox') || ($input_type == 'checkboxes')) {
929 - $sfgJSValidationCalls[] = "validate_mandatory_checkboxes('$input_id', '$info_id')";
930928 } elseif ($input_type == 'radiobutton' || $input_type == 'category') {
931929 // only add this if there's a "None" option
932930 if (empty($default_value)) {
933931 $sfgJSValidationCalls[] = "validate_mandatory_radiobutton('$input_id', '$info_id')";
934932 }
 933+ } elseif (($form_field->template_field->is_list && $form_field->template_field->field_type == 'enumeration' && $input_type != 'listbox') || ($input_type == 'checkboxes')) {
 934+ $sfgJSValidationCalls[] = "validate_mandatory_checkboxes('$input_id', '$info_id')";
935935 } else {
936936 $sfgJSValidationCalls[] = "validate_mandatory_field('$input_id', '$info_id')";
937937 }

Status & tagging log