Fix for lastpass issue

This commit is contained in:
Hillel Coren 2018-02-16 11:05:44 +02:00
parent 215736f8fd
commit 5ba715dedb
4 changed files with 33 additions and 24 deletions

View File

@ -138,7 +138,7 @@ class AccountController extends BaseController
Session::flash('warning', $message);
}
$redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'invoices/create';
$redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'dashboard';
return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up'));
}

View File

@ -64,7 +64,7 @@ class AccountRepository
// Set default language/currency based on IP
if (\Cache::get('currencies')) {
$data = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $account->ip));
if ($data = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $account->ip))) {
$currencyCode = strtolower($data['geoplugin_currencyCode']);
$countryCode = strtolower($data['geoplugin_countryCode']);
@ -89,6 +89,7 @@ class AccountRepository
$account->language_id = $language->id;
}
}
}
$account->save();

View File

@ -250,7 +250,7 @@
@if (Auth::check())
@if (!Auth::user()->registered)
@if (!Auth::user()->confirmed)
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal', 'style' => 'max-width:100px;;overflow:hidden'))->small() !!}  
{!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'onclick' => 'showSignUp()', 'style' => 'max-width:100px;;overflow:hidden'))->small() !!}  
@endif
@elseif (Utils::isNinjaProd() && (!Auth::user()->isPro() || Auth::user()->isTrial()))
@if (Auth::user()->account->company->hasActivePromo())

View File

@ -36,8 +36,12 @@
function showSignUp() {
if (location.href.indexOf('/dashboard') == -1) {
location.href = "{{ url('/dashboard') }}?sign_up=true";
} else {
$('#signUpModal').modal('show');
}
}
function hideSignUp() {
$('#signUpModal').modal('hide');
@ -214,18 +218,22 @@
{!! Former::text('new_first_name')
->placeholder(trans('texts.first_name'))
->autocomplete('given-name')
->data_lpignore('true')
->label(' ') !!}
{!! Former::text('new_last_name')
->placeholder(trans('texts.last_name'))
->autocomplete('family-name')
->data_lpignore('true')
->label(' ') !!}
{!! Former::text('new_email')
->placeholder(trans('texts.email'))
->autocomplete('email')
->data_lpignore('true')
->label(' ') !!}
{!! Former::text('new_password')
->placeholder(trans('texts.password'))
->autocomplete('new-password')
->data_lpignore('true')
->label(' ') !!}
{{ Former::setOption('TwitterBootstrap3.labelWidths.large', 4) }}