fix: Small Text should not be rendered as text_field (#9318)
This commit is contained in:
parent
39850513ed
commit
d8c826ff19
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
{{ render_table(df, doc) }}
|
||||
{%- elif df.fieldtype=="HTML" and df.options -%}
|
||||
<div>{{ frappe.render_template(df.options, {"doc": doc}) or "" }}</div>
|
||||
{%- elif df.fieldtype in ("Text", "Text Editor", "Code", "Small Text", "Long Text") -%}
|
||||
{%- elif df.fieldtype in ("Text", "Text Editor", "Code", "Long Text") -%}
|
||||
{{ render_text_field(df, doc) }}
|
||||
{%- elif df.fieldtype in ("Image", "Attach Image", "Attach")
|
||||
and (guess_mimetype(doc[df.fieldname])[0] or "").startswith("image/") -%}
|
||||
|
|
@ -95,7 +95,7 @@ data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}"
|
|||
{%- macro render_text_field(df, doc) -%}
|
||||
{%- if doc.get(df.fieldname) != None -%}
|
||||
<div style="padding: 10px 0px" {{ fieldmeta(df) }}>
|
||||
{%- if df.fieldtype in ("Text", "Code") %}<label>{{ _(df.label) }}</label>{%- endif %}
|
||||
{%- if df.fieldtype in ("Text", "Code", "Long Text") %}<label>{{ _(df.label) }}</label>{%- endif %}
|
||||
{%- if df.fieldtype=="Code" %}
|
||||
<pre class="value">{{ doc.get(df.fieldname) }}</pre>
|
||||
{% else -%}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue