Capturing pilot transfer hours

This commit is contained in:
Kevin
2018-09-05 08:09:33 +08:00
parent ec873f2b82
commit b73182f830
11 changed files with 44 additions and 2 deletions

View File

@@ -20,4 +20,5 @@ return [
'deniedmessage' => 'Your registration was denied. Please contact an administrator.',
'accountsuspended' => 'Account Suspended',
'suspendedmessage' => 'Your account has been suspended. Please contact an administrator.',
'transferhours' => 'Transfer Hours',
];

View File

@@ -14,4 +14,5 @@ return [
'updateprofile' => 'Update Profile',
'editprofile' => 'Edit Profile',
'edityourprofile' => 'Edit Your Profile',
'transferhours' => 'Transferred Hours',
];

View File

@@ -20,4 +20,5 @@ return [
'deniedmessage' => 'La tua registrazione è stata rifiutata. Contatta un amministratore per favore.',
'accountsuspended' => 'Account Sospeso',
'suspendedmessage' => 'Il tuo account è stato sospeso. Contatta un amministratore per favore.',
'transferhours' => 'Ore di trasferimento',
];

View File

@@ -13,4 +13,5 @@ return [
'updateprofile' => 'Aggiorna Profilo',
'editprofile' => 'Modifica Profilo',
'edityourprofile' => 'Modifica Il Tuo Profilo',
'transferhours' => 'Ore trasferite',
];

View File

@@ -30,6 +30,11 @@
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2' ]) }}
<p class="text-danger">{{ $errors->first('timezone') }}</p>
</div>
<div class="form-group col-sm-4">
{{ Form::label('transfer_time', 'Transferred Hours:') }}
{{ Form::text('transfer_time', \App\Facades\Utils::minutesToHours($user->transfer_time), ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('transfer_time') }}</p>
</div>
</div>
<div class="form-group col-sm-6">
{{ Form::label('home_airport_id', 'Home Airport:') }}

View File

@@ -59,6 +59,16 @@
<p class="text-danger">{{ $errors->first('timezone') }}</p>
@endif
@if (setting('pilots.allow_transfer_hours') === true)
<label for="transfer_time" class="control-label">@lang('auth.transferhours')</label>
<div class="input-group form-group-no-border {{ $errors->has('transfer_time') ? 'has-danger' : '' }}">
{{ Form::text('transfer_time', 0, ['class' => 'form-control']) }}
</div>
@if ($errors->has('transfer_time'))
<p class="text-danger">{{ $errors->first('transfer_time') }}</p>
@endif
@endif
<label for="password" class="control-label">@lang('auth.password')</label>
<div class="input-group form-group-no-border {{ $errors->has('password') ? 'has-danger' : '' }}">
{{ Form::password('password', ['class' => 'form-control']) }}

View File

@@ -45,6 +45,13 @@
</div>
@endif
@if(setting('pilots.allow_transfer_hours') === true)
<div class="social-description">
<h2>{{ \App\Facades\Utils::minutesToHours($user->transfer_time) }}h</h2>
<p>@lang('profile.transferhours')</p>
</div>
@endif
</div>
</div>
</div>