Problem/Motivation

* The legal acceptance message (of course) must have a link if the legal text is not embedded
* If the legal text is embedded (or we are on the popup or the redirect-page) though, the link to the legal document page is confusing to the user

Proposed resolution

* a) Strip (at least a) tags from accepted message if on a page with embedded text
=> not so nice, any link will be removed
* b) Have 2 acceptance messages "with link" / "without link"

Comments

codesidekick’s picture

I think solution b is the most elegant.

At the moment the acceptance label is stored in DB against the version and revisioned. This is a bit of a pain - there's two ways around it.

1. We keep revisioning and start serializing data inside the entity_legal_document_version acceptance label column to have multiple labels.
2. We lose acceptance label revisioning (is there really a use case for it?) and expose the acceptance label as a document setting for each method group (new users and existing users).

Option 2 is best from a clean programming point of view but we are losing revisioning of the label. That said the functionality of a revisionable acceptance label is pretty weird.

I think solution 2b is the best but it will require an update hook to merge acceptance label settings from the versions into the method settings but it's no too bad.

geek-merlin’s picture

My naive point of view is also: why the heck do we need label revisioning, but after some thought i must think of some lawyers who fuck the shit out of os if we don't revision the exact acceptance label... and the very point in this module is to make lawyers happy so i think we should stick with that.

my suggestion was to split messages
* with / wihtout embedded text

do you mean the same or do you really suggest to split messages
* for new / existing users
?
(i don't see the point in this and then we already have 4 messages)

codesidekick’s picture

I actually agree with you, lets not take the acceptance label out of the version revision-ing - it weakens the module features plus it's a fairly large change.

To give some background this issue only exists because of #2490464: It is showing full path instead of just text . Version 1.5 actually doesn't have the issue, and in hindsight I should have probably just shown that user how to override the form label using hook_form_alter or added a drupal_alter somewhere. That is still an option - but I'll leave it up to you as I won't have time to work on this module for a little while.

I think your solution with the two acceptance labels, with and without embedded text works well. Keep in mind that we're not just dealing with new signups but with existing users re-accepting as well, but those users are always redirected to the document page so they should get the acceptance label without the embedded link.

geek-merlin’s picture

After some thinking i favor proposed resolution a:
> * a) Strip (at least a) tags from accepted message if on a page with embedded text
> => not so nice, any link will be removed

Rewriting html via regexp is always a pain, but in this case it should be possible in a way that catches all nonpathological cases.