<div ng-controller="centroCustosController" ng-init="carregaCamadas(); selCamada(devCamadaLista(selected.item.Camada))">
    <div class="modal-header">
        <h3>Conta ano letivo {{selected.item.AnoLetivo}}/{{selected.item.AnoLetivo+1}}</h3>
    </div>
    <div class="modal-body">
        <div class="container-fluid">
            <label>Camada</label>
            <select class="form-control"
                    ng-change="selCamada(selectedCamada); selected.item.Camada=selectedCamada.id"
                    ng-model="selectedCamada"
                    ng-options="e.nivel for e in lstCamadas"></select>
            <br />
            <label>Conta</label>
            <br />
            <input type="text"
                   class="form-control"
                   ng-model="selected.item.Conta"
                   maxlength="15"
                   numbers-only
                   placeholder="" />
            <br />

            <label>Descrição</label>
            <br />
            <input type="text"
                   class="form-control"
                   ng-model="selected.item.Descricao"
                   maxlength="150"
                   placeholder="" />
            <br />
            <label class="checkbox" style="margin-left:20px">
                <input type="checkbox" ng-model="selected.item.Ativa" /> Ativa
            </label>
        </div>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" ng-click="gravaContaPlano(selected.item)" ng-disabled="estaGravar==true">Gravar</button>
        <button class="btn btn-warning" ng-click="ok()" ng-disabled="estaGravar==true">Fechar</button>
    </div>
</div>