mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
Allow input fields to render as readonly.
-=david=-
This commit is contained in:
parent
3ae9866ea7
commit
7f7941c6e3
@ -90,6 +90,7 @@ label : dialog label
|
||||
{% set maxheight=false %}
|
||||
{% set width=false %}
|
||||
{% set allownew=false %}
|
||||
{% set readonly=false %}
|
||||
{% if field['type'] == 'header' %}
|
||||
{# close table and start new one with header #}
|
||||
|
||||
|
||||
@ -77,6 +77,7 @@ data_title : data-title to set on form
|
||||
{% set maxheight=false %}
|
||||
{% set width=false %}
|
||||
{% set allownew=false %}
|
||||
{% set readonly=false %}
|
||||
{% if field['type'] == 'header' %}
|
||||
{# close table and start new one with header #}
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ style : css class to add
|
||||
maxheight : maximum height in rows if applicable
|
||||
width : width in pixels if applicable
|
||||
allownew : allow new items (for list) if applicable
|
||||
readonly : if true, input fields will be readonly
|
||||
|
||||
#}
|
||||
|
||||
@ -54,7 +55,7 @@ allownew : allow new items (for list) if applicable
|
||||
</td>
|
||||
<td >
|
||||
{% if type == "text" %}
|
||||
<input type="text" class="form-control" size="{{size|default("50")}}" id="{{ id }}" >
|
||||
<input type="text" class="form-control" size="{{size|default("50")}}" id="{{ id }}" {{ readonly ? 'readonly="readonly"' : '' }} >
|
||||
{% elseif type == "checkbox" %}
|
||||
<input type="checkbox" id="{{ id }}" >
|
||||
{% elseif type == "select_multiple" %}
|
||||
@ -63,9 +64,9 @@ allownew : allow new items (for list) if applicable
|
||||
{% elseif type == "dropdown" %}
|
||||
<select {% if size|default(false) %}size="{{size}}"{% endif %} id="{{ id }}" class="{{style|default('selectpicker')}}" data-width="{{width|default("348px")}}"></select>
|
||||
{% elseif type == "password" %}
|
||||
<input type="password" class="form-control" size="{{size|default("50")}}" id="{{ id }}" >
|
||||
<input type="password" class="form-control" size="{{size|default("50")}}" id="{{ id }}" {{ readonly ? 'readonly="readonly"' : '' }} >
|
||||
{% elseif type == "textbox" %}
|
||||
<textarea rows="{{height|default("5")}}" id="{{ id }}"></textarea>
|
||||
<textarea rows="{{height|default("5")}}" id="{{ id }}" {{ readonly ? 'readonly="readonly"' : '' }}></textarea>
|
||||
{% elseif type == "info" %}
|
||||
<span id="{{ id }}" ></span>
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user