onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

Special checkbox field for GDPR #372

Closed jmaas-onoffice closed 1 year ago

jmaas-onoffice commented 1 year ago

Discussed in https://github.com/onOffice-Web-Org/oo-wp-plugin/discussions/362

Originally posted by **jmaas-onoffice** October 24, 2022 > Time-tracking ticket: T#3254253 ## “DSGVOStatus” is a single-select The field “DSGVOStatus” is implemented in enterprise as a single-select. This means that it is not a boolean field. As a consequence, it is rendered as a select: ![image](https://user-images.githubusercontent.com/90763364/197563407-256cb954-31bc-40ea-94a4-693dac1d2283.png) This affects all forms where an address can be created (that is all except applicant search form). Currently, we need to adapt the template to deal with this field as a checkbox. There are multiple customers that had this issue (T#2465337, T#2471177, T#3209356). ## Label cannot link to privacy policy Usually, the privacy policy is linked in the label of the GDPR checkbox: ![image](https://user-images.githubusercontent.com/90763364/197563428-007ae68a-f176-47e0-9821-edc0c8e3fedc.png) This is currently only possible with a change to the template where we set a special label for this field. To address these problems, we propose a 2-week project to introduce a new special field for a GDPR checkbox and allow rich text in all labels. ## Special field The plugin adds some special fields which are not directly available from onOffice enterprise. ![image](https://user-images.githubusercontent.com/90763364/197563461-81183dd1-884a-4b28-8fdf-8682999fa89a.png) We could add another special field that renders a GDPR checkbox. The field could be named "GDPR (Checkbox)". ## Rich text labels The GDPR checkbox usually needs to link to a privacy policy, as seen in the previous form example. This is currently not possible, because users can only enter plain text labels. Therefore we want to allow setting richt text labels. In https://github.com/onOffice-Web-Org/oo-wp-plugin/pull/344 we determined that using Markdown for specifying rich text labels is a viable solution. We want to add a checkbox that configures whether the label of an field uses Markdown. This makes backwards compatibility easier, since we just leave the checkbox disabled by default, and also allows us to reference documentation on how to use Markdown in its description, so that users unfamiliar with it can look it up.
dai-eastgate commented 1 year ago

@jmaas-onoffice I have some questions about this requirement:

jmaas-onoffice commented 1 year ago
  • Is the "GDPR(Checkbox)" a new field or an alternative to "GDPR Status"?

It should be a new field in the category "Special Fields". It's not a real enterprise field, it's only there in the plugin.

We will keep the existing enterprise field with the key "DSGVOStatus", but it will probably not be used anymore in practice.

  • The field "GDPR(Checkbox)" is the default field when creating a new Form, right?

That's a good question, we hadn't thought about this. Maybe we can add it as a default using get_privacy_policy_url(). But this is a nice-to-have, if time runs short, leave it out and keep the defaults as they are right now. We can add this later.

  • Are there any requirements for the Privacy Policy page content?

I'm not sure what you mean. Why would we need to know the privacy policy's content? The checkbox's label only needs to be able to link to it, but that's something the user should do.

  • The checkbox for "GDPR status" is to select only 1 option or can select multiple options?

The current enterprise field with the key "DSGVOStatus" should stay as it is now with multiple options. But the new field "GDPR (Checkbox)" should only be a checkbox. Was this your question?

dai-eastgate commented 1 year ago

@jmaas-onoffice Could you please tell me how to show " I agree to the Privacy Policies"? image

jmaas-onoffice commented 1 year ago

@dai-eastgate The idea is that by allowing Markdown labels, the users can add those links in the label. For example: image

We need the checkbox for backwards compatibility, since existing labels could include things like * or [, so enabling Markdown for everything could break existing labels.

dai-eastgate commented 1 year ago

@jmaas-onoffice I added "GDPR(Checkbox)" field and allowed rich text in all labels. You can watch video and give me feedback.

https://user-images.githubusercontent.com/106214469/204179938-f09762c6-681a-4a7b-a92e-0d4a9120a8b3.mp4

jmaas-onoffice commented 1 year ago

@dai-eastgate Looks good!

When you check it and send the form, does it set the correct field in enterprise for the address? Apart from that, it looks very good. :)

dai-eastgate commented 1 year ago

@jmaas-onoffice Could you please tell me When I click on the link, What page does it redirect to? image

jmaas-onoffice commented 1 year ago

Oh, sorry! Let's point it to https://wp-plugin.onoffice.com/en/advanced-features/markdown-labels. Currently there is nothing there, but before the release I will add an explanation there.

Please also make that link translatable, so that I can point to the German version in German.

dai-eastgate commented 1 year ago

@jmaas-onoffice I fixed, you can watch video and give me feedback.

https://user-images.githubusercontent.com/106214469/205852330-f3b9a185-af6b-4157-958c-efe810b11d85.mp4

jmaas-onoffice commented 1 year ago

Looks good, but in your test I'm not sure whether the "normal" is setting the field in enterprise or the new one. As long as the new one also sets the field (even when the other one is not in the form), then it seems good. :)