mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added sign up popover message
This commit is contained in:
parent
dcc68a6c38
commit
36cf1810e8
@ -109,6 +109,14 @@ 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()
|
||||
{
|
||||
$count = Session::get(SESSION_COUNTER, 0);
|
||||
Session::put(SESSION_COUNTER, ++$count);
|
||||
|
||||
return $count == 1 || $count % 7 == 0;
|
||||
}
|
||||
|
||||
public function afterSave($success=true, $forced = false)
|
||||
{
|
||||
if ($this->email)
|
||||
|
@ -250,6 +250,7 @@ define('SESSION_CURRENCY', 'currency');
|
||||
define('SESSION_DATE_FORMAT', 'dateFormat');
|
||||
define('SESSION_DATE_PICKER_FORMAT', 'datePickerFormat');
|
||||
define('SESSION_DATETIME_FORMAT', 'datetimeFormat');
|
||||
define('SESSION_COUNTER', 'sessionCounter');
|
||||
|
||||
define('DEFAULT_TIMEZONE', 'US/Eastern');
|
||||
define('DEFAULT_CURRENCY', 1); // US Dollar
|
||||
|
@ -94,6 +94,13 @@
|
||||
<div class="navbar-form navbar-right">
|
||||
@if (Auth::check() && !Auth::user()->registered)
|
||||
{{ Button::sm_success_primary('Sign up', array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal')) }}
|
||||
|
||||
@if ($showSignUpPopOver = Auth::user()->showSignUpPopOver())
|
||||
<button id="signUpPopOver" type="button" class="btn btn-default" data-toggle="popover" data-placement="bottom" data-content="Sign up to set your login credentials." data-html="true">
|
||||
Sign Up
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
||||
@if (Auth::check())
|
||||
@ -103,7 +110,7 @@
|
||||
@if (Auth::check() && Auth::user()->registered)
|
||||
{{ Auth::user()->getFullName() }}
|
||||
@else
|
||||
My Company
|
||||
Guest
|
||||
@endif
|
||||
</span>
|
||||
<span class="caret"></span>
|
||||
@ -471,9 +478,17 @@
|
||||
}, 3000);
|
||||
@endif
|
||||
|
||||
@if ($showSignUpPopOver)
|
||||
$('#signUpPopOver').popover('show').hide();
|
||||
$('body').click(function() {
|
||||
$('#signUpPopOver').popover('hide');
|
||||
});
|
||||
@endif
|
||||
|
||||
@yield('onReady')
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@stop
|
@ -616,6 +616,9 @@ color: #fff;
|
||||
background-color: #08273c;
|
||||
border-color: #08273c;
|
||||
}
|
||||
#signUpPopOver {
|
||||
cursor: pointer;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
|
||||
color: #ecf0f1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user