@extends('layouts.master')
@section('pagecss')
<style>
    {!! file_get_contents(public_path('css/smart_wizard.min.css')) !!}
</style>
@stop
@section('content')
    <form action="{{ route('register') }}" method="post" class="pt-3">
        @csrf
        @include('partials.messages')
        <div class="card card-default border-0">
            <div class="card-body">
                <div id="smartwizard">
                    <ul class="nav justify-content-sm-center">
                        <li><a class="nav-link" href="#step-1">@lang('Terms of Service')<br><small>@lang('Read this carefully')</small></a></li>
                        <li><a class="nav-link" href="#step-2">@lang('Your account')<br><small>@lang('Please provide your credentials')</small></a></li>
                        <li><a class="nav-link" href="#step-3">@lang('Confirm registration')<br><small>@lang('Please confirm your registration')</small></a></li>
                    </ul>
                    <div class="tab-content">
                        <div id="step-1" class="tab-pane">
                            <p>
                                Whilst we attempt to edit or remove any messages containing inappropriate, sexually
                                orientated, abusive, hateful, slanderous, or threatening material that could be
                                considered invasive of a person's privacy, or which otherwise violate any kind of law,
                                it is impossible for us to review every message posted on this discussion system. For
                                this reason you acknowledge that all messages posted on this discussion system express
                                the views and opinions of the original message author and not necessarily the views of
                                this bulletin board. Therefore we take no responsibility and cannot be held liable for
                                any messages posted. We do not vouch for or warrant the accuracy and completeness of
                                every message.
                            </p>
                            <p>
                                By registering on this discussion system you agree that you will not post any material
                                which is knowingly false, inaccurate, abusive, hateful, harassing, sexually orientated,
                                threatening or invasive of a person's privacy, or any other material which may violate
                                any applicable laws.
                            </p>
                            <p>
                                Failure to comply with these rules may result in the termination of your account,
                                account suspension, or permanent ban of access to these forums. Your IP Address is
                                recorded with each post you make on this discussion system and is retrievable by the
                                forum staff if need-be. You agree that we have the ability and right to remove, edit,
                                or lock any account or message at any time should it be seen fit. You also agree that
                                any information you enter on this discussion system is stored in a database, and that
                                "cookies" are stored on your computer to save your login information.
                            </p>
                            <p>
                                Any information you provide on these forums will not be disclosed to any third party
                                without your complete consent, although the staff cannot be held liable for any hacking
                                attempt in which your data is compromised.
                            </p>
                            <hr>
                            <p class="text-danger font-weight-bold">
                                The account you are about to create will expire after 4 weeks.
                            </p>
                            <p>
                                Within this 4 weeks you can view all threads marked as "public" by the respective creator.
                            </p>
                            <p>
                                You'll not have the possibility to create threads or postings. Furthermore these accounts
                                do not have any profile data, therefore you can't have an avatar, use the internal message
                                system or subscribe to any subforums.
                            </p>
                            <p class="font-weight-bold">
                                If you keep your sharing ratio above 1.0 within this 4 weeks, you will have the opportunity
                                to convert your temporary account to a permanent account. The sharing ratio is calculated
                                by the amounts of bytes you downloaded and uploaded.
                            </p>
                            <hr>
                            <p>
                                By continuing with the sign up process you agree to the above rules and any others that
                                the Administrator specifies.
                            </p>
                            <a href="#step-2" class="btn btn-primary btn-lg">
                                <span class="fas fa-angle-double-right"></span> @lang('Continue')
                            </a>
                        </div>
                        <div id="step-2" class="tab-pane">
                            <input type="hidden" name="step" value="2">
                            <div class="input-group justify-content-between">
                                <div class="form-floating flex-grow-1">
                                    <input class="form-control{{ ' is-' . ($errors->has('email') ? 'invalid' : (old('email') ? 'valid' : '')) }}" name="email" id="email" value="{{ old('email') }}" placeholder="email@example.com">
                                    <label for="email">@lang('Email address')</label>
                                </div>
                                <button class="btn btn-primary btn-lg">
                                    <span class="fas fa-angle-double-right"></span> @lang('Continue')
                                </button>
                            </div>
                        </div>
                        <div id="step-3" class="tab-pane">
                            <input type="hidden" name="step" value="3">
                            <p>
                                @lang('An email with generated credentials and a confirmation code has been dispatched to the provided email address.')
                            </p>
                            <p>
                                @lang('Please confirm your registration by entering the confirmation code from the email.')
                            </p>
                            <div class="form-floating">
                                <label class="col-form-label" for="confirmcode">@lang('Confirmation code')</label>
                                <input class="form-control" name="confirmcode" id="confirmcode">
                            </div>
                            <button class="btn btn-primary btn-lg" form="{{ route('register-confirm') }}">
                                <span class="fas fa-angle-double-right"></span> @lang('Continue')
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
@stop
@section('pagejs')
<script src="{{ asset('js/jquery.smartWizard.min.js') }}"></script>
<script>
    $(document).ready(function(){
        $('#smartwizard').smartWizard({
            anchorSettings: {
                anchorClickable: true, // Enable/Disable anchor navigation
                enableAllAnchors: false, // Activates all anchors clickable all times
                markDoneStep: true, // add done css
                enableAnchorOnDoneStep: false, // Enable/Disable the done steps navigation
                markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
            },
            toolbarSettings: {
                toolbarPosition: 'bottom', // none, top, bottom, both
                toolbarButtonPosition: 'center', // left, right
                showNextButton: false, // show/hide a Next button
                showPreviousButton: false, // show/hide a Previous button
            },
            theme: 'dots',
            transitionEffect: 'fade', // Effect on navigation, none/slide/fade
        });
    });
</script>
@stop
