mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Implemented enable_client_portal_dashboard
This commit is contained in:
parent
3cb3126f98
commit
9b8b150766
@ -552,6 +552,7 @@ class AccountController extends BaseController
|
||||
$account->client_view_css = $sanitized_css;
|
||||
|
||||
$account->enable_client_portal = !!Input::get('enable_client_portal');
|
||||
$account->enable_client_portal_dashboard = !!Input::get('enable_client_portal_dashboard');
|
||||
$account->enable_portal_password = !!Input::get('enable_portal_password');
|
||||
$account->send_portal_password = !!Input::get('send_portal_password');
|
||||
|
||||
|
@ -123,8 +123,8 @@ class PublicClientController extends BaseController
|
||||
'showApprove' => $showApprove,
|
||||
'showBreadcrumbs' => false,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'hideHeader' => $account->isNinjaAccount(),
|
||||
'hideDashboard' => !$account->enable_client_portal,
|
||||
'hideHeader' => $account->isNinjaAccount() || !$account->enable_client_portal,
|
||||
'hideDashboard' => !$account->enable_client_portal_dashboard,
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
@ -212,7 +212,7 @@ class PublicClientController extends BaseController
|
||||
$client = $invoice->client;
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
|
||||
if (!$account->enable_client_portal) {
|
||||
if (!$account->enable_client_portal || !$account->enable_client_portal_dashboard) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
@ -221,6 +221,7 @@ class PublicClientController extends BaseController
|
||||
'account' => $account,
|
||||
'client' => $client,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
];
|
||||
@ -261,13 +262,19 @@ class PublicClientController extends BaseController
|
||||
if (!$invitation = $this->getInvitation()) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$account = $invitation->account;
|
||||
|
||||
if (!$account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
|
||||
$data = [
|
||||
'color' => $color,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'hideDashboard' => !$account->enable_client_portal,
|
||||
'hideDashboard' => !$account->enable_client_portal_dashboard,
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
@ -295,12 +302,16 @@ class PublicClientController extends BaseController
|
||||
return $this->returnError();
|
||||
}
|
||||
$account = $invitation->account;
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
|
||||
|
||||
if (!$account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
$data = [
|
||||
'color' => $color,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'hideDashboard' => !$account->enable_client_portal,
|
||||
'hideDashboard' => !$account->enable_client_portal_dashboard,
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
@ -333,13 +344,18 @@ class PublicClientController extends BaseController
|
||||
if (!$invitation = $this->getInvitation()) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$account = $invitation->account;
|
||||
|
||||
if (!$account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
|
||||
$data = [
|
||||
'color' => $color,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'hideDashboard' => !$account->enable_client_portal,
|
||||
'hideDashboard' => !$account->enable_client_portal_dashboard,
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
@ -366,13 +382,18 @@ class PublicClientController extends BaseController
|
||||
if (!$invitation = $this->getInvitation()) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$account = $invitation->account;
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
|
||||
|
||||
if (!$account->enable_client_portal) {
|
||||
return $this->returnError();
|
||||
}
|
||||
|
||||
$color = $account->primary_color ? $account->primary_color : '#0b4d78';
|
||||
$data = [
|
||||
'color' => $color,
|
||||
'hideLogo' => $account->isWhiteLabel(),
|
||||
'hideDashboard' => !$account->enable_client_portal,
|
||||
'hideDashboard' => !$account->enable_client_portal_dashboard,
|
||||
'showDocuments' => $account->isPro(),
|
||||
'clientViewCSS' => $account->clientViewCSS(),
|
||||
'clientFontUrl' => $account->getFontsUrl(),
|
||||
|
@ -1049,8 +1049,6 @@ $LANG = array(
|
||||
'custom_invoice_item_fields_help' => 'Add a field when creating an invoice item and display the label and value on the PDF.',
|
||||
'recurring_invoice_number' => 'Recurring Invoice Number',
|
||||
'recurring_invoice_number_prefix_help' => 'Speciy a prefix to be added to the invoice number for recurring invoices. The default value is \'R\'.',
|
||||
'enable_client_portal' => 'Dashboard',
|
||||
'enable_client_portal_help' => 'Show/hide the dashboard page in the client portal.',
|
||||
|
||||
// Client Passwords
|
||||
'enable_portal_password'=>'Password protect invoices',
|
||||
@ -1123,6 +1121,12 @@ $LANG = array(
|
||||
'documents' => 'Documents',
|
||||
'document_date' => 'Document Date',
|
||||
'document_size' => 'Size',
|
||||
|
||||
'enable_client_portal' => 'Client Portal',
|
||||
'enable_client_portal_help' => 'Show/hide the client portal.',
|
||||
'enable_client_portal_dashboard' => 'Dashboard',
|
||||
'enable_client_portal_dashboard_help' => 'Show/hide the dashboard page in the client portal.',
|
||||
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
@ -13,6 +13,7 @@
|
||||
->addClass('warn-on-exit') !!}
|
||||
|
||||
{!! Former::populateField('enable_client_portal', intval($account->enable_client_portal)) !!}
|
||||
{!! Former::populateField('enable_client_portal_dashboard', intval($account->enable_client_portal_dashboard)) !!}
|
||||
{!! Former::populateField('client_view_css', $client_view_css) !!}
|
||||
{!! Former::populateField('enable_portal_password', intval($enable_portal_password)) !!}
|
||||
{!! Former::populateField('send_portal_password', intval($send_portal_password)) !!}
|
||||
@ -39,6 +40,11 @@
|
||||
->text(trans('texts.enable'))
|
||||
->help(trans('texts.enable_client_portal_help')) !!}
|
||||
</div>
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
{!! Former::checkbox('enable_client_portal_dashboard')
|
||||
->text(trans('texts.enable'))
|
||||
->help(trans('texts.enable_client_portal_dashboard_help')) !!}
|
||||
</div>
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
{!! Former::checkbox('enable_portal_password')
|
||||
->text(trans('texts.enable_portal_password'))
|
||||
|
Loading…
Reference in New Issue
Block a user