46 lines
898 B
HTML
46 lines
898 B
HTML
---
|
|
id:
|
|
type: 'string'
|
|
class:
|
|
type: 'string'
|
|
default: ''
|
|
placeholder:
|
|
type: 'string'
|
|
default: ''
|
|
required:
|
|
type: 'bool'
|
|
default: false
|
|
autofocus:
|
|
type: 'bool'
|
|
default: false
|
|
minlength:
|
|
type: 'string'
|
|
default: '1'
|
|
maxlength:
|
|
type: 'string'
|
|
name:
|
|
type: 'bool'
|
|
default: false
|
|
attributes:
|
|
type: 'string'
|
|
default: ''
|
|
---
|
|
{% capture minlength_attr %}
|
|
minlength={{minlength}}
|
|
{% endcapture %}
|
|
{% assign attributes = attributes | append: minlength_attr %}
|
|
|
|
{% capture maxlength_attr %}
|
|
maxlength={{maxlength}}
|
|
{% endcapture %}
|
|
{% assign attributes = attributes | append: maxlength_attr %}
|
|
|
|
{% if placeholder != '' %}
|
|
{% capture placeholder_attr %}
|
|
placeholder={{placeholder}}
|
|
{% endcapture %}
|
|
{%- assign attributes = attributes | append: placeholder_attr -%}
|
|
{% endif %}
|
|
|
|
{% render 'forms/input.html', id:, class:, required:, autofocus:, name:, attributes: %}
|