@extends('template.'.config('settings.template').'.content.master')

@section('content')
    <div class="row justify-content-center">
        <div class="col-12 col-md-8 ">
            <br>
            <br>
            <br>
            <div class="card">
                <br>
                <h2 class="card-header"> Ihre Firma kostenlos eintragen</h2>
                <br>
                <br>

                <div class="card-body">
                    <form method="POST" action="{{ route('dashboard.register') }}" id="demo-form">
                        @csrf

                        <div class="form-group row mb-3">
                            <label for="name" class="col-md-4 col-form-label text-md-right">Firmenname</label>

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

                                @error('name')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                @enderror
                            </div>
                        </div>

                        <div class="form-group row mb-3">
                            <label for="email" class="col-md-4 col-form-label text-md-right">E-Mail Adresse</label>

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

                                <input type="hidden" name="role_id" value="3" />
                                <input type="hidden" name="description" value="" />

                                @error('email')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                @enderror
                            </div>
                        </div>

                        <div class="form-group row mb-3">
                            <label for="password" class="col-md-4 col-form-label text-md-right">Passwort</label>

                            <div class="col-md-6">
                                <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">

                                @error('password')
                                    <span class="invalid-feedback" role="alert">
                                        <strong>{{ $message }}</strong>
                                    </span>
                                @enderror
                            </div>
                        </div>

                        <div class="form-group form-check mb-3">
                            <input type="checkbox" class="form-check-input" name="terms" value="1" required="required" id="exampleCheck1">
                            <label class="form-check-label" for="exampleCheck1">Ich habe die <a href="{{url('/agb')}}" target="_blank" style="color: #f49c35">AGB</a>, sowie die <a href="{{url('/datenschutz')}}" style="color: #f49c35" target="_blank"> Datenschutzerklärung</a> gelesen und akzeptiert.</label>
                        </div>

                        <div class="form-group row mb-0">
                            <div class="col-md-6 offset-md-4">
                                <button type="submit" class="btn btn-ci h-captcha" data-sitekey="5c186ce1-22f8-4304-ab18-1d305557323c" data-callback='onSubmit'>


                                    Firmenprofil anlegen
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
@endsection



@if(App::environment('production'))


    <script src="https://hcaptcha.com/1/api.js" async defer></script>
    <script>
        function onSubmit(token) {
            document.getElementById("demo-form").submit();
        }
    </script>

@endif

