Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc |
— | — | @@ -58,6 +58,7 @@ |
59 | 59 | $this->setInputTypeHook('date', array('SFFormInputs', 'dateEntryHTML'), array()); |
60 | 60 | $this->setInputTypeHook('datetime', array('SFFormInputs', 'dateTimeEntryHTML'), array('include_timezone' => false)); |
61 | 61 | $this->setInputTypeHook('datetime with timezone', array('SFFormInputs', 'dateTimeEntryHTML'), array('include_timezone' => true)); |
| 62 | + $this->setInputTypeHook('year', array('SFFormInputs', 'textEntryHTML'), array('size' => 4)); |
62 | 63 | $this->setInputTypeHook('checkbox', array('SFFormInputs', 'checkboxHTML'), array()); |
63 | 64 | $this->setInputTypeHook('radiobutton', array('SFFormInputs', 'radioButtonHTML'), array()); |
64 | 65 | $this->setInputTypeHook('checkboxes', array('SFFormInputs', 'checkboxesHTML'), array()); |
— | — | @@ -453,6 +454,10 @@ |
454 | 455 | } |
455 | 456 | } elseif ($sub_components[0] == 'values') { |
456 | 457 | $possible_values = explode(',', $sub_components[1]); |
| 458 | + } elseif ($sub_components[0] == 'values from category') { |
| 459 | + $possible_values = SFAutocompleteUtils::getAllPagesForCategory($sub_components[1], 10); |
| 460 | + } elseif ($sub_components[0] == 'values from concept') { |
| 461 | + $possible_values = SFAutocompleteUtils::getAllPagesForConcept($sub_components[1]); |
457 | 462 | } else { |
458 | 463 | $field_args[$sub_components[0]] = $sub_components[1]; |
459 | 464 | } |
— | — | @@ -635,7 +640,8 @@ |
636 | 641 | if ($form_submitted && $generated_page_name != '') { |
637 | 642 | $generated_page_name = str_replace('.', '_', $generated_page_name); |
638 | 643 | $generated_page_name = str_replace(' ', '_', $generated_page_name); |
639 | | - $generated_page_name = str_ireplace("<$input_name>", $cur_value_in_template, $generated_page_name); |
| 644 | + $escaped_input_name = str_replace(' ', '_', $input_name); |
| 645 | + $generated_page_name = str_ireplace("<$escaped_input_name>", $cur_value_in_template, $generated_page_name); |
640 | 646 | // once the substitution is done, replace underlines back |
641 | 647 | // with spaces |
642 | 648 | $generated_page_name = str_replace('_', ' ', $generated_page_name); |
— | — | @@ -672,7 +678,7 @@ |
673 | 679 | $day = date("j", $cur_time); |
674 | 680 | global $wgAmericanDates, $sfg24HourTime; |
675 | 681 | if ($wgAmericanDates == true) { |
676 | | - $month_names = sffGetMonthNames(); |
| 682 | + $month_names = SFFormUtils::getMonthNames(); |
677 | 683 | $month_name = $month_names[$month - 1]; |
678 | 684 | $cur_value_in_template = "$month_name $day, $year"; |
679 | 685 | } else { |