mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Bug fixes
This commit is contained in:
parent
ada7246b2b
commit
a787427688
9
.env.development.php
Normal file
9
.env.development.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
//'DISABLE_REGISTRATION' => true,
|
||||
//'TAG_MANAGER_KEY' => '',
|
||||
//'ANALYTICS_KEY' => '',
|
||||
|
||||
);
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,7 +11,6 @@
|
||||
/bootstrap/compiled.php
|
||||
/bootstrap/environment.php
|
||||
/vendor
|
||||
/.env.development.php
|
||||
/.DS_Store
|
||||
/Thumbs.db
|
||||
/ninja.sublime-project
|
||||
|
@ -21,6 +21,11 @@ class AccountController extends \BaseController {
|
||||
|
||||
public function getStarted()
|
||||
{
|
||||
if (Utils::isRegistrationDisabled())
|
||||
{
|
||||
return Redirect::away(NINJA_URL.'/invoice_now');
|
||||
}
|
||||
|
||||
if (Auth::check())
|
||||
{
|
||||
return Redirect::to('invoices/create');
|
||||
|
@ -76,12 +76,10 @@ class HomeController extends BaseController {
|
||||
$message = Input::get('message');
|
||||
|
||||
$data = [
|
||||
'name' => $name,
|
||||
'email' => $email,
|
||||
'text' => $message
|
||||
];
|
||||
|
||||
$this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, CONTACT_NAME, 'Invoice Ninja Feedback', 'contact', $data);
|
||||
$this->mailer->sendTo(CONTACT_EMAIL, $email, $name, 'Invoice Ninja Feedback', 'contact', $data);
|
||||
|
||||
$message = trans('texts.sent_message');
|
||||
Session::flash('message', $message);
|
||||
|
@ -147,11 +147,12 @@ class InvoiceController extends \BaseController {
|
||||
->where('invitations.account_id', '=', Auth::user()->account_id)
|
||||
->where('invitations.deleted_at', '=', null)
|
||||
->select('contacts.public_id')->lists('public_id');
|
||||
|
||||
|
||||
if ($clone)
|
||||
{
|
||||
$invoice->id = null;
|
||||
$invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber();
|
||||
$invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber();
|
||||
$invoice->balance = $invoice->amount;
|
||||
$method = 'POST';
|
||||
$url = "{$entityType}s";
|
||||
}
|
||||
|
@ -32,6 +32,11 @@ class Utils
|
||||
return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'];
|
||||
}
|
||||
|
||||
public static function isRegistrationDisabled()
|
||||
{
|
||||
return isset($_ENV['DISABLE_REGISTRATION']) && $_ENV['DISABLE_REGISTRATION'];
|
||||
}
|
||||
|
||||
public static function isPro()
|
||||
{
|
||||
return Auth::check() && Auth::user()->isPro();
|
||||
|
@ -55,7 +55,7 @@
|
||||
$clientSelect.combobox();
|
||||
|
||||
$('#currency_id').combobox();
|
||||
$('#credit_date').datepicker('update', new Date({{ strtotime(Utils::today()) * 1000 }}));
|
||||
$('#credit_date').datepicker('update', new Date());
|
||||
|
||||
});
|
||||
|
||||
|
@ -1,3 +1 @@
|
||||
Name: {{ $name }}<br/>
|
||||
Email: {{ $email }}<p/>
|
||||
Message: {{ nl2br($text) }}
|
||||
{{ nl2br($text) }}
|
||||
|
@ -1,4 +1 @@
|
||||
Name: {{ $name }}
|
||||
Email: {{ $email }}
|
||||
|
||||
Message: {{ $text }}
|
||||
{{ $text }}
|
@ -8,7 +8,7 @@
|
||||
{{ $clientName }},<p/>
|
||||
|
||||
{{ trans("texts.{$entityType}_message", ['amount' => $invoiceAmount]) }}<p/>
|
||||
{{ $link }}<p/>
|
||||
<a href="{{ $link }}">{{ $link }}</a><p/>
|
||||
|
||||
@if ($emailFooter)
|
||||
{{ nl2br($emailFooter) }}
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
@if ($showNinjaFooter)
|
||||
<p/>
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=view_email_footer">Invoice Ninja</a>']) }}
|
||||
{{ trans('texts.ninja_email_footer', ['site' => '<a href="https://www.invoiceninja.com/?utm_source=invoice_email_footer">Invoice Ninja</a>']) }}
|
||||
@endif
|
||||
|
||||
</body>
|
||||
|
@ -10,7 +10,7 @@
|
||||
{{ trans("texts.notification_{$entityType}_paid", ['amount' => $paymentAmount, 'client' => $clientName, 'invoice' => $invoiceNumber]) }} <p/>
|
||||
|
||||
{{ trans("texts.{$entityType}_link_message") }} <br/>
|
||||
{{ $invoiceLink }} <p/>
|
||||
<a href="{{ $invoiceLink }}">{{ $invoiceLink }}</a><p/>
|
||||
|
||||
{{ trans('texts.email_signature') }} <br/>
|
||||
{{ trans('texts.email_from') }} <p/>
|
||||
|
@ -1134,7 +1134,7 @@
|
||||
});
|
||||
|
||||
this.totals.rawPaidToDate = ko.computed(function() {
|
||||
return accounting.toFixed(self.amount(),2) - accounting.toFixed(self.balance(),2);
|
||||
return accounting.toFixed(self.amount(),2) - accounting.toFixed(self.balance(),2);
|
||||
});
|
||||
|
||||
this.totals.paidToDate = ko.computed(function() {
|
||||
|
@ -50,7 +50,7 @@
|
||||
populateInvoiceComboboxes({{ $clientPublicId }}, {{ $invoicePublicId }});
|
||||
|
||||
$('#payment_type_id').combobox();
|
||||
$('#payment_date').datepicker('update', new Date({{ strtotime(Utils::today()) * 1000 }}));
|
||||
$('#payment_date').datepicker('update', new Date());
|
||||
|
||||
});
|
||||
|
||||
|
4
bootstrap/environment.default.php
Executable file
4
bootstrap/environment.default.php
Executable file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return 'development';
|
||||
|
Loading…
x
Reference in New Issue
Block a user