@extends('admin')
@section('contentData')
    @if (session()->has('message'))
        <div class="alert alert-warning">
            {{ session('message') }}
        </div>
    @endif
    <div class="container">
        <div class="row" style="width: 650px;">
            <div class="card" style="width: 600px;">
                <div class="card-header">{{ __('Editace veličiny') }}</div>
                <div class="card-body">
                    <form method="POST" action="{{ route('velicina-add') }}">
                        @csrf

                        <div class="form-group row">
                            <label for="nazev" class="col-md-4 col-form-label text-md-right">Název</label>

                            <div class="col-md-6">
                                <input id="nazev" type="text" class="form-control @error('nazev') is-invalid @enderror" name="nazev" value="{{ old('nazev')}}">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label for="jednotka" class="col-md-4 col-form-label text-md-right">Jednotka</label>

                            <div class="col-md-6">
                                <input id="jednotka" type="text" class="form-control" name="jednotka" value="{{ old('jednotka')}}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label for="poznamka" class="col-md-4 col-form-label text-md-right">Poznámka</label>

                            <div class="col-md-6">
                                <input id="poznamka" type="text" class="form-control" name="poznamka" value="{{ old('poznamka')}}">

                            </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
