@extends('layouts.layout-2')

@section('content')

    @if ($errors->any())
        <div class="row">
            <div class="col-sm-12">
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>
    @endif
    <h4 class="font-weight-bold py-2 mb-2">
        {{ __('navigation.my_data') }}
    </h4>
    {!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
    <input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
         @include('user.user_form')
    <div class="text-left mt-3">
        <button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>&nbsp;
        <a href="{{route('home')}}" class="btn btn-default">{{ __('back') }}</a>

    </div>
    {!! Form::close() !!}

@endsection
