{!! Former::checkbox('pdf_email_attachment')->text(trans('texts.enable')) !!}
- {!! Former::checkbox('auto_wrap')->text(trans('texts.enable')) !!}
{!! Former::checkbox('utf8_invoices')->text(trans('texts.enable')) !!}
+
+ {!! Former::checkbox('auto_wrap')->text(trans('texts.enable')) !!}
+
diff --git a/resources/views/accounts/token_management.blade.php b/resources/views/accounts/token_management.blade.php
index 66f6901bad37..8bd620e163ed 100644
--- a/resources/views/accounts/token_management.blade.php
+++ b/resources/views/accounts/token_management.blade.php
@@ -14,7 +14,9 @@
{!! Button::normal(trans('texts.documentation'))->asLinkTo(NINJA_WEB_URL.'/knowledgebase/api-documentation/')->withAttributes(['target' => '_blank']) !!}
- {!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
+ @if (Utils::isNinja())
+ {!! Button::normal(trans('texts.zapier'))->asLinkTo(ZAPIER_URL)->withAttributes(['target' => '_blank']) !!}
+ @endif
@if (Utils::isPro())
{!! Button::primary(trans('texts.add_token'))->asLinkTo('/tokens/create')->appendIcon(Icon::create('plus-sign')) !!}
@endif
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php
index b53a288d01b2..db77a4c96adf 100644
--- a/resources/views/dashboard.blade.php
+++ b/resources/views/dashboard.blade.php
@@ -90,7 +90,7 @@
@foreach ($pastDue as $invoice)
@if (!$invoice->client->trashed())
- {{ $invoice->getLink() }} |
+ {!! $invoice->getLink() !!} |
{{ $invoice->client->getDisplayName() }} |
{{ Utils::fromSqlDate($invoice->due_date) }} |
{{ Utils::formatMoney($invoice->balance, $invoice->client->currency_id) }} |
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php
index 70bb49687c9e..0530613307de 100644
--- a/resources/views/header.blade.php
+++ b/resources/views/header.blade.php
@@ -19,6 +19,12 @@
}
}
+ @media screen and (max-width: 768px) {
+ body {
+ padding-top: 56px;
+ }
+ }
+
@include('script')
diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php
index fe2a9868ddff..56ed502111c6 100644
--- a/resources/views/invoices/edit.blade.php
+++ b/resources/views/invoices/edit.blade.php
@@ -11,14 +11,6 @@
@endif
-
@stop
@section('content')
@@ -86,9 +78,7 @@
{!! Former::text('due_date')->data_bind("datePicker: due_date, valueUpdate: 'afterkeydown'")
->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT, DEFAULT_DATE_PICKER_FORMAT))->append('') !!}
- {!! Former::text('partial')->data_bind("value: partial, valueUpdate: 'afterkeydown', enable: is_partial")
- ->onchange('onPartialChange()')->addGroupClass('partial')->append(Former::checkbox('is_partial')->raw()
- ->data_bind('checked: is_partial')->onclick('onPartialEnabled()') . ' ' . (trans('texts.enable'))) !!}
+ {!! Former::text('partial')->data_bind("value: partial, valueUpdate: 'afterkeydown'")->onchange('onPartialChange()') !!}
@if ($entityType == ENTITY_INVOICE)
@@ -104,8 +94,24 @@
@else
- {!! Former::checkbox('recurring')->onclick('onRecurringEnabled()')->text(trans('texts.enable').'
'.trans('texts.learn_more').'')->data_bind("checked: is_recurring")
- ->inlineHelp($invoice && $invoice->last_sent_date ? 'Last invoice sent ' . Utils::dateToString($invoice->last_sent_date) : '') !!}
+
+ @if ($invoice && $invoice->last_sent_date)
+
+ {{ trans('texts.last_invoice_sent', ['date' => Utils::dateToString($invoice->last_sent_date)]) }}
+
+ @endif
@endif
@endif
@@ -1130,7 +1136,6 @@
self.balance = ko.observable(0);
self.invoice_design_id = ko.observable({{ $account->utf8_invoices ? 1 : $account->invoice_design_id }});
self.partial = ko.observable(0);
- self.is_partial = ko.observable(false);
self.custom_value1 = ko.observable(0);
self.custom_value2 = ko.observable(0);
@@ -1336,7 +1341,7 @@
});
self.totals.total = ko.computed(function() {
- return formatMoney(self.is_partial() ? self.partial() : self.totals.rawTotal(), self.client().currency_id());
+ return formatMoney(self.partial() ? self.partial() : self.totals.rawTotal(), self.client().currency_id());
});
self.onDragged = function(item) {
@@ -1647,19 +1652,7 @@
{
var val = NINJA.parseFloat($('#partial').val());
val = Math.max(Math.min(val, model.invoice().totals.rawTotal()), 0);
- $('#partial').val(val);
- }
-
- function onPartialEnabled()
- {
- model.invoice().partial('');
- refreshPDF();
-
- if ($('#is_partial').prop('checked')) {
- setTimeout(function() {
- $('#partial').focus();
- }, 1);
- }
+ $('#partial').val(val || '');
}
function onRecurringEnabled()
@@ -1702,9 +1695,6 @@
@if ($invoice)
var invoice = {!! $invoice !!};
ko.mapping.fromJS(invoice, model.invoice().mapping, model.invoice);
- if (NINJA.parseFloat(model.invoice().partial())) {
- model.invoice().is_partial(true);
- }
var invitationContactIds = {!! json_encode($invitationContactIds) !!};
var client = clientMap[invoice.client.public_id];
if (client) { // in case it's deleted