diff --git a/app/config/app.php b/app/config/app.php index 2788a7946e6b..37e2e08b078e 100755 --- a/app/config/app.php +++ b/app/config/app.php @@ -65,7 +65,7 @@ return array( | */ - 'key' => 'a2jfy6HtBEdNtJnRSOC7vIM3UVhxZ1BB', + 'key' => '', /* |-------------------------------------------------------------------------- diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 9199cb3a95ac..d9d673f753a7 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -60,7 +60,7 @@ class AccountController extends \BaseController { public function setTrashVisible($entityType, $visible) { - Session::put('show_trash', $visible == 'true'); + Session::put('show_trash', $visible == 'true'); return Redirect::to("{$entityType}s"); } @@ -450,7 +450,7 @@ class AccountController extends \BaseController { if ($validator->fails()) { - return Redirect::to('company/settings') + return Redirect::to('company/payments') ->withErrors($validator) ->withInput(); } diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index ab892400db74..c6fafe9a8b88 100755 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -1,8 +1,18 @@ mailer = $mailer; + } public function showWelcome() { @@ -19,6 +29,24 @@ class HomeController extends BaseController { return View::make('contact_us'); } + public function doContactUs() + { + $email = Input::get('email'); + $name = Input::get('name'); + $message = Input::get('message'); + + $data = [ + 'name' => $name, + 'email' => $email, + 'text' => $message + ]; + + $this->mailer->sendTo('contact@invoiceninja.com', 'contact@invoiceninja.com', 'Invoice Ninja Feedback', 'contact', $data); + + Session::flash('message', 'Successfully sent message'); + return Redirect::to('/contact'); + } + public function showComingSoon() { return View::make('coming_soon'); diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 0a93c4bf81cb..7d16724aec52 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -253,7 +253,9 @@ class InvoiceController extends \BaseController { $invoice = $input->invoice; if ($errors = $this->invoiceRepo->getErrors($invoice)) - { + { + Session::flash('error', 'Please make sure to select a client and correct any errors'); + return Redirect::to('invoices/create') ->withInput()->withErrors($errors); } diff --git a/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php b/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php index df8b3588c8a8..4bd8daf912df 100644 --- a/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php +++ b/app/database/migrations/2014_02_19_151817_add_support_for_invoice_designs.php @@ -21,6 +21,7 @@ class AddSupportForInvoiceDesigns extends Migration { DB::table('invoice_designs')->insert(['name' => 'Clean']); DB::table('invoice_designs')->insert(['name' => 'Bold']); DB::table('invoice_designs')->insert(['name' => 'Modern']); + DB::table('invoice_designs')->insert(['name' => 'Plain']); Schema::table('invoices', function($table) { diff --git a/app/libraries/utils.php b/app/libraries/utils.php index c39f8271396c..e636682a9843 100755 --- a/app/libraries/utils.php +++ b/app/libraries/utils.php @@ -27,7 +27,8 @@ class Utils 'url' => Input::get('url', Request::url()), 'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '', 'ip' => Request::getClientIp(), - 'count' => Session::get('error_count', 0) + 'count' => Session::get('error_count', 0), + 'input' => Input::all() ]; Log::error('\n'.$error, $data); diff --git a/app/models/Invoice.php b/app/models/Invoice.php index f2b4bea4a822..7e73122f8649 100755 --- a/app/models/Invoice.php +++ b/app/models/Invoice.php @@ -54,7 +54,7 @@ class Invoice extends EntityModel public function hidePrivateFields() { - $this->setVisible(['invoice_number', 'discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'amount', 'balance', 'invoice_items', 'client', 'tax_name', 'tax_rate', 'account']); + $this->setVisible(['invoice_number', 'discount', 'po_number', 'invoice_date', 'due_date', 'terms', 'public_notes', 'amount', 'balance', 'invoice_items', 'client', 'tax_name', 'tax_rate', 'account', 'invoice_design_id']); $this->client->setVisible(['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'work_phone', 'payment_terms', 'contacts', 'country', 'currency_id' ]); $this->account->setVisible(['name', 'address1', 'address2', 'city', 'state', 'postal_code', 'work_phone', 'work_email', 'country', 'currency_id']); diff --git a/app/ninja/mailers/Mailer.php b/app/ninja/mailers/Mailer.php index 23bffa4a5421..f54e450b3e5f 100755 --- a/app/ninja/mailers/Mailer.php +++ b/app/ninja/mailers/Mailer.php @@ -2,7 +2,7 @@ use Mail; -abstract class Mailer { +class Mailer { public function sendTo($toEmail, $fromEmail, $subject, $view, $data = []) { diff --git a/app/ninja/repositories/InvoiceRepository.php b/app/ninja/repositories/InvoiceRepository.php index 9e62e4fc3461..73cb2fb4b161 100755 --- a/app/ninja/repositories/InvoiceRepository.php +++ b/app/ninja/repositories/InvoiceRepository.php @@ -93,7 +93,7 @@ class InvoiceRepository $invoice = (array) $input; $invoiceId = isset($invoice['public_id']) && $invoice['public_id'] ? Invoice::getPrivateId($invoice['public_id']) : null; - $rules = ['invoice_number' => 'unique:invoices,invoice_number,' . $invoiceId . ',id,account_id,' . \Auth::user()->account_id]; + $rules = ['invoice_number' => 'required|unique:invoices,invoice_number,' . $invoiceId . ',id,account_id,' . \Auth::user()->account_id]; if ($invoice['is_recurring'] && $invoice['start_date'] && $invoice['end_date']) { diff --git a/app/routes.php b/app/routes.php index 5027f907b9ba..483daaf57af2 100755 --- a/app/routes.php +++ b/app/routes.php @@ -56,8 +56,9 @@ Route::get('/send_emails', function() { Route::get('/', 'HomeController@showWelcome'); Route::get('/rocksteady', 'HomeController@showWelcome'); -Route::get('/about_us', 'HomeController@showAboutUs'); -Route::get('/contact_us', 'HomeController@showContactUs'); +Route::get('/about', 'HomeController@showAboutUs'); +Route::get('/contact', 'HomeController@showContactUs'); +Route::post('/contact', 'HomeController@doContactUs'); Route::get('log_error', 'HomeController@logError'); Route::post('get_started', 'AccountController@getStarted'); diff --git a/app/views/about_us.blade.php b/app/views/about_us.blade.php index 7e4c70ae87bd..6c1535eb5138 100644 --- a/app/views/about_us.blade.php +++ b/app/views/about_us.blade.php @@ -9,43 +9,77 @@ @stop @section('body') +<<<<<<< HEAD +======= + }); + + function isStorageSupported() { + try { + return 'localStorage' in window && window['localStorage'] !== null; + } catch (e) { + return false; + } + } + + function getStarted() { + $('#startForm').submit(); + } + + +>>>>>>> upstream/master -
-
-
-

WHY INVOICE NINJA? -

-
-
-
+
+
+
+

WHY INVOICE NINJA? +

+
+
+
+<<<<<<< HEAD
@@ -86,8 +120,49 @@
+======= +
+
+
+
+

Open Source Platform

+

Free yourself from online invoicing platforms with high monthly fees and limited functionality. Being open source allows us fast app development, security audits by the open-course community, and we can keep it FREE!

+
+
+
+
+ +
+
+
+
+
-
+ +
+

Live PDF Creation

+

Look professional from day #1. Select one of our beautiful invoice templates to suit your company identity, switch between designs in real time to preview invoices & email them to clients with one click. The live preview PDF function was designed for an efficient and hassle-free experience, and it’s awesome! +

+
+ + +
+
+
+
+
+

Online Payments

+

Authorize.net, Beanstream, PayPal? InvoiceNinja supports the most popular online payment gateways! If you need help integrating a third party gateway we don’t yet support, please contact us! We’re happy to help! If you need assistance of want to learn more about online payment solutions, contact us!

+
+
+
+>>>>>>> upstream/master +
+
+
+
+
+ + -