2014-04-18 10:57:31 +02:00
|
|
|
@extends('accounts.nav')
|
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
@section('head')
|
|
|
|
@parent
|
|
|
|
|
|
|
|
<style type="text/css">
|
2015-04-21 13:42:31 +02:00
|
|
|
.input-group-addon div.checkbox {
|
2015-04-01 21:57:02 +02:00
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
span.input-group-addon {
|
|
|
|
padding-right: 30px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
@stop
|
|
|
|
|
2014-04-18 10:57:31 +02:00
|
|
|
@section('content')
|
|
|
|
@parent
|
2014-05-08 21:19:33 +02:00
|
|
|
@include('accounts.nav_advanced')
|
2014-04-25 15:04:57 +02:00
|
|
|
|
2015-04-20 16:34:23 +02:00
|
|
|
{!! Former::open()->addClass('warn-on-exit') !!}
|
2015-04-21 13:42:31 +02:00
|
|
|
{{ Former::populate($account) }}
|
|
|
|
{{ Former::populateField('custom_invoice_taxes1', intval($account->custom_invoice_taxes1)) }}
|
|
|
|
{{ Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) }}
|
|
|
|
{{ Former::populateField('share_counter', intval($account->share_counter)) }}
|
|
|
|
{{ Former::populateField('pdf_email_attachment', intval($account->pdf_email_attachment)) }}
|
2014-10-14 09:46:30 +02:00
|
|
|
|
2015-04-20 16:34:23 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.invoice_fields') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{!! Former::text('custom_invoice_label1')->label(trans('texts.field_label'))
|
|
|
|
->append(Former::checkbox('custom_invoice_taxes1')->raw() . trans('texts.charge_taxes')) !!}
|
|
|
|
{!! Former::text('custom_invoice_label2')->label(trans('texts.field_label'))
|
|
|
|
->append(Former::checkbox('custom_invoice_taxes2')->raw() . ' ' . trans('texts.charge_taxes')) !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.client_fields') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{!! Former::text('custom_client_label1')->label(trans('texts.field_label')) !!}
|
|
|
|
{!! Former::text('custom_client_label2')->label(trans('texts.field_label')) !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.company_fields') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
{!! Former::text('custom_label1')->label(trans('texts.field_label')) !!}
|
|
|
|
{!! Former::text('custom_value1')->label(trans('texts.field_value')) !!}
|
|
|
|
<p> </p>
|
|
|
|
{!! Former::text('custom_label2')->label(trans('texts.field_label')) !!}
|
|
|
|
{!! Former::text('custom_value2')->label(trans('texts.field_value')) !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
2015-09-10 19:50:09 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.email_settings') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2015-09-20 23:05:02 +02:00
|
|
|
@if (Utils::isNinja())
|
|
|
|
{{ Former::setOption('capitalize_translations', false) }}
|
|
|
|
{!! Former::text('subdomain')->placeholder(trans('texts.www'))->onchange('onSubdomainChange()') !!}
|
|
|
|
{!! Former::text('iframe_url')->placeholder('http://invoices.example.com/')
|
|
|
|
->onchange('onDomainChange()')->appendIcon('question-sign')->addGroupClass('iframe_url') !!}
|
|
|
|
@endif
|
2015-09-10 19:50:09 +02:00
|
|
|
{!! Former::checkbox('pdf_email_attachment')->text(trans('texts.enable')) !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-04-20 16:34:23 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.invoice_number') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2015-05-27 22:20:35 +02:00
|
|
|
{!! Former::text('invoice_number_prefix')->label(trans('texts.prefix')) !!}
|
|
|
|
{!! Former::text('invoice_number_counter')->label(trans('texts.counter')) !!}
|
2015-04-20 16:34:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! trans('texts.quote_number') !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2015-05-27 22:20:35 +02:00
|
|
|
{!! Former::text('quote_number_prefix')->label(trans('texts.prefix')) !!}
|
|
|
|
{!! Former::text('quote_number_counter')->label(trans('texts.counter'))
|
2015-04-20 16:34:23 +02:00
|
|
|
->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-10-01 22:02:22 +02:00
|
|
|
@if (Auth::user()->isPro())
|
|
|
|
<center>
|
|
|
|
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
|
|
|
|
</center>
|
|
|
|
@else
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
$('form.warn-on-exit input').prop('disabled', true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@endif
|
2014-04-18 10:57:31 +02:00
|
|
|
|
2015-09-10 19:50:09 +02:00
|
|
|
|
|
|
|
<div class="modal fade" id="iframeHelpModal" tabindex="-1" role="dialog" aria-labelledby="iframeHelpModalLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="min-width:150px">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h4 class="modal-title" id="iframeHelpModalLabel">{{ trans('texts.iframe_url') }}</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<p>{{ trans('texts.iframe_url_help1') }}</p>
|
2015-09-20 23:05:02 +02:00
|
|
|
<pre><iframe id="invoiceIFrame" width="800" height="1000"></iframe>
|
2015-09-10 19:50:09 +02:00
|
|
|
<script language="javascript">
|
2015-09-20 23:05:02 +02:00
|
|
|
var iframe = document.getElementById('invoiceIFrame');
|
2015-09-10 19:50:09 +02:00
|
|
|
iframe.src = '{{ SITE_URL }}/view/'
|
|
|
|
+ window.location.search.substring(1);
|
|
|
|
</script></pre>
|
|
|
|
<p>{{ trans('texts.iframe_url_help2') }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer" style="margin-top: 0px">
|
|
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">{{ trans('texts.close') }}</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2015-04-01 21:57:02 +02:00
|
|
|
{!! Former::close() !!}
|
2014-04-18 10:57:31 +02:00
|
|
|
|
2014-10-14 09:46:30 +02:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
function setQuoteNumberEnabled() {
|
|
|
|
var disabled = $('#share_counter').prop('checked');
|
|
|
|
$('#quote_number_counter').prop('disabled', disabled);
|
2015-04-01 21:57:02 +02:00
|
|
|
$('#quote_number_counter').val(disabled ? '' : '{!! $account->quote_number_counter !!}');
|
2014-10-14 09:46:30 +02:00
|
|
|
}
|
|
|
|
|
2015-09-10 19:50:09 +02:00
|
|
|
function onSubdomainChange() {
|
|
|
|
var input = $('#subdomain');
|
|
|
|
var val = input.val();
|
|
|
|
if (!val) return;
|
|
|
|
val = val.replace(/[^a-zA-Z0-9_\-]/g, '').toLowerCase().substring(0, {{ MAX_SUBDOMAIN_LENGTH }});
|
|
|
|
input.val(val);
|
|
|
|
}
|
|
|
|
|
|
|
|
function onDomainChange() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$('.iframe_url .input-group-addon').click(function() {
|
|
|
|
$('#iframeHelpModal').modal('show');
|
|
|
|
});
|
|
|
|
|
2014-10-14 09:46:30 +02:00
|
|
|
$(function() {
|
|
|
|
setQuoteNumberEnabled();
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
2015-05-09 20:25:16 +02:00
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('onReady')
|
|
|
|
$('#custom_invoice_label1').focus();
|
2014-04-18 10:57:31 +02:00
|
|
|
@stop
|