@extends('shop.app')

@section('content')
<div class="container mt-5 mb-5 text-center">
    <div class="container">
        <div class="form-box">
            <h1>Registracija</h1>
            {!! Form::open([
            'url' => URL::route('customer-store'),
            'method' => 'POST',
            'class' => 'form-horizontal',
            'role'=>'form',
            'files' => false
            ]) !!}
            <div class="row">
                <!-- name field -->
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
                        {!! Form::text("first_name", '', ['placeholder'=>'Ime','class'=>'form-control']) !!}
                    </div>
                    @error('first_name')
                        <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
                        {!! Form::text("last_name", '', ['placeholder'=>'Prezime','class'=>'form-control']) !!}
                    </div>
                   @error('last_name')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <!-- email field -->
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        <div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
                        {!! Form::text("email", '', ['placeholder'=>'Email','class'=>'form-control']) !!}
                    </div>
                    @error('email')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <!-- phone field -->
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        <div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
                        {!! Form::text("phone", '', ['placeholder'=>'Broj telefona','class'=>'form-control'])
                        !!}
                    </div>
                    @error('phone')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        {!! Form::text("address", '', ['placeholder'=>'Adresa i broj','class'=>'form-control'])
                        !!}
                    </div>
                    @error('address')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        {!! Form::text("city", '', ['placeholder'=>'Grad','class'=>'form-control']) !!}
                    </div>
                    @error('city')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        {!! Form::text("postcode", '', ['placeholder'=>'Poštanski broj','class'=>'form-control']) !!}
                    </div>
                    @error('postcode')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        {!! Form::password("password",['placeholder'=>'Lozinka','class'=>'form-control']) !!}
                    </div>
                   @error('password')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
                <div class="form-group col-xs-12 col-md-6">
                    <div class="input-group">
                        {!! Form::password("password_confirmation", ['placeholder'=>'Ponovite lozinku','class'=>'form-control']) !!}
                    </div>
                    @error('password_confirmation')
                    <p class="text-danger">{{ $message }}</p>
                    @enderror
                </div>
            </div>
            <div class="checkbox">
                <label>
                    <input type="checkbox"> Prihvatam opšte uslove kroištenja
                </label>
            </div>
            <button type="submit" class="btn btn-default">Registruj se</button>
            {!!Form::close()!!}
        </div>
    </div>
</div>
<style>
    .form-box {
        width: 80%;
        margin: auto;
        padding-top: 20px;
    }

    .form-box h1 {
        text-align: center;
        font-weight: bold;
        text-transform: uppercase;
        color: tomato;
    }

    .form-box h1 span {
        font-weight: lighter;
    }
</style>
@endsection
