@extends('adm.template.template')

@section('conteudo')
    @if($valores[0] == 0)
        Nenhum Cliente Cadastrado!
    @else
        {!! Form::open(['route' => 'clientes.salvarOrdem', 'method' => 'put']) !!}
            
            @for ($i = 1; $i <= $valores[0]; $i++)
                <div class="row">
                    <div class="form-group col-md-12">
                        <label>{{$i}}°:</label>
                        @if( count($valores[2]) > 0 )
                            {!! Form::select($i, $valores[1], $valores[2][$i] , ['placeholder'=>'Nome', 'class' => 'form-control']) !!}
                        @else
                            {!! Form::select($i, $valores[1], null , ['placeholder'=>'Nome', 'class' => 'form-control']) !!}
                        @endif

                    </div>
                </div>
            @endfor
            <div class="row">
                <div class="form-group col-md-12">
                    {!! Form::submit('Editar', ['class' => 'btn btn-primary pull-right']) !!}
                </div>
            </div>
        {!! Form::close() !!}
    @endif
@endsection


@section('js')
    <script type="text/javascript" src="{{ asset('js/adm/clientes.js') }}"></script>
@endsection