{% macro input(name, label, value = null, options = []) %}
	<div class="form-group row row {{ options.classGroup }}">
		<label class="{{ options.classLabel }}" for="{{ name }}">{{ label }} {% if options.require == 1 %}*{% endif %}</label>
		<div class="{{ options.classInput }}">
			<input class="form-control" type="{{ options.type ?: 'text' }}" id="{{ name }}" name="{{ name }}" value="{{ value }}" {% if options.maxlength %}maxlength="{{options.maxlength}}"{% endif %} {% if options.require == 1 %}required{% endif %} {% if options.disabled == 1 %}disabled{% endif %} {% if options.autocomplete %}autocomplete="{{options.autocomplete}}"{% endif %}>
		</div>
	</div>
{% endmacro %}

{% macro textarea(name, label, value = null, options = []) %}
	<div class="form-group row {{ options.classGroup }}">
		<label class="{{ options.classLabel }}" for="{{ name }}">{{ label }}</label>
		<div class="{{ options.classInput }}">
			<textarea class="form-control" type="text" id="{{ name }}" name="{{ name }}" value="">{{ value }}</textarea>
		</div>
	</div>
{% endmacro %}

{% macro colorpicker1(name, label, value = null, options = []) %}
	<div class="form-group row {{ options.classGroup }}">
		<label class="{{ options.classLabel }}" for="{{ name }}">{{ label }}</label>
		<div class="input-group my-colorpicker1 {{ options.classInput }}">
			<input type="text" class="form-control my-colorpicker1 colorpicker-element"  data-colorpicker-id="1" data-original-title="" id="{{ name }}" name="{{ name }}" value="{{ value }}">
		</div>
	</div>
{% endmacro %}

{% macro colorpicker2(name, label, value = null, options = []) %}
	<div class="form-group row {{ options.classGroup }} {{ name }}">
		<label class="{{ options.classLabel }}" for="{{ name }}">{{ label }}</label>
		<div class="input-group my-colorpicker2 colorpicker-element {{ options.classInput }}" id="div{{ name }}">
			<input type="text" class="form-control" id="{{ name }}" name="{{ name }}" value="{{ value }}" oninput="updatecolorpicker('{{ name }}');">
			<div class="input-group-append">

				<input type="color" class="form-control-color input-group-text"  id="square{{ name }}" value="{{ value }}" oninput="updatecolor('{{ name }}');" title="Choose a color">
			  </div>
		</div>
	</div>
{% endmacro %}
