[buddypress-trac] [BuddyPress Trac] #4747: Add a TOS checkbox for registeration

buddypress-trac noreply at wordpress.org
Mon Apr 12 06:09:53 UTC 2021


#4747: Add a TOS checkbox for registeration
------------------------------------+-----------------------
 Reporter:  mahdiar                 |       Owner:  (none)
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:  8.0.0
Component:  Extended Profile        |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------
Changes (by imath):

 * keywords:  needs-patch => has-patch dev-feedback


Comment:

 @vapvarun I've tested the patch. First thanks a lot for the improvements
 you brought.

 I am pretty much concerned about editing the BP Template Packs templates.
 If Theme authors, or advanced users have overriden the templates, there's
 a high risk they won't update it even if we communicate early about it.

 So I'm suggesting another way to deal with it in
 [https://buddypress.trac.wordpress.org/attachment/ticket/4747/4747-7.patch
 4747-7.patch]. First I've found out there was a bug in [12868]. So I've
 added a fix into the patch to make sure the `$visibiliy` property of the
 field type is applied when saving the field from xProfile Admin.
 I've set this visibility property to `'adminsonly'` meaning only admins
 and the concerned user can see the field. I've also added support to allow
 the "Require" feature to be toggled, because it potentially make this
 field type more interesting. For instance you could use it to check access
 to an optional part of a website (eg: a game rules you need to accept
 before playing an optional game).
 I've also added the
 `BP_XProfile_Field_Type_Checkbox_Acceptance->enforce_field_value()` method
 to make sure someone who edited the form source removing readonly/onclick
 attributes of the checkbox cannot revert an already accepted field. I made
 some name/string changes to avoid using "tos": we can use this field type
 for other situation than the terms of service (eg: code of conduct,
 etc..). Finally I've added some checks to be sure the linked page exists.
 I'm fine with committing this version of the patch, what do you think?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4747#comment:16>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list