mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Merge pull request #14925 from snipe/fixes/added_2fa_string
Additional translation strings
This commit is contained in:
commit
294fb1f774
|
@ -427,10 +427,6 @@ class LoginController extends Controller
|
||||||
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.code_required'));
|
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.code_required'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $request->has('two_factor_secret')) { // TODO this seems almost the same as above?
|
|
||||||
return redirect()->route('two-factor')->with('error', 'Two-factor code is required.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$secret = $request->input('two_factor_secret');
|
$secret = $request->input('two_factor_secret');
|
||||||
|
|
||||||
|
@ -439,7 +435,7 @@ class LoginController extends Controller
|
||||||
$user->saveQuietly();
|
$user->saveQuietly();
|
||||||
$request->session()->put('2fa_authed', $user->id);
|
$request->session()->put('2fa_authed', $user->id);
|
||||||
|
|
||||||
return redirect()->route('home')->with('success', 'You are logged in!');
|
return redirect()->route('home')->with('success', trans('auth/message.signin.success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.invalid_code'));
|
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.invalid_code'));
|
||||||
|
@ -537,7 +533,7 @@ class LoginController extends Controller
|
||||||
|
|
||||||
$minutes = round($seconds / 60);
|
$minutes = round($seconds / 60);
|
||||||
|
|
||||||
$message = \Lang::get('auth/message.throttle', ['minutes' => $minutes]);
|
$message = trans('auth/message.throttle', ['minutes' => $minutes]);
|
||||||
|
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->withInput($request->only($this->username(), 'remember'))
|
->withInput($request->only($this->username(), 'remember'))
|
||||||
|
|
|
@ -49,10 +49,10 @@ class CheckForTwoFactor
|
||||||
|
|
||||||
// Otherwise make sure they're enrolled and show them the 2FA code screen
|
// Otherwise make sure they're enrolled and show them the 2FA code screen
|
||||||
if ((Auth::user()->two_factor_secret != '') && (Auth::user()->two_factor_enrolled == '1')) {
|
if ((Auth::user()->two_factor_secret != '') && (Auth::user()->two_factor_enrolled == '1')) {
|
||||||
return redirect()->route('two-factor')->with('info', 'Please enter your two-factor authentication code.');
|
return redirect()->route('two-factor')->with('info', trans('auth/message.two_factor.enter_two_factor_code'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->route('two-factor-enroll')->with('success', 'Please enroll a device in two-factor authentication.');
|
return redirect()->route('two-factor-enroll')->with('success', trans('auth/message.two_factor.please_enroll'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,5 @@ return [
|
||||||
'username_help_bottom' => 'Your username and email address <em>may</em> be the same, but may not be, depending on your configuration. If you cannot remember your username, contact your administrator. <br><br><strong>Usernames without an associated email address will not be emailed a password reset link.</strong> ',
|
'username_help_bottom' => 'Your username and email address <em>may</em> be the same, but may not be, depending on your configuration. If you cannot remember your username, contact your administrator. <br><br><strong>Usernames without an associated email address will not be emailed a password reset link.</strong> ',
|
||||||
'google_login' => 'Login with Google Workspace',
|
'google_login' => 'Login with Google Workspace',
|
||||||
'google_login_failed' => 'Google Login failed, please try again.',
|
'google_login_failed' => 'Google Login failed, please try again.',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ return array(
|
||||||
'success' => 'You have successfully logged in.',
|
'success' => 'You have successfully logged in.',
|
||||||
'code_required' => 'Two-factor code is required.',
|
'code_required' => 'Two-factor code is required.',
|
||||||
'invalid_code' => 'Two-factor code is invalid.',
|
'invalid_code' => 'Two-factor code is invalid.',
|
||||||
|
'enter_two_factor_code' => 'Please enter your two-factor authentication code.',
|
||||||
|
'please_enroll' => 'Please enroll a device in two-factor authentication.',
|
||||||
),
|
),
|
||||||
|
|
||||||
'signin' => array(
|
'signin' => array(
|
||||||
|
|
|
@ -240,6 +240,7 @@ return [
|
||||||
'restored' => 'restored',
|
'restored' => 'restored',
|
||||||
'restore' => 'Restore',
|
'restore' => 'Restore',
|
||||||
'requestable_models' => 'Requestable Models',
|
'requestable_models' => 'Requestable Models',
|
||||||
|
'requestable_items' => 'Requestable Items',
|
||||||
'requested' => 'Requested',
|
'requested' => 'Requested',
|
||||||
'requested_date' => 'Requested Date',
|
'requested_date' => 'Requested Date',
|
||||||
'requested_assets' => 'Requested Assets',
|
'requested_assets' => 'Requested Assets',
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
@extends('layouts/default')
|
@extends('layouts/default')
|
||||||
|
|
||||||
@section('title0')
|
@section('title0')
|
||||||
{{ trans('admin/hardware/general.requestable') }}
|
{{ trans('general.requestable_items') }}
|
||||||
{{ trans('general.assets') }}
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
{{-- Page title --}}
|
{{-- Page title --}}
|
||||||
|
|
|
@ -780,7 +780,7 @@ dir="{{ in_array(app()->getLocale(),['ar-SA','fa-IR', 'he-IL']) ? 'rtl' : 'ltr'
|
||||||
<li{!! (Request::is('account/requestable-assets') ? ' class="active"' : '') !!}>
|
<li{!! (Request::is('account/requestable-assets') ? ' class="active"' : '') !!}>
|
||||||
<a href="{{ route('requestable-assets') }}">
|
<a href="{{ route('requestable-assets') }}">
|
||||||
<i class="fa fa-laptop fa-fw"></i>
|
<i class="fa fa-laptop fa-fw"></i>
|
||||||
<span>{{ trans('admin/hardware/general.requestable') }}</span>
|
<span>{{ trans('general.requestable_items') }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
Loading…
Reference in a new issue