Minor tweaks

This commit is contained in:
Hillel Coren 2014-11-27 12:55:09 +02:00
parent 4866e19d88
commit a739429005
19 changed files with 68 additions and 42 deletions

View File

@ -13,7 +13,7 @@ return array(
|
*/
'debug' => false,
'debug' => true,
/*
|--------------------------------------------------------------------------
@ -122,8 +122,8 @@ return array(
'Barryvdh\Debugbar\ServiceProvider',
'Chumper\Datatable\DatatableServiceProvider',
'Intervention\Image\ImageServiceProvider',
'Webpatser\Countries\CountriesServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
'Webpatser\Countries\CountriesServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
),
/*

View File

@ -982,6 +982,18 @@ class AccountController extends \BaseController {
public function cancelAccount()
{
if ($reason = trim(Input::get('reason')))
{
$email = Auth::user()->email;
$name = Auth::user()->getDisplayName();
$data = [
'text' => $reason
];
$this->userMailer->sendTo(CONTACT_EMAIL, $email, $name, 'Invoice Ninja Feedback [Canceled Account]', 'contact', $data);
}
$account = Auth::user()->account;
$account->forceDelete();

View File

@ -217,6 +217,7 @@ class InvoiceController extends \BaseController {
$invoice->id = null;
$invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber($invoice->is_quote);
$invoice->balance = $invoice->amount;
$invoice->invoice_status_id = 0;
$invoice->invoice_date = date_create()->format('Y-m-d');
$method = 'POST';
$url = "{$entityType}s";
@ -248,25 +249,28 @@ class InvoiceController extends \BaseController {
$data = array_merge($data, self::getViewModel());
// Set the invitation link on the client's contacts
$clients = $data['clients'];
foreach ($clients as $client)
if (!$clone)
{
if ($client->id == $invoice->client->id)
$clients = $data['clients'];
foreach ($clients as $client)
{
foreach ($invoice->invitations as $invitation)
if ($client->id == $invoice->client->id)
{
foreach ($client->contacts as $contact)
foreach ($invoice->invitations as $invitation)
{
if ($invitation->contact_id == $contact->id)
foreach ($client->contacts as $contact)
{
$contact->invitation_link = $invitation->getLink();
}
}
if ($invitation->contact_id == $contact->id)
{
$contact->invitation_link = $invitation->getLink();
}
}
}
break;
}
break;
}
}
return View::make('invoices.edit', $data);
}

View File

@ -470,7 +470,7 @@ return array(
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -489,6 +489,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',
);

View File

@ -468,7 +468,7 @@ return array(
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -487,5 +487,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',
);

View File

@ -440,7 +440,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -459,6 +459,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',
);

View File

@ -461,7 +461,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -479,6 +479,8 @@ return array(
'restored_client' => 'Successfully restored client',
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',
);

View File

@ -462,7 +462,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -482,6 +482,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',

View File

@ -471,7 +471,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -490,6 +490,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',
);

View File

@ -469,7 +469,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -488,6 +488,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',

View File

@ -463,7 +463,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -483,6 +483,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',

View File

@ -451,7 +451,7 @@ return array(
'vat_number' => 'Vat Number',
'id_number' => 'ID Number',
'white_label_link' => 'Click to white label',
'white_label_link' => 'White label',
'white_label_text' => 'Purchase a white label license for $10.00 to remove the Invoice Ninja branding from the top of the client pages.',
'white_label_header' => 'White Label',
'bought_white_label' => 'Successfully enabled white label license',
@ -470,6 +470,7 @@ return array(
'restored_payment' => 'Successfully restored payment',
'restored_credit' => 'Successfully restored credit',
'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.',

View File

@ -131,7 +131,7 @@ class User extends ConfideUser implements UserInterface, RemindableInterface
public function getPopOverText()
{
if (!Auth::check() || Session::has('error'))
if (!Utils::isNinja() || !Auth::check() || Session::has('error'))
{
return false;
}

View File

@ -53,7 +53,6 @@ class PaymentRepository
->on('invitations.contact_id', '=', 'contacts.id');
})
->leftJoin('payment_types', 'payment_types.id', '=', 'payments.payment_type_id')
->where('payments.account_id', '=', \Auth::user()->account_id)
->where('clients.is_deleted', '=', false)
->where('payments.is_deleted', '=', false)
->where('invitations.deleted_at', '=', null)

View File

@ -1,5 +1,12 @@
<?php
/*
$content = "some text here";
$fp = fopen("../myText.txt","wb");
fwrite($fp,$content);
fclose($fp);
*/
/*
|--------------------------------------------------------------------------
@ -255,7 +262,7 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_WEB_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://www.invoiceninja.com');
define('NINJA_APP_URL', 'https://app.invoiceninja.com');
define('NINJA_VERSION', '1.5.2');
define('NINJA_DATE', '2000-01-01');
define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com');
@ -415,6 +422,7 @@ Validator::extend('has_credit', function($attribute, $value, $parameters)
/*
// Log all SQL queries to laravel.log
Event::listen('illuminate.query', function($query, $bindings, $time, $name)
{
$data = compact('bindings', 'time', 'name');
@ -440,11 +448,9 @@ Event::listen('illuminate.query', function($query, $bindings, $time, $name)
});
*/
/*
if (Auth::check() && Auth::user()->id === 1)
{
Auth::loginUsingId(1);
}
*/
*/

View File

@ -60,13 +60,9 @@ App::error(function(Exception $exception, $code)
{
if (Utils::isNinjaProd())
{
Utils::logError($exception . ' ' . $code);
Utils::logError("{$code} {$exception->getFile()} [Line {$exception->getLine()}] => {$exception->getMessage()}");
return Response::view('error', ['hideHeader' => true, 'error' => "A {$code} error occurred."], $code);
}
else if (Utils::isNinjaDev())
{
return "{$exception->getFile()}:{$exception->getLine()} => {$exception->getMessage()}";
}
else
{
return null;

View File

@ -31,6 +31,7 @@
<div style="background-color: #fff; padding-left: 16px; padding-right: 16px">
&nbsp;<p>{{ trans('texts.cancel_account_message') }}</p>&nbsp;
&nbsp;<p>{{ Former::textarea('reason')->placeholder(trans('texts.reason_for_canceling'))->raw() }}</p>&nbsp;
</div>
<div class="modal-footer" style="margin-top: 0px">

View File

@ -20,12 +20,9 @@
<link href='//fonts.googleapis.com/css?family=Roboto:400,700,900,100' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Roboto+Slab:400,300,700' rel='stylesheet' type='text/css'>
<link href="{{ asset('favicon.ico') }}" rel="icon" type="image/x-icon">
@if (!Utils::isNinja())
<link rel="canonical" href="https://www.invoiceninja.com"></link>
@endif
<link href="{{ asset('favicon.ico') }}" rel="icon" type="image/x-icon">
<link rel="canonical" href="{{ NINJA_APP_URL }}/{{ Request::path() }}"></link>
<script src="{{ asset('built.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
<script type="text/javascript">

View File

@ -3518,7 +3518,7 @@ box-shadow: 0px 0px 15px 0px rgba(0, 5, 5, 0.2);
}
.entityArchived {
color: #888 !important;
color: #888 !important;
}
.entityDeleted {