diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 4889144bea..e8707ffb68 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -229,8 +229,9 @@ class InvoiceController extends BaseController } foreach(Gateway::$paymentTypes as $type) { if ($account->getGatewayByType($type)) { - $paymentTypes[] = [ - 'url' => URL::to("/payment/{$invitation->invitation_key}/{$type}"), 'label' => trans('texts.'.strtolower($type)) + $typeLink = strtolower(str_replace('PAYMENT_TYPE_', '', $type)); + $paymentTypes[] = [ + 'url' => URL::to("/payment/{$invitation->invitation_key}/{$typeLink}"), 'label' => trans('texts.'.strtolower($type)) ]; } } diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index c3e6ce3c90..0719cd0eaf 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -292,7 +292,9 @@ class PaymentController extends BaseController $account = $client->account; $useToken = false; - if (!$paymentType) { + if ($paymentType) { + $paymentType = 'PAYMENT_TYPE_' . strtoupper($paymentType); + } else { $paymentType = Session::get('payment_type', $account->account_gateways[0]->getPaymentType()); } if ($paymentType == PAYMENT_TYPE_TOKEN) { diff --git a/app/Http/routes.php b/app/Http/routes.php index efad81d4f7..df9d0b6ee8 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -204,6 +204,9 @@ Route::get('/testimonials', function() { Route::get('/compare-online-invoicing{sites?}', function() { return Redirect::to(NINJA_WEB_URL, 301); }); +Route::get('/forgot_password', function() { + return Redirect::to(NINJA_APP_URL.'/forgot', 301); +}); define('CONTACT_EMAIL', Config::get('mail.from.address')); diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index b11a4b2811..166c5a4929 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -39,6 +39,14 @@ class Gateway extends Eloquent return '/images/gateways/logo_'.$this->provider.'.png'; } + public static function getPaymentTypeLinks() { + $data = []; + foreach (self::$paymentTypes as $type) { + $data[] = strtolower(str_replace('PAYMENT_TYPE_', '', $type)); + } + return $data; + } + public function getHelp() { $link = ''; diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index 0936273c5c..c9583190c9 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -7,6 +7,7 @@ use URL; use App\Models\Invoice; use App\Models\Payment; use App\Models\Activity; +use App\Models\Gateway; use App\Events\InvoiceSent; class ContactMailer extends Mailer @@ -43,15 +44,8 @@ class ContactMailer extends Mailer ]; // Add variables for available payment types - foreach([PAYMENT_TYPE_CREDIT_CARD, PAYMENT_TYPE_PAYPAL, PAYMENT_TYPE_BITCOIN] as $type) { - if ($invoice->account->getGatewayByType($type)) { - - // Changes "PAYMENT_TYPE_CREDIT_CARD" to "$credit_card_link" - $gateway_slug = '$'.strtolower(str_replace('PAYMENT_TYPE_', '', $type)).'_link'; - - $variables[$gateway_slug] = URL::to("/payment/{$invitation->invitation_key}/{$type}"); - - } + foreach (Gateway::getPaymentTypeLinks() as $type) { + $variables["\${$type}_link"] = URL::to("/payment/{$invitation->invitation_key}/{$type}"); } $data['body'] = str_replace(array_keys($variables), array_values($variables), $emailTemplate); diff --git a/public/css/built.css b/public/css/built.css index 43c588acb6..fad32faf1b 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -3267,4 +3267,81 @@ div.dataTables_length label { a .glyphicon, button .glyphicon { padding-left: 8px; -} \ No newline at end of file +} + +.pro-plan-modal { + background-color: #4b4b4b; + padding-bottom: 40px; + padding-right: 25px; + /*opacity:0.96 !important;*/ +} + +.pro-plan-modal .left-side { + margin-top: 50px; +} + +.pro-plan-modal h2 { + color: #36c157; + font-size: 71px; + font-weight: 800; +} + +.pro-plan-modal img.price { + height: 90px; +} + +.pro-plan-modal a.button { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: #f38c4f; + background: -moz-linear-gradient(top, #f38c4f 0%, #db7134 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f38c4f), color-stop(100%,#db7134)); + background: -webkit-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -o-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -ms-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: linear-gradient(to bottom, #f38c4f 0%,#db7134 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f38c4f', endColorstr='#db7134',GradientType=0 ); + text-shadow: 1px 1px 1px rgba(0, 0, 0, .25); + width: 68%; + margin-top: 20px; + font-size: 28px; + color: #fff; + border-radius: 10px; + padding: 20px 0; + display: inline-block; + text-decoration: none; +} + +.pro-plan-modal a.button:hover { + background: #db7134; /* Old browsers */ + background: -moz-linear-gradient(top, #db7134 0%, #f38c4f 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db7134), color-stop(100%,#f38c4f)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* IE10+ */ + background: linear-gradient(to bottom, #db7134 0%,#f38c4f 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db7134', endColorstr='#f38c4f',GradientType=0 ); /* IE6-9 */ +} + + +.pro-plan-modal ul { + color: #fff; + list-style: none; + padding: 0 0 30px 0; + text-align: left; + white-space: pre-line; + margin: 0; +} + +.pro-plan-modal ul li { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: url('../images/pro_plan/check.png') no-repeat 0px 12px; + display: inline-block; + font-size: 17px; + line-height: 36px; + padding: 0 0 0 19px; +} + +.pro-plan-modal img.close { + width: 35px; + margin-top: 20px; +} diff --git a/public/css/style.css b/public/css/style.css index c8ec73d518..0eab05ed1d 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -883,4 +883,81 @@ div.dataTables_length label { a .glyphicon, button .glyphicon { padding-left: 8px; -} \ No newline at end of file +} + +.pro-plan-modal { + background-color: #4b4b4b; + padding-bottom: 40px; + padding-right: 25px; + /*opacity:0.96 !important;*/ +} + +.pro-plan-modal .left-side { + margin-top: 50px; +} + +.pro-plan-modal h2 { + color: #36c157; + font-size: 71px; + font-weight: 800; +} + +.pro-plan-modal img.price { + height: 90px; +} + +.pro-plan-modal a.button { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: #f38c4f; + background: -moz-linear-gradient(top, #f38c4f 0%, #db7134 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f38c4f), color-stop(100%,#db7134)); + background: -webkit-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -o-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -ms-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: linear-gradient(to bottom, #f38c4f 0%,#db7134 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f38c4f', endColorstr='#db7134',GradientType=0 ); + text-shadow: 1px 1px 1px rgba(0, 0, 0, .25); + width: 68%; + margin-top: 20px; + font-size: 28px; + color: #fff; + border-radius: 10px; + padding: 20px 0; + display: inline-block; + text-decoration: none; +} + +.pro-plan-modal a.button:hover { + background: #db7134; /* Old browsers */ + background: -moz-linear-gradient(top, #db7134 0%, #f38c4f 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db7134), color-stop(100%,#f38c4f)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* IE10+ */ + background: linear-gradient(to bottom, #db7134 0%,#f38c4f 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db7134', endColorstr='#f38c4f',GradientType=0 ); /* IE6-9 */ +} + + +.pro-plan-modal ul { + color: #fff; + list-style: none; + padding: 0 0 30px 0; + text-align: left; + white-space: pre-line; + margin: 0; +} + +.pro-plan-modal ul li { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: url('../images/pro_plan/check.png') no-repeat 0px 12px; + display: inline-block; + font-size: 17px; + line-height: 36px; + padding: 0 0 0 19px; +} + +.pro-plan-modal img.close { + width: 35px; + margin-top: 20px; +} diff --git a/public/images/pro_plan/check.png b/public/images/pro_plan/check.png new file mode 100644 index 0000000000..c6d41f3ce0 Binary files /dev/null and b/public/images/pro_plan/check.png differ diff --git a/public/images/pro_plan/close.png b/public/images/pro_plan/close.png new file mode 100644 index 0000000000..35abfda647 Binary files /dev/null and b/public/images/pro_plan/close.png differ diff --git a/public/images/pro_plan/price.png b/public/images/pro_plan/price.png new file mode 100644 index 0000000000..41ec6ff0cd Binary files /dev/null and b/public/images/pro_plan/price.png differ diff --git a/resources/lang/da/texts.php b/resources/lang/da/texts.php index b7169eb781..84bea54761 100644 --- a/resources/lang/da/texts.php +++ b/resources/lang/da/texts.php @@ -677,5 +677,18 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + ); diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php index 5dba358e22..2ed7f399d6 100644 --- a/resources/lang/de/texts.php +++ b/resources/lang/de/texts.php @@ -669,4 +669,16 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + ); \ No newline at end of file diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 92dca9e3b9..bceeff5f52 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -676,4 +676,17 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + + ); diff --git a/resources/lang/es/texts.php b/resources/lang/es/texts.php index 0d018879a0..9b2d7a39cb 100644 --- a/resources/lang/es/texts.php +++ b/resources/lang/es/texts.php @@ -648,4 +648,16 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + ); \ No newline at end of file diff --git a/resources/lang/es_ES/texts.php b/resources/lang/es_ES/texts.php index 2e67ec47b6..d87faccce9 100644 --- a/resources/lang/es_ES/texts.php +++ b/resources/lang/es_ES/texts.php @@ -677,4 +677,16 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + ); \ No newline at end of file diff --git a/resources/lang/fr/texts.php b/resources/lang/fr/texts.php index 879b5f8739..96eae7a3c3 100644 --- a/resources/lang/fr/texts.php +++ b/resources/lang/fr/texts.php @@ -669,4 +669,16 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + ); \ No newline at end of file diff --git a/resources/lang/fr_CA/texts.php b/resources/lang/fr_CA/texts.php index 915db3d867..3af47d880b 100644 --- a/resources/lang/fr_CA/texts.php +++ b/resources/lang/fr_CA/texts.php @@ -669,4 +669,16 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/lang/it/texts.php b/resources/lang/it/texts.php index fa4f842e18..c9e32e5a2d 100644 --- a/resources/lang/it/texts.php +++ b/resources/lang/it/texts.php @@ -670,5 +670,18 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/lang/lt/texts.php b/resources/lang/lt/texts.php index 8d5a878e2e..cd673ed2c0 100644 --- a/resources/lang/lt/texts.php +++ b/resources/lang/lt/texts.php @@ -678,6 +678,18 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/lang/nb_NO/texts.php b/resources/lang/nb_NO/texts.php index c39965dad0..f148bc10ec 100644 --- a/resources/lang/nb_NO/texts.php +++ b/resources/lang/nb_NO/texts.php @@ -676,5 +676,17 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); \ No newline at end of file diff --git a/resources/lang/nl/texts.php b/resources/lang/nl/texts.php index 547529e403..6fadd0aab7 100644 --- a/resources/lang/nl/texts.php +++ b/resources/lang/nl/texts.php @@ -671,5 +671,17 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/lang/pt_BR/texts.php b/resources/lang/pt_BR/texts.php index 1a59edcd37..97e73523fd 100644 --- a/resources/lang/pt_BR/texts.php +++ b/resources/lang/pt_BR/texts.php @@ -671,5 +671,17 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/lang/sv/texts.php b/resources/lang/sv/texts.php index 477355e851..ddbd91188f 100644 --- a/resources/lang/sv/texts.php +++ b/resources/lang/sv/texts.php @@ -674,5 +674,17 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + ); diff --git a/resources/views/accounts/email_templates.blade.php b/resources/views/accounts/email_templates.blade.php index 5b57c7d8dc..ab30b19016 100644 --- a/resources/views/accounts/email_templates.blade.php +++ b/resources/views/accounts/email_templates.blade.php @@ -111,20 +111,10 @@ vals = [{!! json_encode($emailFooter) !!}, '{!! Auth::user()->account->getDisplayName() !!}', 'Client Name', formatMoney(100), '{!! NINJA_WEB_URL !!}', 'Contact Name']; // Add any available payment method links - account->getGatewayByType($type)) { - - // Changes "PAYMENT_TYPE_CREDIT_CARD" to "credit_card" - $gateway_slug = strtolower(str_replace('PAYMENT_TYPE_', '', $type)).'_link'; - - echo "keys.push('$gateway_slug'); "; - echo "vals.push('".URL::to("/payment/xxxxxx/{$type}")."'); "; - echo "\n"; - - } - } - ?> + @foreach (\App\Models\Gateway::getPaymentTypeLinks() as $type) + {!! "keys.push('" . $type.'_link' . "');" !!} + {!! "vals.push('" . URL::to("/payment/xxxxxx/{$type}") . "');" !!} + @endforeach for (var i=0; iaccount->isPro())
-
{!! trans('texts.pro_plan_advanced_settings', ['link'=>''.trans('texts.pro_plan.remove_logo_link').'']) !!}
+
{!! trans('texts.pro_plan_advanced_settings', ['link'=>''.trans('texts.pro_plan.remove_logo_link').'']) !!}
 

 

@endif diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index 4ae7ce5d6c..75aa370ae6 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -144,27 +144,35 @@ $('#signUpModal').modal('show'); } + NINJA.proPlanFeature = ''; + function showProPlan(feature) { + $('#proPlanModal').modal('show'); + trackEvent('/account', '/show_pro_plan/' + feature); + NINJA.proPlanFeature = feature; + } + + function hideProPlan() { + $('#proPlanModal').modal('hide'); + } + function buyProduct(affiliateKey, productId) { window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/license?affiliate_key=' + affiliateKey + '&product_id=' + productId + '&return_url=' + window.location); } @if (Auth::check() && !Auth::user()->isPro()) - function submitProPlan(feature) { - trackEvent('/account', '/submit_pro_plan/' + feature); - if (NINJA.isRegistered) { - $('#proPlanDiv, #proPlanFooter').hide(); - $('#proPlanWorking').show(); - + function submitProPlan() { + trackEvent('/account', '/submit_pro_plan/' + NINJA.proPlanFeature); + if (NINJA.isRegistered) { $.ajax({ type: 'POST', url: '{{ URL::to('account/go_pro') }}', success: function(result) { NINJA.formIsChanged = false; - window.location = '/view/' + result; + window.location = '/payment/' + result; } }); } else { - $('#proPlanModal').modal('hide'); + $('#proPlanModal').modal('hide'); $('#go_pro').val('true'); showSignUp(); } @@ -321,7 +329,7 @@ @if (!Auth::user()->registered) {!! Button::success(trans('texts.sign_up'))->withAttributes(array('id' => 'signUpButton', 'data-toggle'=>'modal', 'data-target'=>'#signUpModal'))->small() !!}   @elseif (!Auth::user()->isPro()) - {!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'onclick' => 'submitProPlan("")'))->small() !!}   + {!! Button::success(trans('texts.go_pro'))->withAttributes(array('id' => 'proPlanButton', 'onclick' => 'showProPlan("")'))->small() !!}   @endif @endif @@ -526,47 +534,36 @@ @if (Auth::check() && !Auth::user()->isPro())