<div ng-controller="auxiliosController">
    <div class="modal-header">
        <h4>Inventário Nº {{selected.item.NumInventario}}</h4>
        <h6>Auxilio para Modificar a Data dos Bens com a mesmas caracteristicas deste Inventário</h6>
        
        <p align="right">
            <button type="button"
                    popover-placement="left"
                    popover-trigger="mousedown"
                    data-popover="{{info}}"
                    class="btn btn-info btn-sm">
                <span class="glyphicon glyphicon-question-sign"></span>
            </button>
        </p>
        
    </div>
    <div class="modal-body" ng-init="devTotalInventarioIguais(selected.item)">

        <input type="text"
               popover-placement="top"
               popover-trigger="mouseenter"
               popover={{selected.item.Classificacao}}
               placeholder="Classificação"
               class="form-control readonly"
               readonly="readonly"
               ng-model="selected.item.Classificacao" />

        <br />
        <label>Designação</label>
        <br />
        <input class="form-control" ng-model="selected.item.Nome" maxlength="100" />
        <br />


        <label>Data</label>
        <br />
        <input type="text"
               class="form-control readonly"
               readonly="readonly"
               ng-model="selected.item.Data"
               placeholder="____-__-__" />

        <br />
        <label>Alterar Para a Nova Data</label>
        <br />
        <input type="text"
               class="date form-control readonly simple-field-data-mask"
               data-mask="0000-00-00"
               ng-model="dataNova"
               placeholder="____-__-__"
               datepicker-popup="yyyy-MM-dd" is-open="dataAlteracao_opened"
               ng-required="true" close-text="Fechar" clear-text="Limpar" current-text="Hoje" />
        <br />
        <label>Foram encontrados</label> <span class="badge">{{TotalInventariosIguais}}</span> Registos
        <br/>
        <div ng-show="emExecucao==true">
            <label style="font-size:8pt">Por Favor Aguarde... </label><img src="images/preloader.gif" width="32" style="margin-left:30px; margin-right:30px" />
        </div>
        
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary"
                ng-click="confirmarAlterarDatas(selected.item,dataNova);"
                ng-disabled="selected.item.perm.PEditar==false">
            Alterar
        </button>
        <button class="btn btn-warning" ng-click="cancel()" id="btnModalFechar">Fechar</button>
    </div>

</div>
<script>
    $(document).ready(function () {
        $('.date').mask('0000-00-00');

    });
</script>
