diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index e77edf68fc32..35e6a03c4430 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -701,6 +701,8 @@ class AccountController extends \BaseController { Session::set(REQUESTED_PRO_PLAN, true); } + Session::set(SESSION_COUNTER, -1); + return "{$user->first_name} {$user->last_name}"; } } \ No newline at end of file diff --git a/app/filters.php b/app/filters.php index fed0bd40712e..6e3db447ef3d 100755 --- a/app/filters.php +++ b/app/filters.php @@ -13,6 +13,9 @@ App::before(function($request) { + $count = Session::get(SESSION_COUNTER, 0); + Session::put(SESSION_COUNTER, ++$count); + if (App::environment() == ENV_PRODUCTION) { if (!Request::secure()) diff --git a/app/lang/de/validation.php b/app/lang/de/validation.php index 4ceff2e3aada..10e5cd2b7c2a 100644 --- a/app/lang/de/validation.php +++ b/app/lang/de/validation.php @@ -71,6 +71,10 @@ return array( "unique" => ":attribute ist schon vergeben.", "url" => "Das Format von :attribute ist ungültig.", + "positive" => "The :attribute must be greater than zero.", + "has_credit" => "The client does not have enough credit.", + "notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- | Custom Validation Language Lines diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index 8e6543f0f682..ce09b67aa86f 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -323,7 +323,7 @@ return array( 'field_label' => 'Field Label', 'field_value' => 'Field Value', 'edit' => 'Edit', - + 'set_name' => 'Set your company name', diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php index dbc3f27e983d..68b39c68af2f 100755 --- a/app/lang/en/validation.php +++ b/app/lang/en/validation.php @@ -71,7 +71,7 @@ return array( "positive" => "The :attribute must be greater than zero.", "has_credit" => "The client does not have enough credit.", - + "notmasked" => "The values are masked", /* |-------------------------------------------------------------------------- diff --git a/app/lang/es/validation.php b/app/lang/es/validation.php index b17accaa163f..2baee0ab1da4 100755 --- a/app/lang/es/validation.php +++ b/app/lang/es/validation.php @@ -73,6 +73,10 @@ return array( "positive" => ":attribute debe ser mayor que cero.", "has_credit" => "el cliente no tiene crédito suficiente.", + "positive" => "The :attribute must be greater than zero.", + "has_credit" => "The client does not have enough credit.", + "notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- diff --git a/app/lang/fr/validation.php b/app/lang/fr/validation.php index 967ffbca1ce1..bb337904f75c 100644 --- a/app/lang/fr/validation.php +++ b/app/lang/fr/validation.php @@ -71,6 +71,10 @@ return array( "unique" => "La valeur du champ :attribute est déjà utilisée.", "url" => "Le format de l'URL de :attribute n'est pas valide.", + "positive" => "The :attribute must be greater than zero.", + "has_credit" => "The client does not have enough credit.", + "notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- | Custom Validation Language Lines diff --git a/app/lang/it/validation.php b/app/lang/it/validation.php index 3d2f8ce2987c..9d1d547d8beb 100644 --- a/app/lang/it/validation.php +++ b/app/lang/it/validation.php @@ -70,6 +70,10 @@ return array( "unique" => ":attribute è stato già utilizzato.", "url" => ":attribute deve essere un URL.", + "positive" => "The :attribute must be greater than zero.", + "has_credit" => "The client does not have enough credit.", + "notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- | Custom Validation Language Lines diff --git a/app/lang/nl/validation.php b/app/lang/nl/validation.php index 39fce046e258..81ab739e520f 100644 --- a/app/lang/nl/validation.php +++ b/app/lang/nl/validation.php @@ -74,6 +74,10 @@ return array( "positive" => ":attribute moet groter zijn dan nul.", "has_credit" => "De klant heeft niet voldoende krediet.", + "positive" => "The :attribute must be greater than zero.", + "has_credit" => "The client does not have enough credit.", + "notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- | Custom Validation Language Lines diff --git a/app/lang/pt_BR/validation.php b/app/lang/pt_BR/validation.php index 8123efa69524..27d5c008900c 100644 --- a/app/lang/pt_BR/validation.php +++ b/app/lang/pt_BR/validation.php @@ -72,6 +72,10 @@ return array( "positive" => ":attribute deve ser maior que zero.", "has_credit" => "O cliente não possui crédito suficiente.", +"positive" => "The :attribute must be greater than zero.", +"has_credit" => "The client does not have enough credit.", +"notmasked" => "The values are masked", + /* |-------------------------------------------------------------------------- diff --git a/app/models/User.php b/app/models/User.php index 441a78b968eb..11741b5fc85f 100755 --- a/app/models/User.php +++ b/app/models/User.php @@ -114,12 +114,32 @@ class User extends ConfideUser implements UserInterface, RemindableInterface return !$this->theme_id || in_array($this->theme_id, [2, 3, 5, 6, 7, 8, 10, 11, 12]); } - public function showSignUpPopOver() + public function getRequestsCount() { - $count = Session::get(SESSION_COUNTER, 0); - Session::put(SESSION_COUNTER, ++$count); + return Session::get(SESSION_COUNTER, 0); + } - return $count == 1 || $count % 7 == 0; + public function getPopOverText() + { + if (!Auth::check()) + { + return false; + } + + $count = self::getRequestsCount(); + if ($count == 1 || $count % 5 == 0) + { + if (!Utils::isRegistered()) + { + return trans('texts.sign_up_to_save'); + } + else if (!Auth::user()->account->name) + { + return trans('texts.set_name'); + } + } + + return false; } public function afterSave($success=true, $forced = false) diff --git a/app/views/header.blade.php b/app/views/header.blade.php index d48e5bbbcec8..d4f2bf6398c1 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -108,32 +108,29 @@
diff --git a/app/views/master.blade.php b/app/views/master.blade.php index 927f6ad90088..f9c617b0e5f7 100755 --- a/app/views/master.blade.php +++ b/app/views/master.blade.php @@ -30,7 +30,7 @@