mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Bug fixes
This commit is contained in:
parent
c38577e0a8
commit
06be7afedf
@ -49,8 +49,7 @@ class Handler extends ExceptionHandler {
|
||||
}
|
||||
|
||||
// In production, except for maintenance mode, we'll show a custom error screen
|
||||
//if (Utils::isNinjaProd() && $e->getStatusCode() != 503) {
|
||||
if (Utils::isNinjaProd()) {
|
||||
if (Utils::isNinjaProd() && !Utils::isDownForMaintenance()) {
|
||||
$data = [
|
||||
'error' => get_class($e),
|
||||
'hideHeader' => true,
|
||||
|
@ -586,7 +586,7 @@ class InvoiceController extends BaseController
|
||||
{
|
||||
Session::reflash();
|
||||
|
||||
return Redirect::to('invoices/'.$publicId.'/edit');
|
||||
return Redirect::to("invoices/{$publicId}/edit");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,6 +119,13 @@ class TaskController extends BaseController
|
||||
return $this->save();
|
||||
}
|
||||
|
||||
public function show($publicId)
|
||||
{
|
||||
Session::reflash();
|
||||
|
||||
return Redirect::to("tasks/{$publicId}/edit");
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
|
@ -40,6 +40,11 @@ class Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static function isDownForMaintenance()
|
||||
{
|
||||
return file_exists(storage_path() . '/framework/down');
|
||||
}
|
||||
|
||||
public static function isProd()
|
||||
{
|
||||
return App::environment() == ENV_PRODUCTION;
|
||||
|
@ -62,8 +62,12 @@
|
||||
@section('body')
|
||||
<div class="container">
|
||||
|
||||
@include('partials.warn_session', ['redirectTo' => '/login'])
|
||||
|
||||
{!! Former::open('login')->rules(['email' => 'required|email', 'password' => 'required'])->addClass('form-signin') !!}
|
||||
|
||||
{!! Former::open('login')
|
||||
->rules(['email' => 'required|email', 'password' => 'required'])
|
||||
->addClass('form-signin warn-on-exit') !!}
|
||||
{{ Former::populateField('remember', 'true') }}
|
||||
|
||||
<div class="modal-header">
|
||||
|
@ -691,21 +691,17 @@
|
||||
while($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) {
|
||||
$(this).height($(this).height()+1);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@if (Auth::user()->account->fill_products)
|
||||
$('.datalist').on('input', function() {
|
||||
$('.datalist').on('input', function() {
|
||||
var key = $(this).val();
|
||||
for (var i=0; i<products.length; i++) {
|
||||
var product = products[i];
|
||||
if (product.product_key == key) {
|
||||
var model = ko.dataFor(this);
|
||||
if (!model.notes()) {
|
||||
model.notes(product.notes);
|
||||
}
|
||||
if (!model.cost()) {
|
||||
model.cost(accounting.toFixed(product.cost,2));
|
||||
}
|
||||
var model = ko.dataFor(this);
|
||||
model.notes(product.notes);
|
||||
model.cost(accounting.toFixed(product.cost,2));
|
||||
if (!model.qty()) {
|
||||
model.qty(1);
|
||||
}
|
||||
@ -1741,23 +1737,22 @@
|
||||
} else {
|
||||
return total ? formatMoney(total, 1) : '';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.hideActions = function() {
|
||||
this.actionsVisible(false);
|
||||
}
|
||||
this.hideActions = function() {
|
||||
this.actionsVisible(false);
|
||||
}
|
||||
|
||||
this.showActions = function() {
|
||||
this.actionsVisible(true);
|
||||
}
|
||||
this.showActions = function() {
|
||||
this.actionsVisible(true);
|
||||
}
|
||||
|
||||
this.isEmpty = function() {
|
||||
return !self.product_key() && !self.notes() && !self.cost() && (!self.qty() || {{ $account->hide_quantity ? 'true' : 'false' }});
|
||||
}
|
||||
this.isEmpty = function() {
|
||||
return !self.product_key() && !self.notes() && !self.cost() && (!self.qty() || {{ $account->hide_quantity ? 'true' : 'false' }});
|
||||
}
|
||||
|
||||
this.onSelect = function(){
|
||||
this.onSelect = function() {}
|
||||
}
|
||||
}
|
||||
|
||||
function onItemChange()
|
||||
{
|
||||
@ -1772,12 +1767,6 @@
|
||||
if (!hasEmpty) {
|
||||
model.invoice().addItem();
|
||||
}
|
||||
|
||||
/*
|
||||
$('.word-wrap').each(function(index, input) {
|
||||
$(input).height($(input).val().split('\n').length * 20);
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function onTaxRateChange()
|
||||
|
Loading…
x
Reference in New Issue
Block a user