@extends('admin')
@section('contentData')
    @if (session()->has('message-fail'))
        <div class="alert alert-warning">
            {{ session('message-fail') }}
        </div>
    @endif
    <div class="container">
        <div class="row" style="width: 650px;">
            <div class="card" style="width: 600px;">
                <div class="card-header">Vytvoření přístupu k WU</div>
                <div class="card-body">
                    <form method="POST" action="{{ route('nastaveniWu-add') }}">
                        @csrf
                        <div class="form-group row">
                            <label for="id_wu_station" class="col-md-4 col-form-label text-md-right">{{ __('Název (WU ID)') }}</label>

                            <div class="col-md-6">
                                <input id="id_wu_station" type="text" class="form-control" name="id_wu_station" value="">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="pass" class="col-md-4 col-form-label text-md-right">{{ __('Heslo (WU Key)') }}</label>
                            <div class="col-md-6">
                                <input id="pass" type="text" class="form-control" name="pass" value="">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="id_stanice" class="col-md-4 col-form-label text-md-right">{{ __('Přiřadit k') }}</label>
                            <div class="col-md-6">
                                <label for="stanice"></label><select id="stanice" name="id_stanice">
                                    @foreach(\App\Stanice::getStaniceProWu() as $poradi => $data)
                                        <option id="{{$data->idStanice}}" value="{{$data->idStanice}}">{{$data->nazev}} ({{$data->idStanice}})</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>

                        <div class="form-group row mb-0">
                            <div class="col-md-6 offset-md-4">
                                <button type="submit" class="btn btn-primary">
                                    {{ __('Uložit') }}
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
