Can you add an input filters support to text field where admin enters a T&C?
I need a PHP-filter.
This is useful because I could add a links to other nodes to explain some terms etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | input_filter-226117-8.patch | 7.41 KB | deciphered |
| #8 | interdiff.txt | 5.07 KB | deciphered |
| #6 | input_filter-226117-6.patch | 2.94 KB | deciphered |
| #6 | interdiff.txt | 2.94 KB | deciphered |
| #5 | input_filter-226117-5.patch | 395 bytes | deciphered |
Comments
Comment #1
beatnikdude commentedgood idea, 2nd that
Comment #2
Tom Freudenberg commentedHi you all,
we use localization modul for such things :-) Just enter a string like "legal:tc:1:text" to your legal text box. In case to "translate" english also you need to add english as language a second time, just use "en-EN" for that and disable standard "en".
Now you can go to localization and search for your term. Enter and fill in what you need, its normal HTML here :-)
The only thing, you can't use "HTML Textfield" as Representation for legal Text, but this is not the problem :-)
Comment #3
beatnikdude commented6.x-2.2-beta4
"Full HTML" as a filter would be very useful, my clients give me heavily formated legal terms.
Comment #4
nancydruThe project page says it uses filter_xss_admin which is more permissive than any input filter. However, it appears to not be doing that as all my HTML is gone, including stuff that even the "Filtered HTML" filter allows.
Comment #5
decipheredA very simple patch, just replaces 'filter_xss_admin' with 'check_markup' which will process the legal text with the default input filter. It would be easy enough to add the ability to select an input filter, but I don't have the time at this point to do so, nor the need.
Hope someone finds this helpful.
Comment #6
decipheredNew patch based on the previous version, but this time for Drupal 7 and it also adds the ability to select the input filter you wish to use.
Comment #8
decipheredUpdated patch and tested tests.
Comment #9
thedavidmeister commentedseems good to me, still applies against 1.5
Comment #10
thedavidmeister commentedI spoke to soon. Actually, because of the way legal_conditions_updated() works, whenever you submit the form with this patch applies it creates a new revision and forces users to re-accept the T&Cs, even if nothing has changed in the conditions.
Something like this might work better:
Comment #11
geek-merlinIssues #226117: Input filters support / #445308: Add support of text formats and WYSIWYG are duplicates and should be merged.
The patches are nearly identical (see the merge in my sandbox)
Although #226117: Input filters support is the older one, last patch from #445308: Add support of text formats and WYSIWYG looks a bit cleaner to me.
So i suggest to close #226117: Input filters support and join forces in #445308: Add support of text formats and WYSIWYG. Any objections?
Comment #12
avpaderno