1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/resources/views/accounts/details.blade.php

167 lines
5.1 KiB
PHP
Raw Normal View History

2015-10-14 16:15:39 +02:00
@extends('header')
2015-03-16 22:45:25 +01:00
2015-11-05 11:02:14 +01:00
@section('head')
@parent
2016-07-21 14:35:23 +02:00
<link href="{{ asset('css/quill.snow.css') }}" rel="stylesheet" type="text/css"/>
2015-11-05 11:02:14 +01:00
<script src="{{ asset('js/quill.min.js') }}" type="text/javascript"></script>
@stop
2016-05-29 18:34:51 +02:00
@section('content')
2015-03-16 22:45:25 +01:00
@parent
2016-05-29 18:34:51 +02:00
2015-03-16 22:45:25 +01:00
<style type="text/css">
#logo {
padding-top: 6px;
}
</style>
2015-11-09 15:53:18 +01:00
{!! Former::open_for_files()
->addClass('warn-on-exit')
->autocomplete('on')
->rules([
2015-12-14 22:05:17 +01:00
'name' => 'required',
2015-11-09 15:53:18 +01:00
]) !!}
2015-03-16 22:45:25 +01:00
{{ Former::populate($account) }}
2016-05-29 18:34:51 +02:00
2015-10-14 16:15:39 +02:00
@include('accounts.nav', ['selected' => ACCOUNT_COMPANY_DETAILS])
2015-03-16 22:45:25 +01:00
<div class="row">
2015-10-14 16:15:39 +02:00
<div class="col-md-12">
2015-04-20 16:34:23 +02:00
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.details') !!}</h3>
</div>
2015-10-14 19:18:19 +02:00
<div class="panel-body form-padding-right">
2015-11-16 19:02:04 +01:00
{!! Former::text('name') !!}
2015-11-05 11:02:14 +01:00
{!! Former::text('id_number') !!}
{!! Former::text('vat_number') !!}
2015-12-14 22:05:17 +01:00
{!! Former::text('website') !!}
2015-11-16 19:02:04 +01:00
{!! Former::text('work_email') !!}
{!! Former::text('work_phone') !!}
2015-11-05 11:02:14 +01:00
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
2015-11-16 19:02:04 +01:00
@if ($account->hasLogo())
<div class="form-group">
<div class="col-lg-4 col-sm-4"></div>
<div class="col-lg-8 col-sm-8">
2016-04-17 01:14:43 +02:00
<a href="{{ $account->getLogoUrl(true) }}" target="_blank">
{!! HTML::image($account->getLogoUrl(true), 'Logo', ['style' => 'max-width:300px']) !!}
2015-11-16 19:02:04 +01:00
</a> &nbsp;
<a href="#" onclick="deleteLogo()">{{ trans('texts.remove_logo') }}</a>
</div>
</div>
@endif
2015-11-05 11:02:14 +01:00
2017-01-16 12:59:46 +01:00
{!! Former::select('payment_terms')
->addOption('','')
->fromQuery(Cache::get('paymentTerms'), 'name', 'num_days')
->help(trans('texts.payment_terms_help')) !!}
2015-12-03 16:35:41 +01:00
{!! Former::select('size_id')
->addOption('','')
->fromQuery($sizes, 'name', 'id') !!}
{!! Former::select('industry_id')
->addOption('','')
->fromQuery($industries, 'name', 'id')
->help('texts.industry_help') !!}
2015-11-05 11:02:14 +01:00
2015-04-20 16:34:23 +02:00
</div>
</div>
2015-03-16 22:45:25 +01:00
2015-04-20 16:34:23 +02:00
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.address') !!}</h3>
</div>
2015-10-14 19:18:19 +02:00
<div class="panel-body form-padding-right">
2016-05-29 18:34:51 +02:00
2015-11-09 15:53:18 +01:00
{!! Former::text('address1')->autocomplete('address-line1') !!}
{!! Former::text('address2')->autocomplete('address-line2') !!}
{!! Former::text('city')->autocomplete('address-level2') !!}
{!! Former::text('state')->autocomplete('address-level1') !!}
{!! Former::text('postal_code')->autocomplete('postal-code') !!}
{!! Former::select('country_id')
->addOption('','')
->fromQuery($countries, 'name', 'id') !!}
2015-03-16 22:45:25 +01:00
2015-04-20 16:34:23 +02:00
</div>
</div>
2016-05-29 18:34:51 +02:00
2015-11-05 11:02:14 +01:00
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.signature') !!}</h3>
</div>
<div class="panel-body">
<div class="col-md-10 col-md-offset-1">
2016-05-29 18:34:51 +02:00
{!! Former::textarea('email_footer')->style('display:none')->raw() !!}
2015-11-05 11:02:14 +01:00
<div id="signatureEditor" class="form-control" style="min-height:160px" onclick="focusEditor()"></div>
@include('partials/quill_toolbar', ['name' => 'signature'])
</div>
2016-05-29 18:34:51 +02:00
2015-11-05 11:02:14 +01:00
</div>
</div>
</div>
2016-05-29 18:34:51 +02:00
2015-03-16 22:45:25 +01:00
</div>
2016-05-29 18:34:51 +02:00
2015-03-16 22:45:25 +01:00
<center>
2015-04-01 21:57:02 +02:00
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
2015-03-16 22:45:25 +01:00
</center>
2015-04-20 16:34:23 +02:00
{!! Former::close() !!}
2016-05-29 18:34:51 +02:00
{!! Form::open(['url' => 'remove_logo', 'class' => 'removeLogoForm']) !!}
2015-04-01 21:57:02 +02:00
{!! Form::close() !!}
2015-03-16 22:45:25 +01:00
<script type="text/javascript">
2015-11-05 11:02:14 +01:00
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() {
2016-07-28 18:55:23 +02:00
sweetConfirm(function() {
2015-11-05 11:02:14 +01:00
$('.removeLogoForm').submit();
2016-07-28 18:55:23 +02:00
});
2015-11-05 11:02:14 +01:00
}
2015-03-16 22:45:25 +01:00
</script>
2015-05-09 20:25:16 +02:00
@stop
2015-03-16 22:45:25 +01:00
2015-05-09 20:25:16 +02:00
@section('onReady')
$('#name').focus();
2016-05-29 18:34:51 +02:00
@stop