Merge pull request #3828 from beganovich/v2-2206-setup-page-fixes

Improve setup page
This commit is contained in:
David Bomba 2020-06-25 07:18:07 +10:00 committed by GitHub
commit cc265e0ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 17 deletions

View File

@ -3222,4 +3222,6 @@ return [
'credit_card_invalid' => 'Provided credit card number is not valid.', 'credit_card_invalid' => 'Provided credit card number is not valid.',
'month_invalid' => 'Provided month is not valid.', 'month_invalid' => 'Provided month is not valid.',
'year_invalid' => 'Provided year is not valid.', 'year_invalid' => 'Provided year is not valid.',
'if_you_need_help' => 'If you need help you can either post to our',
]; ];

View File

@ -15,8 +15,9 @@
</dt> </dt>
<dd class="text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@foreach($check['extensions'] as $extension) @foreach($check['extensions'] as $extension)
<span class="alert py-1 {{ $extension[key($extension)] == true ? 'alert-success' : 'alert-failure' }} block w-full"> <span class="alert py-1 {{ $extension[key($extension)] == true ? 'alert-success' : 'alert-failure' }} block w-full flex justify-between items-center">
{{ key($extension) }} <span>{{ key($extension) }}</span>
<span>{{ $extension[key($extension)] == true ? '✔' : '❌' }}</span>
</span> </span>
@endforeach @endforeach
</dd> </dd>
@ -27,15 +28,17 @@
</dt> </dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@if($check['php_version']['is_okay']) @if($check['php_version']['is_okay'])
<span class="alert alert-success block"> <span class="alert alert-success block flex justify-between items-center">
{{ strtoupper(ctrans('texts.ok')) }}! <span>{{ strtoupper(ctrans('texts.ok')) }}</span>
<span></span>
</span> </span>
@else @else
<span class="alert block"> <span class="alert block">
{{ ctrans('texts.minumum_php_version') }}: {{ $check['php_version']['minimum_php_version'] }} {{ ctrans('texts.minumum_php_version') }}: {{ $check['php_version']['minimum_php_version'] }}
</span> </span>
<span class="alert alert-failure block"> <span class="alert alert-failure block flex justify-between items-center">
{{ ctrans('texts.current') }}: {{ $check['php_version']['current_php_version'] }} <span>{{ ctrans('texts.current') }}: {{ $check['php_version']['current_php_version'] }}</span>
<span></span>
</span> </span>
@endif @endif
</dd> </dd>
@ -46,12 +49,14 @@
</dt> </dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@if($check['env_writable']) @if($check['env_writable'])
<span class="alert alert-success block"> <span class="alert alert-success block flex justify-between items-center">
{{ strtoupper(ctrans('texts.ok')) }}! <span>{{ strtoupper(ctrans('texts.ok')) }}</span>
<span></span>
</span> </span>
@else @else
<span class="alert alert-failure block"> <span class="alert alert-failure block flex justify-between items-center">
{{ ctrans('texts.env_not_writable') }} <span>{{ ctrans('texts.env_not_writable') }}</span>
<span></span>
</span> </span>
@endif @endif
</dd> </dd>

View File

@ -7,16 +7,15 @@
@endpush @endpush
@section('body') @section('body')
<div class="container mx-auto mb-10"> <div class="container mx-auto mb-10 mt-4">
<form action="{{ url('/setup') }}" method="post"> <form action="{{ url('/setup') }}" method="post">
@csrf @csrf
<div class="grid grid-cols-12 px-6"> <div class="grid grid-cols-12 px-6">
<div class="col-span-12 md:col-start-4 md:col-span-6 mt-4 md:mt-10"> <div class="col-span-12 md:col-start-4 md:col-span-6 mt-4 md:mt-10">
<h1 class="text-center text-2xl font-semibold">Invoice Ninja Setup</h1> <h1 class="text-center text-2xl font-semibold">Invoice Ninja Setup</h1>
<p class="text-sm text-center">If you need help you can either post to our <p class="text-sm text-center">{{ ctrans('texts.if_you_need_help') }}
<a href="https://www.invoiceninja.com/forums/forum/support/" class="button-link">support forum</a> <a href="https://www.invoiceninja.com/forums/forum/support/" class="button-link">{{ ctrans('texts.support_forum') }}</a>
or email us at <a href="mailto:contact@invoiceninja.com" class="button-link">contact@invoiceninja.com</a>.
</p> </p>
@if($errors->any()) @if($errors->any())
@ -31,7 +30,7 @@
@if(session()->has('setup_error')) @if(session()->has('setup_error'))
<div class="alert alert-failure mt-4"> <div class="alert alert-failure mt-4">
<span class="font-bold">Oops, something wen't wrong:</span> <span class="font-bold">{{ ctrans('texts.error_title') }}:</span>
<pre class="bg-white p-3 mt-2 rounded overflow-y-scroll">{{ session('setup_error') }}</pre> <pre class="bg-white p-3 mt-2 rounded overflow-y-scroll">{{ session('setup_error') }}</pre>
</div> </div>
@endif @endif
@ -49,13 +48,13 @@
<div class="flex flex-col"> <div class="flex flex-col">
<div class="mt-4 text-sm"> <div class="mt-4 text-sm">
<input type="checkbox" class="form-checkbox mr-2" name="terms_of_service" required> <input type="checkbox" class="form-checkbox mr-2" name="terms_of_service" required>
<span>I agree to <span>{{ ctrans('texts.i_agree') }}
<a class="button-link" href="https://www.invoiceninja.com/self-hosting-terms-service/">{{ ctrans('texts.terms_of_service') }}</a> <a class="button-link" href="https://www.invoiceninja.com/self-hosting-terms-service/">{{ ctrans('texts.terms_of_service') }}</a>
</span> </span>
</div> </div>
<div class="mt-2 text-sm"> <div class="mt-2 text-sm">
<input type="checkbox" class="form-checkbox mr-2" name="privacy_policy" required> <input type="checkbox" class="form-checkbox mr-2" name="privacy_policy" required>
<span>I agree to <span>{{ ctrans('texts.i_agree') }}
<a class="button-link" href="https://www.invoiceninja.com/self-hosting-privacy-data-control/">{{ ctrans('texts.privacy_policy') }}</a> <a class="button-link" href="https://www.invoiceninja.com/self-hosting-privacy-data-control/">{{ ctrans('texts.privacy_policy') }}</a>
</span> </span>
</div> </div>