With this patch I fix the following bugs:
- lines 80 and 83: form_set_error() first param was wrong.
- line 347: preg_replace() did not allow to submit negative values, '-' (minus sign) was always removed.
- lines 159 and 226: changed label of default formatter to 'default' and removed applying of number_format() to value by default formatter, it was really annoying, that by default no decimals are displayed. Now the default is, that no number_format is applied to the value, just the prefix and/or suffix is appended.
- lines 160, 223, 224: added 'no decimals' formatter, which does the same like the former default formatter.

CommentFileSizeAuthor
number.module.several_bugs.patch4.05 KByojoe
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Reviewed & tested by the community » Needs review

thanks, but you should not auto-RTBC your patches :-)

yojoe’s picture

OK, no problem.... didn't know that. ;-)

KarenS’s picture

Getting ready to add this in. Everything looks OK except I see no need for a 'no decimals' formatter -- we already have several choices with no decimals, how is this different? As for the default, now that you set your formats in the 'Display Fields' tab, you never really see the default value unless it is what you chose. I originally thought about adding a setting where you could indicate which format should be the 'default', but there aren't really any places left that don't give you your choice of formatters -- you can choose them on the 'Display Fields' tab and in Views and if you do custom themeing using content_format().

KarenS’s picture

Status: Needs review » Fixed

Fix committed. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)