<p class="legend">{{vm.listaFiltroAtiva.currentItem.properties.Titulo}}</p>
<form id="form-filtro" name="formFiltro" class="item-form" ng-init="vm.listaFiltroAtiva.currentItem.properties.Tipo = 0">

    <p class="message-required" ng-show="vm.hasFieldRequiredFilter">Preencha as informações obrigatórias para filtrar!</p>

    <div class="divider">
        <fieldset class="half">
            <span class="radio-mini">
                <span>
                    <input type="radio" id="data-simple" name="tipo" ng-value="0" ng-change="vm.multiOptionsClearAll(vm.listaFiltroAtiva.currentItem)"
                        ng-model="vm.listaFiltroAtiva.currentItem.properties.Tipo" checked>
                    <label for="data-simple">Data:</label>
                </span>
            </span>
            <span class="custom-datepicker" ng-class="{'disabled': vm.listaFiltroAtiva.currentItem.properties.Tipo !== 0}">
                <input type="text" ng-disabled="vm.listaFiltroAtiva.currentItem.properties.Tipo !== 0" class="inpt-date select-day input-default"
                    name="{{vm.listaFiltroAtiva.currentItem.name}}" data-arrayposition="0" ng-readonly="true" ng-class="vm.listaFiltroAtiva.currentItem.properties.Tipo === 0 && vm.hasFieldRequiredFilter ? 'has-error-filter' : ''">
                <i class="icon-calendar"></i>
            </span>
        </fieldset>
    </div>

    <div class="divider">
        <fieldset class="half">
            <span class="radio-mini">
                <span>
                    <input type="radio" id="data-interval" name="tipo" ng-value="1" ng-change="vm.multiOptionsClearAll(vm.listaFiltroAtiva.currentItem)"
                        ng-model="vm.listaFiltroAtiva.currentItem.properties.Tipo">
                    <label for="data-interval">Período:</label>
                </span>
            </span>
            <span class="custom-datepicker" ng-class="{'disabled' : vm.listaFiltroAtiva.currentItem.properties.Tipo !== 1}">
                <input type="text" ng-disabled="vm.listaFiltroAtiva.currentItem.properties.Tipo !== 1" class="inpt-date select-day input-default"
                    name="{{vm.listaFiltroAtiva.currentItem.name}}" data-arrayposition="0" ng-readonly="true" ng-class="vm.listaFiltroAtiva.currentItem.properties.Tipo === 1 && vm.hasFieldRequiredFilter && !vm.listaFiltroAtiva.currentItem.properties.Pesquisa[0] ? 'has-error-filter' : ''">
                <i class="icon-calendar"></i>
            </span>
        </fieldset>
        <br>
        <fieldset class="half half-line" style="top: 12px">
            <span class="custom-datepicker" ng-class="{'disabled' : vm.listaFiltroAtiva.currentItem.properties.Tipo !== 1}">
                <input type="text" ng-disabled="vm.listaFiltroAtiva.currentItem.properties.Tipo !== 1" class="inpt-date select-day input-default"
                    name="{{vm.listaFiltroAtiva.currentItem.name}}" data-arrayposition="1" ng-readonly="true" ng-class="vm.listaFiltroAtiva.currentItem.properties.Tipo === 1 && vm.hasFieldRequiredFilter && !vm.listaFiltroAtiva.currentItem.properties.Pesquisa[1] ? 'has-error-filter' : ''">
                <i class="icon-calendar"></i>
            </span>
        </fieldset>
    </div>

    <div class="divider">
        <fieldset class="half inline">
            <span class="radio-mini">
                <span>
                    <input type="radio" id="menor-ou-igual" name="tipo" ng-value="2" ng-change="vm.multiOptionsClearAll(vm.listaFiltroAtiva.currentItem)"
                        ng-model="vm.listaFiltroAtiva.currentItem.properties.Tipo">
                    <label for="menor-ou-igual">Menor ou Igual à:</label>
                </span>
            </span>
        </fieldset>

        <fieldset class="half inline">
            <span class="radio-mini">
                <span>
                    <input type="radio" id="maior-ou-igual" name="tipo" ng-value="3" ng-change="vm.multiOptionsClearAll(vm.listaFiltroAtiva.currentItem)"
                        ng-model="vm.listaFiltroAtiva.currentItem.properties.Tipo">
                    <label for="maior-ou-igual">Maior ou Igual à:</label>
                </span>
            </span>
        </fieldset>

        <fieldset class="half half-outerline">
            <span class="custom-datepicker" ng-class="{'disabled': vm.listaFiltroAtiva.currentItem.properties.Tipo !== 2 && vm.listaFiltroAtiva.currentItem.properties.Tipo !== 3}">
                <input type="text" ng-disabled="vm.listaFiltroAtiva.currentItem.properties.Tipo !== 2 && vm.listaFiltroAtiva.currentItem.properties.Tipo !== 3" class="inpt-date select-day input-default"
                    name="{{vm.listaFiltroAtiva.currentItem.name}}" data-arrayposition="0" ng-readonly="true" ng-class="(vm.listaFiltroAtiva.currentItem.properties.Tipo === 2 || vm.listaFiltroAtiva.currentItem.properties.Tipo === 3) && vm.hasFieldRequiredFilter ? 'has-error-filter' : ''">
                <i class="icon-calendar"></i>
            </span>
        </fieldset>
    </div>
</form>
