@extends('install.layout')

@section('title', trans('installer.administrator_title'))
@section('content')
    <h3>@lang('installer.administrator_title')</h3>
    <p>@lang('installer.administrator_intro')</p>

    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $form_error)
                    <li>{{ $form_error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <div class="row" style="margin-top: 30px;">
        <div class="col-md-6 mr-md-auto ml-md-auto">
            <form action="{{ route('install.administrator') }}" method="post">
                {{ csrf_field() }}
                <div class="form-group">
                    <label for="name">Name:</label>
                    <input type="text" class="form-control" id="name" name="name" value="{{ old('name') }}" />
                </div>

                <div class="form-group">
                    <label for="email">E-mail address:</label>
                    <input type="email" class="form-control" id="email" name="email" value="{{ old('email') }}" />
                </div>

                <div class="form-group">
                    <label for="password">Password:</label>
                    <input type="password" class="form-control" id="password" name="password" value="{{ old('password') }}" />
                </div>

                <div class="form-group">
                    <label for="password-confirm">Confirm Password:</label>
                    <input type="password" class="form-control" id="password-confirm" name="password_confirmation" value="{{ old('password-confirm') }}" />
                </div>

                <div class="form-group text-right">
                    @if ($can_skip)
                        <a class="btn btn-default" href="{{ route('install.administrator', ['skip' => 1]) }}">Skip</a>
                    @endif
                    <button type="submit" class="btn btn-success"><i class="fa fa-fw fa-check"></i> @lang('forms.continue_action')</button>
                </div>
            </form>
        </div>
    </div>
@endsection