@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">
        <div>{{ __('navigation.my_promotions') }} / {{ __('bearbeiten') }}</div>
    </h4>

    {!! Form::open(['url' => route('user_promotion_detail', $user_promotion->id), 'class' => 'form-horizontal', 'id'=>"user-promotion-form-validations"]) !!}

    <div class="text-left mt-0 mb-2">
        <button type="submit" class="btn btn-submit" name="action" value="save-user-promotion">Promotion {{ __('save') }}</button>&nbsp;
        <a href="{{ route('user_promotions') }}" class="btn btn-default">{{ __('back') }}</a>
    </div>

    @include('user.promotion.form')

    <div class="text-left mt-0 mb-2">
        <button type="submit" class="btn btn-submit" name="action" value="save-user-promotion">Promotion {{ __('save') }}</button>&nbsp;
        <a href="{{ route('user_promotions') }}" class="btn btn-default">{{ __('back') }}</a>
    </div>

    {!! Form::close() !!}


    
    <script>
        $( document ).ready(function() {
    
        });
    </script>

@endsection
