<div id="adicionarPreventivaModelos" class="modal-demo">
    <button type="button" class="close" onclick="Custombox.close();">
        <span>&times;</span><span class="sr-only">Close</span>
    </button>
    <h4 class="custom-modal-title">Cadastrar Modelo de Manutenção</h4>
    <div class="custom-modal-text">

        <form action="<?php echo base_url(); ?>manutencao/adicionarManutencaoModelo" method="post" name="formAddPreventiva"
              id="formAddPreventiva"
              class="floating-labels m-t-40">
            <div class="form-body">
                <div class="row p-t-20 ">
                    <div class="form-group col-lg-12">
                        <input type="text" class="form-control" id="nomeManutencao" name="nomeManutencao"
                               required>
                        <span class="bar"></span>
                        <label for="input1">Nome Manutenção</label>
                    </div>
                </div>


                <div class="row p-t-20 ">
                    <div class="form-group col-lg-6">
                        <select name="tipoManutencao" id="tipoManutencao" class="form-control m-b"
                                required>
                            <option  value="P">Preventiva</option>
                            <option  value="C">Corretiva</option>
                        </select>
                        <label for="input1">Tipo de Manutenção</label>
                    </div>

                    <div class="form-group col-lg-6">
                        <select name="tipoVeiculo" id="tipoVeiculo" class="form-control m-b"
                                required>
                            <option  value="P">Padron</option>
                            <option  value="A">BRT/Articulado</option>
                        </select>
                        <label for="input1">Modelo Veículo</label>
                    </div>

                </div>

                <div class="row p-t-20 ">
                    <div class="form-group col-lg-6">
                        <select name="funcionario_id" id="funcionario_id" class="form-control m-b"
                                required>
                            <?php
                            foreach ($resultscomboFuncionarios as $r) {
                                ?>
                                <option value="<?php echo $r->idFuncionario ?>"><?php echo $r->nomeFuncionario ?></option>
                            <?php } ?>
                        </select>
                        <span class="bar"></span>
                        <label for="input1">Técnico</label>
                    </div>
                    <div class="form-group col-lg-6">
                        <input type="text" class="form-control inputmask" id="garantia"
                               name="garantia"
                               data-inputmask="'alias': 'numeric', 'digits': 0, 'suffix': ' \\Mês\\s', 'rightAlign': false, 'allowMinus': false, 'radixPoint': ','"
                               required>
                        <span class="bar"></span>
                        <label for="input1">Garantia (Meses)</label>
                    </div>
                </div>

            </div>
            <div class="modal-footer">
                <a onclick="Custombox.close();" class="btn btn-default"><i
                            class="icon-arrow-left"></i> Voltar</a>

                <button type="submit" class="btn btn-success"><i class="fa fa-save"></i> Save</button>
            </div>
        </form>
    </div>
</div>


<script>
    $("#prefixo").autocomplete({
        source: "<?php echo base_url(); ?>veiculos/autoCompleteVeiculo",
        minLength: 3,
        select: function (event, ui) {
            $("#proprietario_id").val(ui.item.id);

            $("#placa").val(ui.item.placa);
            $("#garagem").val(ui.item.garagem);
            $("#idVeiculo").val(ui.item.idVeiculo);
            $("#teste").html(ui.item.idVeiculo);
        }
    });
</script>