mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 00:11:35 +02:00
Working on pro plan
This commit is contained in:
parent
c49da09f8a
commit
8e3f602e3a
@ -62,13 +62,17 @@ class AccountController extends \BaseController {
|
||||
}
|
||||
|
||||
public function enableProPlan()
|
||||
{
|
||||
$account = Auth::user()->account;
|
||||
dd(Request::all());
|
||||
if ($account->pro_plan)
|
||||
{
|
||||
if (Auth::user()->isPro())
|
||||
{
|
||||
return Redirect::to('/dashboard');
|
||||
}
|
||||
|
||||
$account = Auth::user()->account;
|
||||
|
||||
$client = new Client;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function setTrashVisible($entityType, $visible)
|
||||
|
@ -14,7 +14,7 @@ class AddProPlan extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->boolean('pro_plan');
|
||||
$table->timestamp('pro_plan_paid');
|
||||
});
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ class AddProPlan extends Migration {
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->dropColumn('pro_plan');
|
||||
$table->dropColumn('pro_plan_paid');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -287,5 +287,11 @@ return array(
|
||||
'password_reset' => 'Dein Passwort wurde erfolgreich geändert.',
|
||||
'wrong_password_reset' => 'Ungültiges Passwort. Versuche es erneut',
|
||||
),
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
);
|
||||
|
@ -278,7 +278,7 @@ return array(
|
||||
'cvv' => 'CVV',
|
||||
|
||||
// Security alerts
|
||||
'confide' => array(
|
||||
'confide' => [
|
||||
'too_many_attempts' => 'Too many attempts. Try again in few minutes.',
|
||||
'wrong_credentials' => 'Incorrect email or password.',
|
||||
'confirmation' => 'Your account has been confirmed!',
|
||||
@ -286,7 +286,12 @@ return array(
|
||||
'password_forgot' => 'The information regarding password reset was sent to your email.',
|
||||
'password_reset' => 'Your password has been changed successfully.',
|
||||
'wrong_password_reset' => 'Invalid password. Try again',
|
||||
),
|
||||
],
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
);
|
@ -286,6 +286,12 @@ return array(
|
||||
'password_reset' => 'Your password has been changed successfully.',
|
||||
'wrong_password_reset' => 'Invalid password. Try again',
|
||||
),
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
|
||||
);
|
||||
|
@ -287,6 +287,12 @@ return array(
|
||||
'password_reset' => 'Your password has been changed successfully.',
|
||||
'wrong_password_reset' => 'Invalid password. Try again',
|
||||
),
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
|
||||
);
|
||||
|
@ -288,6 +288,12 @@ return array(
|
||||
'wrong_password_reset' => 'Invalid password. Try again',
|
||||
),
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
|
||||
|
||||
);
|
@ -276,4 +276,11 @@ return array(
|
||||
'expiration_year' => 'Ano de expiração',
|
||||
'cvv' => 'CVV',
|
||||
|
||||
// Pro Plan
|
||||
'pro_plan' => [
|
||||
'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan',
|
||||
'remove_logo_link' => 'Click here',
|
||||
],
|
||||
|
||||
|
||||
);
|
||||
|
@ -5,6 +5,11 @@ class Utils
|
||||
public static function isProd()
|
||||
{
|
||||
return App::environment() == ENV_PRODUCTION;
|
||||
}
|
||||
|
||||
public static function isNinjaProd()
|
||||
{
|
||||
return $_SERVER['SERVER_NAME'] == 'www.invoiceninja.com';
|
||||
}
|
||||
|
||||
public static function basePath()
|
||||
|
@ -104,6 +104,16 @@ class User extends ConfideUser implements UserInterface, RemindableInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function isPro()
|
||||
{
|
||||
if (!Auth::check())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->account->pro_plan;
|
||||
}
|
||||
|
||||
public function showGreyBackground()
|
||||
{
|
||||
return !$this->theme_id || in_array($this->theme_id, [2, 3, 5, 6, 7, 8, 10, 11, 12]);
|
||||
|
@ -318,7 +318,7 @@ Want something changed? We're {{ link_to('https://github.com/hillelcoren/invoice
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($_SERVER['SERVER_NAME'] != 'www.invoiceninja.com')
|
||||
@if (!Utils::isNinjaProd())
|
||||
<div class="container">{{ trans('texts.powered_by') }} <a href="https://www.invoiceninja.com/" target="_blank">InvoiceNinja.com</a></div>
|
||||
@endif
|
||||
|
||||
|
@ -274,8 +274,8 @@
|
||||
<iframe id="theFrame" style="display:none" frameborder="1" width="100%" height="1180"></iframe>
|
||||
<canvas id="theCanvas" style="display:none;width:100%;border:solid 1px #CCCCCC;"></canvas>
|
||||
|
||||
@if (!Auth::user()->account->pro_plan)
|
||||
Enable the pro plan by {{ link_to('account/enable_pro_plan', 'clicking here') }} to remove the Invoice Ninja logo
|
||||
@if (!Auth::user()->isPro())
|
||||
{{ trans('texts.pro_plan.remove_logo', ['link'=>link_to('account/enable_pro_plan', trans('texts.pro_plan.remove_logo_link'))]) }}
|
||||
@endif
|
||||
|
||||
<div class="modal fade" id="clientModal" tabindex="-1" role="dialog" aria-labelledby="clientModalLabel" aria-hidden="true">
|
||||
|
Loading…
Reference in New Issue
Block a user