diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index c95278c362b1..59d0dc8e01b4 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -7,6 +7,8 @@ use Session; use Utils; use View; use Event; +use Validator; +use stdClass; use App\Models\Account; use App\Models\Country; @@ -17,6 +19,7 @@ use App\Models\Language; use App\Models\Size; use App\Models\Timezone; use App\Models\Industry; +use App\Models\InvoiceDesign; use App\Ninja\Repositories\AccountRepository; use App\Ninja\Mailers\UserMailer; use App\Ninja\Mailers\ContactMailer; @@ -203,8 +206,9 @@ class AccountController extends BaseController $invoice->invoice_items = [$invoiceItem]; $data['invoice'] = $invoice; - $data['invoiceDesigns'] = InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId()) - ->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(); + //$data['invoiceDesigns'] = InvoiceDesign::remember(DEFAULT_QUERY_CACHE, 'invoice_designs_cache_'.Auth::user()->maxInvoiceDesignId()) + // ->where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(); + $data['invoiceDesigns'] = InvoiceDesign::where('id', '<=', Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(); } else if ($subSection == ACCOUNT_EMAIL_TEMPLATES) { $data['invoiceEmail'] = $account->getEmailTemplate(ENTITY_INVOICE); $data['quoteEmail'] = $account->getEmailTemplate(ENTITY_QUOTE); @@ -297,7 +301,7 @@ class AccountController extends BaseController $account->quote_number_prefix = Input::get('quote_number_prefix'); $account->share_counter = Input::get('share_counter') ? true : false; - $account->pdf_email_attachment = Input::get('pdf_email_attachment') ? true : false; + //$account->pdf_email_attachment = Input::get('pdf_email_attachment') ? true : false; if (!$account->share_counter) { $account->quote_number_counter = Input::get('quote_number_counter'); diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index 2cde2a4c7b57..9dffc318f425 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -7,8 +7,13 @@ use Input; use Redirect; use Session; use View; +use Validator; +use stdClass; use App\Models\Gateway; +use App\Models\Account; +use App\Models\AccountGateway; + use App\Ninja\Repositories\AccountRepository; class AccountGatewayController extends BaseController diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 4352920d04fd..bfbeba8cc6ab 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -2,8 +2,16 @@ use Auth; use Input; +use Utils; +use DB; +use DateInterval; +use DatePeriod; +use Session; +use View; -class ReportController extends \BaseController +use App\Models\Account; + +class ReportController extends BaseController { public function d3() { diff --git a/app/Http/Controllers/TokenController.php b/app/Http/Controllers/TokenController.php index d6a488e3a4b1..15bdf43a8838 100644 --- a/app/Http/Controllers/TokenController.php +++ b/app/Http/Controllers/TokenController.php @@ -9,6 +9,16 @@ | */ +use Auth; +use Session; +use DB; +use Validator; +use Input; +use View; +use Redirect; + +use App\Models\AccountToken; + use App\Ninja\Repositories\AccountRepository; class TokenController extends BaseController diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index e325136c1b90..107a715cc3a6 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -7,6 +7,9 @@ use Input; use View; use Redirect; use Session; +use Utils; + +use App\Models\User; use App\Http\Requests; use App\Http\Controllers\Controller; diff --git a/app/Listeners/HandleUserSettingsChanged.php b/app/Listeners/HandleUserSettingsChanged.php index 8ebd1a9b3355..e01a010c9dd1 100644 --- a/app/Listeners/HandleUserSettingsChanged.php +++ b/app/Listeners/HandleUserSettingsChanged.php @@ -1,5 +1,7 @@ 'validation.attributes', + 'translate_from' => 'texts', // Whether text that comes out of the translated // should be capitalized (ex: email => Email) automatically diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php index 9aa605664798..81f4f65dca35 100644 --- a/resources/views/accounts/account_gateway.blade.php +++ b/resources/views/accounts/account_gateway.blade.php @@ -3,14 +3,14 @@ @section('content') @parent - {{ Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }} - {{ Former::populate($account) }} + {!! Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!} + {!! Former::populate($account) !!} - {{ Former::legend($title) }} + {!! Former::legend($title) !!} @if ($accountGateway) - {{ Former::populateField('gateway_id', $accountGateway->gateway_id) }} - {{ Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) }} + {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} + {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} @if ($config) @foreach ($accountGateway->fields as $field => $junk) @if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName'])) @@ -23,24 +23,24 @@ @endif
- {{ Former::legend('client_fields') }} - {{ Former::text('custom_client_label1')->label(trans('texts.field_label')) }} - {{ Former::text('custom_client_label2')->label(trans('texts.field_label')) }} + {!! Former::legend('client_fields') !!} + {!! Former::text('custom_client_label1')->label(trans('texts.field_label')) !!} + {!! Former::text('custom_client_label2')->label(trans('texts.field_label')) !!}
- {{ Former::legend('company_fields') }} - {{ Former::text('custom_label1')->label(trans('texts.field_label')) }} - {{ Former::text('custom_value1')->label(trans('texts.field_value')) }} + {!! Former::legend('company_fields') !!} + {!! Former::text('custom_label1')->label(trans('texts.field_label')) !!} + {!! Former::text('custom_value1')->label(trans('texts.field_value')) !!}
- {{ Former::text('custom_label2')->label(trans('texts.field_label')) }} - {{ Former::text('custom_value2')->label(trans('texts.field_value')) }} + {!! Former::text('custom_label2')->label(trans('texts.field_label')) !!} + {!! Former::text('custom_value2')->label(trans('texts.field_value')) !!}
- {{ Former::legend('invoice_number') }} - {{ Former::text('invoice_number_prefix')->label(trans('texts.invoice_number_prefix')) }} - {{ Former::text('invoice_number_counter')->label(trans('texts.invoice_number_counter')) }} + {!! Former::legend('invoice_number') !!} + {!! Former::text('invoice_number_prefix')->label(trans('texts.invoice_number_prefix')) !!} + {!! Former::text('invoice_number_counter')->label(trans('texts.invoice_number_counter')) !!}
- {{ Former::legend('quote_number') }} - {{ Former::text('quote_number_prefix')->label(trans('texts.quote_number_prefix')) }} - {{ Former::text('quote_number_counter')->label(trans('texts.quote_number_counter')) - ->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) }} + {!! Former::legend('quote_number') !!} + {!! Former::text('quote_number_prefix')->label(trans('texts.quote_number_prefix')) !!} + {!! Former::text('quote_number_counter')->label(trans('texts.quote_number_counter')) + ->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) !!}
- {{ Former::legend('email_settings') }} - {{ Former::checkbox('pdf_email_attachment') }} + {!! Former::legend('email_settings') !!} + {!! Former::checkbox('pdf_email_attachment') !!}
@if (Auth::user()->isPro()) - {{ Former::actions( Button::lg_success_submit(trans('texts.save'))->append_with_icon('floppy-disk') ) }} + {!! Former::actions( Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk'))) !!} @else @endif - {{ Former::close() }} + {!! Former::close() !!} +