-
Notifications
You must be signed in to change notification settings - Fork 27
Add new field type: decimal number with two digits of precision #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've updated the main php file to solve a problem with translations. Working with the plugin I noticed the text for the field types wasn't being translated (see screenshot below). I've had to call For now, I've only tested the 'Decimal number' type and due to $this->name = __( 'Decimal number (HTML5 field)', 'bxcft' ); |
Thanks for your great work. I'm going to add Decimal Number as a new type of field. The other two Gender and Diet are too specific I think. Gender is a type of field easy to create using the default types of fields from buddypress. Diet is a field that I don't think most users will need. I'm checking old threads of support forum, so I hope I can release a new version updated with Decimal Number this week. Again thanks for your work. |
Hi donmik, Yes, I agree with you. My first aim was to pull request changes only for the Decimal Number type, but GitHub also shows my other changes after the first pull request I made. Gender and Diet are useful in my case, but I understand these are very specific and not convenient for the most of users. Please, take also into account the changes related to translations just in case you consider to add these changes to your code. Thanks to you for your fantastic plugin. |
* Fixed undefined index. Thanks to jonatascabral. #19 * New type of field! Decimal number. Thanks to ftena. #20 * Fixed a bug with Website field. Sometimes the regular expression was giving false negatives. I've copied the regular expression from buddypress url field type. * Fixed a bug with Checkbox Acceptance that does not let you create or update this field. * Fixed a bug with Birthdate field type. Buddypress was throwing an error when user try to display age instead of birthdate. * Updated description of plugin. * Translations updated.
* Fixed undefined index. Thanks to jonatascabral. donmik/buddypress-xprofile-custom-fields-type#19 * New type of field! Decimal number. Thanks to ftena. donmik/buddypress-xprofile-custom-fields-type#20 * Fixed a bug with Website field. Sometimes the regular expression was giving false negatives. I've copied the regular expression from buddypress url field type. * Fixed a bug with Checkbox Acceptance that does not let you create or update this field. * Fixed a bug with Birthdate field type. Buddypress was throwing an error when user try to display age instead of birthdate. * Updated description of plugin. * Translations updated. git-svn-id: https://plugins.svn.wordpress.org/buddypress-xprofile-custom-fields-type/trunk@1199403 b8457f37-d9ea-0310-8a92-e5e31aec5664
* Fixed undefined index. Thanks to jonatascabral. #19 * New type of field! Decimal number. Thanks to ftena. #20 * Fixed a bug with Website field. Sometimes the regular expression was giving false negatives. I've copied the regular expression from buddypress url field type. * Fixed a bug with Checkbox Acceptance that does not let you create or update this field. * Fixed a bug with Birthdate field type. Buddypress was throwing an error when user try to display age instead of birthdate. * Updated description of plugin. * Translations updated. git-svn-id: http://plugins.svn.wordpress.org/buddypress-xprofile-custom-fields-type/trunk@1199403 b8457f37-d9ea-0310-8a92-e5e31aec5664
By default, the field of type 'Number' in BuddyPress doesn't allow decimal numbers.
I've coded a new class (see
classes/Bxcft_Field_Type_DecimalNumber.php
) to add a new field type which supports numbers with two digits of precision.