diff --git a/app/Http/Controllers/EsiScopeController.php b/app/Http/Controllers/EsiScopeController.php
index 55437af68..19fb4432f 100644
--- a/app/Http/Controllers/EsiScopeController.php
+++ b/app/Http/Controllers/EsiScopeController.php
@@ -24,8 +24,6 @@ class EsiScopeController extends Controller
public function displayScopes() {
//Get the ESI Scopes for the user
$scopes = DB::table('EsiScopes')->where('character_id', Auth::user()->character_id)->get();
- //We want to send the scopes to the page as pre-checked.
- dd($scopes[0]->scope);
return view('scopes.select')->with('scopes', $scopes);
}
diff --git a/resources/views/scopes/select.blade.php b/resources/views/scopes/select.blade.php
index 37c7ef807..26a422077 100644
--- a/resources/views/scopes/select.blade.php
+++ b/resources/views/scopes/select.blade.php
@@ -1,44 +1,165 @@
@extends('layouts.b4');
@section('content')
+
Select Scopes for ESI
{!! Form::open(['action' => 'EsiScopeController@redirectToProvider', 'method' => 'POST']) !!}
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'publicData')
+
+ {{ Form::label('scopes[]', 'Public Data') }}
+ {{ Form::checkbox('scopes[]', 'publicData', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-fleets.write_fleet.v1')
+
+ {{ Form::label('scopes[]', 'Write Fleet') }}
+ {{ Form::checkbox('scopes[]', 'esi-fleets.write_fleet.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-fleets.read_fleet.v1')
+
+ {{ Form::label('scopes[]', 'Read Fleet') }}
+ {{ Form::checkbox('scopes[]', 'esi-fleets.read_fleet.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-location.read_location.v1')
+
+ {{ Form::label('scopes[]', 'Read Location') }}
+ {{ Form::checkbox('scopes[]', 'esi-location.read_location.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-mail.send_mail.v1')
+
+ {{ Form::label('scopes[]', 'Write Mail') }}
+ {{ Form::checkbox('scopes[]', 'esi-mail.send_mail.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-mail.read_mail.v1')
+
+ {{ Form::label('scopes[]', 'Read Mail') }}
+ {{ Form::checkbox('scopes[]', 'esi-mail.read_mail.v1', 'true')}}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-wallet.read_corporation_wallets.v1')
+
+ {{ Form::label('scopes[]', 'Corporation Wallets') }}
+ {{ Form::checkbox('scopes[]', 'esi-wallet.read_corporation_wallets.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-corporations.read_structures.v1')
+
+ {{ Form::label('scopes[]', 'Read Structures') }}
+ {{ Form::checkbox('scopes[]', 'esi-corporations.read_structures.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+ @foreach($scopes as $scope)
+ @if($scope->scope == 'esi-markets.structure_markets.v1')
+
+ {{ Form::label('scopes[]', 'Structure Markets') }}
+ {{ Form::checkbox('scopes[]', 'esi-markets.structure_markets.v1', 'true') }}
+
+
+ @break
+ @endif
+ @endforeach
+
+ @if($publicData == false)
{{ Form::label('scopes[]', 'Public Data') }}
{{ Form::checkbox('scopes[]', 'publicData') }}
+ @endif
+ @if($writeFleet == false)
{{ Form::label('scopes[]', 'Write Fleet') }}
{{ Form::checkbox('scopes[]', 'esi-fleets.write_fleet.v1') }}
+ @endif
+ @if($readFleet == false)
{{ Form::label('scopes[]', 'Read Fleet') }}
{{ Form::checkbox('scopes[]', 'esi-fleets.read_fleet.v1') }}
+ @endif
+ @if($readLocation == false)
{{ Form::label('scopes[]', 'Read Location') }}
{{ Form::checkbox('scopes[]', 'esi-location.read_location.v1') }}
+ @endif
+ @if($writeMail == false)
{{ Form::label('scopes[]', 'Write Mail') }}
{{ Form::checkbox('scopes[]', 'esi-mail.send_mail.v1') }}
+ @endif
+ @if($readMail == false)
{{ Form::label('scopes[]', 'Read Mail') }}
{{ Form::checkbox('scopes[]', 'esi-mail.read_mail.v1')}}
+ @endif
+ @if($readCorpWallets == false)
{{ Form::label('scopes[]', 'Corporation Wallets') }}
{{ Form::checkbox('scopes[]', 'esi-wallet.read_corporation_wallets.v1') }}
+ @endif
+ @if($readStructures == false)
{{ Form::label('scopes[]', 'Read Structures') }}
{{ Form::checkbox('scopes[]', 'esi-corporations.read_structures.v1') }}
+ @endif
+ @if($structureMarkets == false)
{{ Form::label('scopes[]', 'Structure Markets') }}
{{ Form::checkbox('scopes[]', 'esi-markets.structure_markets.v1') }}
+ @endif
+
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
{!! Form::close() !!}