mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Update company settings layout
This commit is contained in:
parent
fcf169312a
commit
e6eb84f49e
@ -110,7 +110,7 @@ trait SendsEmails
|
||||
*/
|
||||
public function getEmailFooter()
|
||||
{
|
||||
if ($this->email_footer) {
|
||||
if ($this->isPro() && $this->email_footer) {
|
||||
// Add line breaks if HTML isn't already being used
|
||||
return strip_tags($this->email_footer) == $this->email_footer ? nl2br($this->email_footer) : $this->email_footer;
|
||||
} else {
|
||||
|
@ -2379,7 +2379,7 @@ $LANG = array(
|
||||
'freq_two_months' => 'Two months',
|
||||
'freq_yearly' => 'Annually',
|
||||
'profile' => 'Profile',
|
||||
'payment_type_help' => 'Sets the default <b>payment type</b>.',
|
||||
'payment_type_help' => 'Sets the default <b>manual payment type</b>.',
|
||||
'industry_Construction' => 'Construction',
|
||||
'your_statement' => 'Your Statement',
|
||||
'statement_issued_to' => 'Statement issued to',
|
||||
|
@ -38,7 +38,7 @@
|
||||
{!! Former::populateField('require_invoice_signature', intval($account->require_invoice_signature)) !!}
|
||||
{!! Former::populateField('require_quote_signature', intval($account->require_quote_signature)) !!}
|
||||
|
||||
@include('accounts.nav', ['selected' => ACCOUNT_CLIENT_PORTAL])
|
||||
@include('accounts.nav', ['selected' => ACCOUNT_CLIENT_PORTAL, 'advanced' => true])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@ -324,9 +324,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
<center>
|
||||
@if (Auth::user()->isPro())
|
||||
<center>
|
||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||
</center>
|
||||
</center>
|
||||
@endif
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
||||
|
@ -1,12 +1,5 @@
|
||||
@extends('header')
|
||||
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<link href="{{ asset('css/quill.snow.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<script src="{{ asset('js/quill.min.js') }}" type="text/javascript"></script>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@parent
|
||||
|
||||
@ -59,6 +52,16 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
{!! Former::select('size_id')
|
||||
->addOption('','')
|
||||
->fromQuery($sizes, 'name', 'id') !!}
|
||||
|
||||
{!! Former::select('industry_id')
|
||||
->addOption('','')
|
||||
->fromQuery($industries, 'name', 'id')
|
||||
->help('texts.industry_help') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -82,30 +85,13 @@
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{!! trans('texts.settings') !!}</h3>
|
||||
<h3 class="panel-title">{!! trans('texts.defaults') !!}</h3>
|
||||
</div>
|
||||
<div class="panel-body form-padding-right">
|
||||
|
||||
<div role="tabpanel">
|
||||
<ul class="nav nav-tabs" role="tablist" style="border: none">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#defaults" aria-controls="client_fields" role="tab" data-toggle="tab">{{ trans('texts.defaults') }}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#profile" aria-controls="invoice_fields" role="tab" data-toggle="tab">{{ trans('texts.profile') }}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#signature" aria-controls="company_fields" role="tab" data-toggle="tab">{{ trans('texts.signature') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="defaults">
|
||||
|
||||
<br/> <br/>
|
||||
{!! Former::select('payment_type_id')
|
||||
->addOption('','')
|
||||
->fromQuery(Cache::get('paymentTypes'), 'name', 'num_days')
|
||||
->fromQuery(Cache::get('paymentTypes')->sortBy('name'), 'name', 'num_days')
|
||||
->help(trans('texts.payment_type_help')) !!}
|
||||
|
||||
{!! Former::select('payment_terms')
|
||||
@ -114,33 +100,6 @@
|
||||
->help(trans('texts.payment_terms_help')) !!}
|
||||
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="profile">
|
||||
|
||||
<br/> <br/>
|
||||
{!! Former::select('size_id')
|
||||
->addOption('','')
|
||||
->fromQuery($sizes, 'name', 'id') !!}
|
||||
|
||||
{!! Former::select('industry_id')
|
||||
->addOption('','')
|
||||
->fromQuery($industries, 'name', 'id')
|
||||
->help('texts.industry_help') !!}
|
||||
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="signature">
|
||||
|
||||
<br/>
|
||||
{!! Former::textarea('email_footer')->style('display:none')->raw() !!}
|
||||
<div id="signatureEditor" class="form-control" style="min-height:160px" onclick="focusEditor()"></div>
|
||||
@include('partials/quill_toolbar', ['name' => 'signature'])
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -159,31 +118,9 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var editor = false;
|
||||
$(function() {
|
||||
$('#country_id').combobox();
|
||||
|
||||
editor = new Quill('#signatureEditor', {
|
||||
modules: {
|
||||
'toolbar': { container: '#signatureToolbar' },
|
||||
'link-tooltip': true
|
||||
},
|
||||
theme: 'snow'
|
||||
});
|
||||
editor.setHTML($('#email_footer').val());
|
||||
editor.on('text-change', function(delta, source) {
|
||||
if (source == 'api') {
|
||||
return;
|
||||
}
|
||||
var html = editor.getHTML();
|
||||
$('#email_footer').val(html);
|
||||
NINJA.formIsChanged = true;
|
||||
});
|
||||
});
|
||||
|
||||
function focusEditor() {
|
||||
editor.focus();
|
||||
}
|
||||
|
||||
function deleteLogo() {
|
||||
sweetConfirm(function() {
|
||||
|
@ -3,6 +3,9 @@
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<link href="{{ asset('css/quill.snow.css') }}" rel="stylesheet" type="text/css"/>
|
||||
<script src="{{ asset('js/quill.min.js') }}" type="text/javascript"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.iframe_url {
|
||||
display: none;
|
||||
@ -78,6 +81,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{!! trans('texts.signature') !!}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{!! Former::textarea('email_footer')->style('display:none')->raw() !!}
|
||||
<div id="signatureEditor" class="form-control" style="min-height:160px" onclick="focusEditor()"></div>
|
||||
@include('partials/quill_toolbar', ['name' => 'signature'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Auth::user()->hasFeature(FEATURE_CUSTOM_EMAILS))
|
||||
<center>
|
||||
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||
@ -125,6 +139,30 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var editor = false;
|
||||
$(function() {
|
||||
editor = new Quill('#signatureEditor', {
|
||||
modules: {
|
||||
'toolbar': { container: '#signatureToolbar' },
|
||||
'link-tooltip': true
|
||||
},
|
||||
theme: 'snow'
|
||||
});
|
||||
editor.setHTML($('#email_footer').val());
|
||||
editor.on('text-change', function(delta, source) {
|
||||
if (source == 'api') {
|
||||
return;
|
||||
}
|
||||
var html = editor.getHTML();
|
||||
$('#email_footer').val(html);
|
||||
NINJA.formIsChanged = true;
|
||||
});
|
||||
});
|
||||
|
||||
function focusEditor() {
|
||||
editor.focus();
|
||||
}
|
||||
|
||||
$('.email_design_id .input-group-addon').click(function() {
|
||||
$('#designHelpModal').modal('show');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user