Rename module

HighlightTags was bad because:
- we haven’t called placeholders ‘tags’ for a long time
- it also does resizing of the `<textarea>`, not just highlighting the
  placeholders
This commit is contained in:
Chris Hill-Scott
2019-10-16 15:20:05 +01:00
parent d0ce4d07a3
commit 6c0e853db4
13 changed files with 22 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
field,
label=None,
hint=False,
highlight_tags=False,
highlight_placeholders=False,
autofocus=False,
autosize=False,
colour_preview=False,
@@ -35,7 +35,7 @@
{% endif %}
</label>
{%
if highlight_tags
if highlight_placeholders or autosize
%}
{% set field_class = 'form-control-{} textbox-highlight-textbox'.format(width) %}
{% else %}
@@ -48,8 +48,8 @@
%}
{{ field(
class=field_class,
data_module='highlight-tags' if highlight_tags or autosize else '',
data_highlight_placeholders='true' if highlight_tags else 'false',
data_module='enhanced-textbox' if highlight_placeholders or autosize else '',
data_highlight_placeholders='true' if highlight_placeholders else 'false',
rows=rows|string,
**kwargs
) }}