Fix for ACARS config download button not working #919 (#1009)

* Fix For Acars Config Download Button No Working Bug #919

PR fixes the Acars Config Download button not showing up at user profile.

Also fixes the problem where Generate New Api Key button not following user selections and generating a new key even if user clicks cancel.

* Style Fix for ? and !

Fix the typo :)
This commit is contained in:
B.Fatih KOZ 2021-01-26 00:04:43 +03:00 committed by GitHub
parent 5821067231
commit 4911f6799d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class ProfileController extends Controller
{
// Is the ACARS module enabled?
$acars_enabled = false;
$acars = Module::find('VMSACARS');
$acars = Module::find('VMSAcars');
if ($acars) {
$acars_enabled = $acars->isEnabled();
}
@ -95,6 +95,7 @@ class ProfileController extends Controller
'user' => $user,
'userFields' => $userFields,
'airports' => $airports,
'acars' => $this->acarsEnabled(),
]);
}

View File

@ -133,11 +133,11 @@
<div class="text-right">
@if (isset($acars) && $acars === true)
<a href="{{ route('frontend.profile.acars') }}" class="btn btn-primary"
onclick="alert('Save to \'My Documents/phpVMS\'')">ACARS Config</a>
onclick="alert('Copy or Save to \'My Documents/phpVMS\'')">ACARS Config</a>
&nbsp;
@endif
<a href="{{ route('frontend.profile.regen_apikey') }}" class="btn btn-warning"
onclick="return confirm({{ __('Are you sure? This will reset your API key.') }})">@lang('profile.newapikey')</a>
onclick="return confirm('Are you sure? This will reset your API key!')">@lang('profile.newapikey')</a>
&nbsp;
<a href="{{ route('frontend.profile.edit', [$user->id]) }}"
class="btn btn-primary">@lang('common.edit')</a>