Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | } |
318 | 318 | // handle an end to a field and/or template declaration |
319 | 319 | $template_ended = ($uncompleted_curly_brackets == 0 && $uncompleted_square_brackets == 0); |
320 | | - $field_ended = ($c == '|' && $uncompleted_square_brackets == 0); |
| 320 | + $field_ended = ($c == '|' && $uncompleted_square_brackets == 0 && $uncompleted_curly_brackets <= 2); |
321 | 321 | if ($template_ended || $field_ended) { |
322 | 322 | // if this was the last character in the template, remove |
323 | 323 | // the closing curly brackets |
— | — | @@ -759,7 +759,11 @@ |
760 | 760 | } |
761 | 761 | } else { |
762 | 762 | if ($allow_multiple) { |
763 | | - $sfgJSValidationCalls[] = "validate_multiple_mandatory_fields($sfgFieldNum)"; |
| 763 | + if ($all_instances_printed) { |
| 764 | + $sfgJSValidationCalls[] = "validate_multiple_mandatory_fields($sfgFieldNum)"; |
| 765 | + } else { |
| 766 | + $sfgJSValidationCalls[] = "validate_mandatory_field(\"input_$sfgFieldNum\", \"info_$sfgFieldNum\")"; |
| 767 | + } |
764 | 768 | } elseif (($form_field->template_field->is_list && $form_field->template_field->field_type == 'enumeration' && $input_type != 'listbox') || ($input_type == 'checkboxes')) { |
765 | 769 | $sfgJSValidationCalls[] = "validate_mandatory_checkboxes('$input_id', '$info_id')"; |
766 | 770 | // if it's not a radiobutton... |
— | — | @@ -1148,12 +1152,6 @@ |
1149 | 1153 | // first, so that if there's a conflict they'll be overridden |
1150 | 1154 | $funcArgs[] = array_merge($default_args, $other_args); |
1151 | 1155 | list($text, $javascript_text) = call_user_func_array($hook_values[0], $funcArgs); |
1152 | | - // escape out here if user doesn't have SMW installed |
1153 | | - } elseif ($smwgContLang == null) { |
1154 | | - $size = $template_field->field_args['size']; |
1155 | | - if ($size == null) $size = 35; |
1156 | | - $field_args = array('size' => $size); |
1157 | | - list($text, $javascript_text) = SFFormInputs::textEntryHTML($cur_value, $form_field->input_name, $form_field->is_mandatory, $form_field->is_disabled, $field_args); |
1158 | 1156 | } else { // input type not defined in form |
1159 | 1157 | $field_type = $template_field->field_type; |
1160 | 1158 | $is_list = ($form_field->is_list || $template_field->is_list); |