Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | infobox.innerHTML = "$bad_email_error_str"; |
171 | 171 | return false; |
172 | 172 | } |
173 | | - } else if (type == 'float') { |
| 173 | + } else if (type == 'number') { |
174 | 174 | if (field.value.match(/^[\d\.,]+$/)) { |
175 | 175 | return true; |
176 | 176 | } else { |
— | — | @@ -177,15 +177,6 @@ |
178 | 178 | infobox.innerHTML = "$bad_number_error_str"; |
179 | 179 | return false; |
180 | 180 | } |
181 | | - } else if (type == 'integer') { |
182 | | - var num_regexp = /[0-9,]*/; |
183 | | - if (field.value.match(/^[\d,]+$/)) { |
184 | | - return true; |
185 | | - } else { |
186 | | - infobox = document.getElementById(info_id); |
187 | | - infobox.innerHTML = "$bad_integer_error_str"; |
188 | | - return false; |
189 | | - } |
190 | 181 | } else if (type == 'date') { |
191 | 182 | // validate only if day and year fields are both filled in |
192 | 183 | day_field = document.getElementById(field_id + "_day"); |
— | — | @@ -689,17 +680,16 @@ |
690 | 681 | } |
691 | 682 | |
692 | 683 | static function getShowFCKEditor() { |
693 | | - global $wgUser; |
| 684 | + global $wgUser, $wgDefaultUserOptions; |
694 | 685 | |
695 | 686 | $showFCKEditor = 0; |
696 | | - if ( !$wgUser->getOption( 'riched_start_disabled' ) ) { |
| 687 | + if ( !$wgUser->getOption( 'riched_start_disabled', $wgDefaultUserOptions['riched_start_disabled'] ) ) { |
697 | 688 | $showFCKEditor += RTE_VISIBLE; |
698 | | - |
699 | 689 | } |
700 | | - if ( $wgUser->getOption( 'riched_use_popup' ) ) { |
| 690 | + if ( $wgUser->getOption( 'riched_use_popup', $wgDefaultUserOptions['riched_use_popup'] ) ) { |
701 | 691 | $showFCKEditor += RTE_POPUP; |
702 | 692 | } |
703 | | - if ( $wgUser->getOption( 'riched_use_toggle' ) ) { |
| 693 | + if ( $wgUser->getOption( 'riched_use_toggle', $wgDefaultUserOptions['riched_use_toggle'] ) ) { |
704 | 694 | $showFCKEditor += RTE_TOGGLE_LINK; |
705 | 695 | } |
706 | 696 | |