Working on L5

This commit is contained in:
Hillel Coren 2015-04-20 17:34:23 +03:00
parent ee2a7fccf6
commit e95b6461bb
29 changed files with 992 additions and 1446 deletions

40
LICENSE Normal file
View File

@ -0,0 +1,40 @@
Attribution Assurance License
Copyright (c) 2014 by Hillel Coren
http://www.hillelcoren.com
All Rights Reserved
ATTRIBUTION ASSURANCE LICENSE (adapted from the original BSD license)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the conditions below are met.
These conditions require a modest attribution to InvoiceNinja.com. The hope
is that its promotional value may help justify the thousands of dollars in
otherwise billable time invested in writing this and other freely available,
open-source software.
1. Redistributions of source code, in whole or part and with or without
modification requires the express permission of the author and must prominently
display "Powered by InvoiceNinja" or the Invoice Ninja logo in verifiable form
with hyperlink to said site.
2. Neither the name nor any trademark of the Author may be used to
endorse or promote products derived from this software without specific
prior written permission.
3. Users are entirely responsible, to the exclusion of the Author and
any other persons, for compliance with (1) regulations set by owners or
administrators of employed equipment, (2) licensing terms of any other
software, and (3) local regulations regarding use, including those
regarding import, export, and use of encryption software.
THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS;
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,6 +1,7 @@
<?php namespace App\Http\Middleware; <?php namespace App\Http\Middleware;
use Closure; use Closure;
use App\Models\Client;
use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
@ -33,7 +34,7 @@ class RedirectIfAuthenticated {
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
if ($this->auth->check()) if ($this->auth->check() && Client::scope()->count() > 0)
{ {
return new RedirectResponse(url('/dashboard')); return new RedirectResponse(url('/dashboard'));
} }

View File

@ -11,12 +11,11 @@ class InvoiceDesign extends Eloquent
foreach($designs as $design) { foreach($designs as $design) {
if($design->filename) { if($design->filename) {
$fileName = public_path($design->filename); $fileName = public_path(strtolower("js/templates/{$design->name}.js"));
if(file_exists($fileName)) { if(file_exists($fileName)) {
$design->javascript = file_get_contents($fileName); $design->javascript = file_get_contents($fileName);
} }
} }
} }
return $designs; return $designs;

View File

@ -16,6 +16,11 @@ class AddPartialAmountToInvoices extends Migration {
{ {
$table->decimal('partial', 13, 2)->nullable(); $table->decimal('partial', 13, 2)->nullable();
}); });
Schema::table('accounts', function($table)
{
$table->boolean('utf8_invoices')->default(false);
});
} }
/** /**
@ -29,6 +34,11 @@ class AddPartialAmountToInvoices extends Migration {
{ {
$table->dropColumn('partial'); $table->dropColumn('partial');
}); });
Schema::table('accounts', function($table)
{
$table->dropColumn('utf8_invoices');
});
} }
} }

View File

@ -1,47 +0,0 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class InvoicesFile extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoice_designs', function($table)
{
$table->text('filename')->nullable();
});
DB::table('invoice_designs')->where('id', 1)->update([
'filename'=>'js/templates/clean.js'
]);
DB::table('invoice_designs')->where('id', 2)->update([
'filename'=>'js/templates/bold.js'
]);
DB::table('invoice_designs')->where('id', 3)->update([
'filename'=>'js/templates/modern.js'
]);
DB::table('invoice_designs')->where('id', 4)->update([
'filename'=>'js/templates/plain.js'
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoice_designs', function($table)
{
$table->dropColumn('filename');
});
}
}

513
public/css/built.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

29
public/css/style.css vendored
View File

@ -1,5 +1,6 @@
body { background: #f8f8f8 !important; body { background: #f8f8f8 !important;
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
font-size: 15px;
} }
.bold { font-weight: 700; } .bold { font-weight: 700; }
a {color:#0b4d78;} a {color:#0b4d78;}
@ -38,8 +39,8 @@ height: 40px;
padding: 9px 12px; padding: 9px 12px;
font-size: 14px; font-size: 14px;
line-height: 1.42857143; line-height: 1.42857143;
color: #555; color: #000 !important;
background-color: #fff; background: #f9f9f9 !important;
background-image: none; background-image: none;
border: 1px solid #dfe0e1; border: 1px solid #dfe0e1;
border-radius: 2px; border-radius: 2px;
@ -805,3 +806,27 @@ body.modal-open { overflow:inherit; padding-right:inherit !important; }
div.checkbox > label { div.checkbox > label {
padding-left: 0px !important; padding-left: 0px !important;
} }
.container input[type=text],
.container input[type=email],
.container textarea,
.container select {
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 400;
width: 100%;
color: #000 !important;
background: #f9f9f9 !important;
border: 1px solid #ebe7e7;
border-radius: 3px;
}
.container input[placeholder],
.container textarea[placeholder],
.container select[placeholder] {
color: #444444;
}
.panel-title {
font-size: 18px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -593,5 +593,8 @@ return array(
'partial' => 'Partial', 'partial' => 'Partial',
'partial_remaining' => ':partial of :balance', 'partial_remaining' => ':partial of :balance',
'more_fields' => 'More Fields',
'less_fields' => 'Less Fields',
'client_name' => 'Client Name',
); );

View File

@ -6,8 +6,12 @@
{!! Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!} {!! Former::open($url)->method($method)->rule()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!}
{!! Former::populate($account) !!} {!! Former::populate($account) !!}
{!! Former::legend($title) !!} {!! Former::legend($title) !!}
<div class="panel panel-default">
<div class="panel-body">
@if ($accountGateway) @if ($accountGateway)
{!! Former::populateField('payment_type_id', $paymentTypeId) !!} {!! Former::populateField('payment_type_id', $paymentTypeId) !!}
{!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!}
@ -76,6 +80,8 @@
->addGroupClass('gateway-option') ->addGroupClass('gateway-option')
!!} !!}
</div>
</div>
<p/>&nbsp;<p/> <p/>&nbsp;<p/>

View File

@ -11,7 +11,7 @@
</style> </style>
{!! Former::open_for_files()->addClass('col-md-10 col-md-offset-1 warn-on-exit')->rules(array( {!! Former::open_for_files()->addClass('warn-on-exit')->rules(array(
'name' => 'required', 'name' => 'required',
'email' => 'email|required' 'email' => 'email|required'
)) !!} )) !!}
@ -25,9 +25,14 @@
@endif @endif
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.details') !!}</h3>
</div>
<div class="panel-body">
{!! Former::legend('details') !!}
{!! Former::text('name') !!} {!! Former::text('name') !!}
{!! Former::text('id_number') !!} {!! Former::text('id_number') !!}
{!! Former::text('vat_number') !!} {!! Former::text('vat_number') !!}
@ -44,8 +49,15 @@
{!! Former::select('size_id')->addOption('','')->fromQuery($sizes, 'name', 'id') !!} {!! Former::select('size_id')->addOption('','')->fromQuery($sizes, 'name', 'id') !!}
{!! Former::select('industry_id')->addOption('','')->fromQuery($industries, 'name', 'id') !!} {!! Former::select('industry_id')->addOption('','')->fromQuery($industries, 'name', 'id') !!}
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.address') !!}</h3>
</div>
<div class="panel-body">
{!! Former::legend('address') !!}
{!! Former::text('address1') !!} {!! Former::text('address1') !!}
{!! Former::text('address2') !!} {!! Former::text('address2') !!}
{!! Former::text('city') !!} {!! Former::text('city') !!}
@ -55,11 +67,17 @@
->fromQuery($countries, 'name', 'id') !!} ->fromQuery($countries, 'name', 'id') !!}
</div> </div>
</div>
</div>
<div class="col-md-5 col-md-offset-1"> <div class="col-md-6">
@if ($showUser) @if ($showUser)
{!! Former::legend('users') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.users') !!}</h3>
</div>
<div class="panel-body">
{!! Former::text('first_name') !!} {!! Former::text('first_name') !!}
{!! Former::text('last_name') !!} {!! Former::text('last_name') !!}
{!! Former::text('email') !!} {!! Former::text('email') !!}
@ -69,9 +87,17 @@
@elseif (Auth::user()->registered) @elseif (Auth::user()->registered)
{!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo('/resend_confirmation')->small() ) !!} {!! Former::actions( Button::primary(trans('texts.resend_confirmation'))->asLinkTo('/resend_confirmation')->small() ) !!}
@endif @endif
</div>
</div>
@endif @endif
{!! Former::legend('localization') !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.localization') !!}</h3>
</div>
<div class="panel-body">
{!! Former::select('language_id')->addOption('','') {!! Former::select('language_id')->addOption('','')
->fromQuery($languages, 'name', 'id') !!} ->fromQuery($languages, 'name', 'id') !!}
{!! Former::select('currency_id')->addOption('','') {!! Former::select('currency_id')->addOption('','')
@ -82,8 +108,8 @@
->fromQuery($dateFormats, 'label', 'id') !!} ->fromQuery($dateFormats, 'label', 'id') !!}
{!! Former::select('datetime_format_id')->addOption('','') {!! Former::select('datetime_format_id')->addOption('','')
->fromQuery($datetimeFormats, 'label', 'id') !!} ->fromQuery($datetimeFormats, 'label', 'id') !!}
</div>
</div>
</div> </div>
</div> </div>
@ -91,7 +117,6 @@
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!} {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
</center> </center>
{!! Former::close() !!}
<div class="modal fade" id="passwordModal" tabindex="-1" role="dialog" aria-labelledby="passwordModalLabel" aria-hidden="true"> <div class="modal fade" id="passwordModal" tabindex="-1" role="dialog" aria-labelledby="passwordModalLabel" aria-hidden="true">
@ -146,6 +171,8 @@
</div> </div>
{!! Former::close() !!}
{!! Form::open(['url' => 'remove_logo', 'class' => 'removeLogoForm']) !!} {!! Form::open(['url' => 'remove_logo', 'class' => 'removeLogoForm']) !!}
{!! Form::close() !!} {!! Form::close() !!}

View File

@ -15,45 +15,59 @@
@parent @parent
@include('accounts.nav_advanced') @include('accounts.nav_advanced')
{!! Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!} {!! Former::open()->addClass('col-md-10 col-md-offset-1 warn-on-exit') !!}
{!! Former::populateField('email_template_invoice', $invoiceEmail) !!} {!! Former::populateField('email_template_invoice', $invoiceEmail) !!}
{!! Former::populateField('email_template_quote', $quoteEmail) !!} {!! Former::populateField('email_template_quote', $quoteEmail) !!}
{!! Former::populateField('email_template_payment', $paymentEmail) !!} {!! Former::populateField('email_template_payment', $paymentEmail) !!}
{!! Former::legend('invoice_email') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.invoice_email') !!}</h3>
</div>
<div class="panel-body">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-6">
{!! Former::textarea('email_template_invoice')->raw() !!} {!! Former::textarea('email_template_invoice')->raw() !!}
</div> </div>
<div class="col-md-5" id="invoice_preview"></div> <div class="col-md-6" id="invoice_preview"></div>
</div>
</div>
</div> </div>
<p>&nbsp;</p>
{!! Former::legend('quote_email') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.quote_email') !!}</h3>
</div>
<div class="panel-body">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-6">
{!! Former::textarea('email_template_quote')->raw() !!} {!! Former::textarea('email_template_quote')->raw() !!}
</div> </div>
<div class="col-md-5" id="quote_preview"></div> <div class="col-md-6" id="quote_preview"></div>
</div>
</div>
</div> </div>
<p>&nbsp;</p>
{!! Former::legend('payment_email') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.payment_email') !!}</h3>
</div>
<div class="panel-body">
<div class="row"> <div class="row">
<div class="col-md-7"> <div class="col-md-6">
{!! Former::textarea('email_template_payment')->raw() !!} {!! Former::textarea('email_template_payment')->raw() !!}
</div> </div>
<div class="col-md-5" id="payment_preview"></div> <div class="col-md-6" id="payment_preview"></div>
</div>
</div>
</div> </div>
<p>&nbsp;</p>
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())
{!! Former::actions( <center>
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
) !!} </center>
@else @else
<script> <script>
$(function() { $(function() {

View File

@ -4,22 +4,39 @@
@parent @parent
{!! Former::open_for_files('company/import_map')->addClass('col-md-9 col-md-offset-1') !!} {!! Former::open_for_files('company/import_map')->addClass('col-md-9 col-md-offset-1') !!}
{!! Former::legend('texts.import_clients') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.import_clients') !!}</h3>
</div>
<div class="panel-body">
{!! Former::file('file')->label(trans('texts.csv_file')) !!} {!! Former::file('file')->label(trans('texts.csv_file')) !!}
{!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!} {!! Former::actions( Button::info(trans('texts.upload'))->submit()->large()->appendIcon(Icon::create('open'))) !!}
</div>
</div>
{!! Former::close() !!} {!! Former::close() !!}
{!! Former::open('company/export')->addClass('col-md-9 col-md-offset-1') !!} {!! Former::open('company/export')->addClass('col-md-9 col-md-offset-1') !!}
{!! Former::legend('texts.export_clients') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.export_clients') !!}</h3>
</div>
<div class="panel-body">
{!! Former::actions( Button::primary(trans('texts.download'))->submit()->large()->appendIcon(Icon::create('download-alt'))) !!} {!! Former::actions( Button::primary(trans('texts.download'))->submit()->large()->appendIcon(Icon::create('download-alt'))) !!}
</div>
</div>
{!! Former::close() !!} {!! Former::close() !!}
<p>&nbsp;</p>
<p>&nbsp;</p>
{!! Former::open('company/cancel_account')->addClass('col-md-9 col-md-offset-1 cancel-account') !!} {!! Former::open('company/cancel_account')->addClass('col-md-9 col-md-offset-1 cancel-account') !!}
{!! Former::legend('cancel_account') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.cancel_account') !!}</h3>
</div>
<div class="panel-body">
{!! Former::actions( Button::danger(trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showConfirm()'])->appendIcon(Icon::create('trash'))) !!} {!! Former::actions( Button::danger(trans('texts.cancel_account'))->large()->withAttributes(['onclick' => 'showConfirm()'])->appendIcon(Icon::create('trash'))) !!}
</div>
</div>
<div class="modal fade" id="confirmCancelModal" tabindex="-1" role="dialog" aria-labelledby="confirmCancelModalLabel" aria-hidden="true"> <div class="modal fade" id="confirmCancelModal" tabindex="-1" role="dialog" aria-labelledby="confirmCancelModalLabel" aria-hidden="true">
<div class="modal-dialog" style="min-width:150px"> <div class="modal-dialog" style="min-width:150px">

View File

@ -66,7 +66,11 @@
{!! Former::populateField('hide_quantity', intval($account->hide_quantity)) !!} {!! Former::populateField('hide_quantity', intval($account->hide_quantity)) !!}
{!! Former::populateField('hide_paid_to_date', intval($account->hide_paid_to_date)) !!} {!! Former::populateField('hide_paid_to_date', intval($account->hide_paid_to_date)) !!}
{!! Former::legend('invoice_design') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.invoice_design') !!}</h3>
</div>
<div class="panel-body">
@if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS) @if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS)
@ -79,16 +83,20 @@
{!! Former::text('primary_color') !!} {!! Former::text('primary_color') !!}
{!! Former::text('secondary_color') !!} {!! Former::text('secondary_color') !!}
</div>
</div>
<p>&nbsp;</p> <div class="panel panel-default">
<p>&nbsp;</p> <div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.invoice_options') !!}</h3>
</div>
<div class="panel-body">
{!! Former::legend('invoice_options') !!}
{!! Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help')) !!} {!! Former::checkbox('hide_quantity')->text(trans('texts.hide_quantity_help')) !!}
{!! Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help')) !!} {!! Former::checkbox('hide_paid_to_date')->text(trans('texts.hide_paid_to_date_help')) !!}
</div>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())
{!! Former::actions( Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))) !!} {!! Former::actions( Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk'))) !!}

View File

@ -17,51 +17,95 @@
@parent @parent
@include('accounts.nav_advanced') @include('accounts.nav_advanced')
{!! Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') !!} {!! Former::open()->addClass('warn-on-exit') !!}
{!! Former::populate($account) !!} {!! Former::populate($account) !!}
{!! Former::populateField('custom_invoice_taxes1', intval($account->custom_invoice_taxes1)) !!} {!! Former::populateField('custom_invoice_taxes1', intval($account->custom_invoice_taxes1)) !!}
{!! Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) !!} {!! Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) !!}
{!! Former::populateField('share_counter', intval($account->share_counter)) !!} {!! Former::populateField('share_counter', intval($account->share_counter)) !!}
<div class="row">
<div class="col-md-6">
{!! Former::legend('invoice_fields') !!}
<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')) {!! Former::text('custom_invoice_label1')->label(trans('texts.field_label'))
->append(Former::checkbox('custom_invoice_taxes1')->raw() . trans('texts.charge_taxes')) !!} ->append(Former::checkbox('custom_invoice_taxes1')->raw() . trans('texts.charge_taxes')) !!}
{!! Former::text('custom_invoice_label2')->label(trans('texts.field_label')) {!! Former::text('custom_invoice_label2')->label(trans('texts.field_label'))
->append(Former::checkbox('custom_invoice_taxes2')->raw() . ' ' . trans('texts.charge_taxes')) !!} ->append(Former::checkbox('custom_invoice_taxes2')->raw() . ' ' . trans('texts.charge_taxes')) !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::legend('client_fields') !!} <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_label1')->label(trans('texts.field_label')) !!}
{!! Former::text('custom_client_label2')->label(trans('texts.field_label')) !!} {!! Former::text('custom_client_label2')->label(trans('texts.field_label')) !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::legend('company_fields') !!}
<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_label1')->label(trans('texts.field_label')) !!}
{!! Former::text('custom_value1')->label(trans('texts.field_value')) !!} {!! Former::text('custom_value1')->label(trans('texts.field_value')) !!}
<p>&nbsp;</p> <p>&nbsp;</p>
{!! Former::text('custom_label2')->label(trans('texts.field_label')) !!} {!! Former::text('custom_label2')->label(trans('texts.field_label')) !!}
{!! Former::text('custom_value2')->label(trans('texts.field_value')) !!} {!! Former::text('custom_value2')->label(trans('texts.field_value')) !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::legend('invoice_number') !!} </div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.invoice_number') !!}</h3>
</div>
<div class="panel-body">
{!! Former::text('invoice_number_prefix')->label(trans('texts.invoice_number_prefix')) !!} {!! Former::text('invoice_number_prefix')->label(trans('texts.invoice_number_prefix')) !!}
{!! Former::text('invoice_number_counter')->label(trans('texts.invoice_number_counter')) !!} {!! Former::text('invoice_number_counter')->label(trans('texts.invoice_number_counter')) !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::legend('quote_number') !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.quote_number') !!}</h3>
</div>
<div class="panel-body">
{!! Former::text('quote_number_prefix')->label(trans('texts.quote_number_prefix')) !!} {!! Former::text('quote_number_prefix')->label(trans('texts.quote_number_prefix')) !!}
{!! Former::text('quote_number_counter')->label(trans('texts.quote_number_counter')) {!! Former::text('quote_number_counter')->label(trans('texts.quote_number_counter'))
->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) !!} ->append(Former::checkbox('share_counter')->raw()->onclick('setQuoteNumberEnabled()') . ' ' . trans('texts.share_invoice_counter')) !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::legend('email_settings') !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.email_settings') !!}</h3>
</div>
<div class="panel-body">
{!! Former::checkbox('pdf_email_attachment') !!} {!! Former::checkbox('pdf_email_attachment') !!}
<p>&nbsp;</p> </div>
</div>
</div>
</div>
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())
{!! Former::actions( Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk'))) !!} <center>
{!! Button::success(trans('texts.save'))->large()->submit()->appendIcon(Icon::create('floppy-disk')) !!}
</center>
@else @else
<script> <script>
$(function() { $(function() {
$('form.warn-on-exit input').prop('disabled', true); $('form.warn-on-exit input').prop('disabled', true);

View File

@ -10,12 +10,20 @@
{{ Former::populateField('notify_paid', intval(Auth::user()->notify_paid)) }} {{ Former::populateField('notify_paid', intval(Auth::user()->notify_paid)) }}
{{ Former::populateField('notify_approved', intval(Auth::user()->notify_approved)) }} {{ Former::populateField('notify_approved', intval(Auth::user()->notify_approved)) }}
{!! Former::legend(trans('texts.email_notifications')) !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.email_notifications') !!}</h3>
</div>
<div class="panel-body">
{!! Former::checkbox('notify_sent')->label('&nbsp;')->text(trans('texts.email_sent')) !!} {!! Former::checkbox('notify_sent')->label('&nbsp;')->text(trans('texts.email_sent')) !!}
{!! Former::checkbox('notify_viewed')->label('&nbsp;')->text(trans('texts.email_viewed')) !!} {!! Former::checkbox('notify_viewed')->label('&nbsp;')->text(trans('texts.email_viewed')) !!}
{!! Former::checkbox('notify_paid')->label('&nbsp;')->text(trans('texts.email_paid')) !!} {!! Former::checkbox('notify_paid')->label('&nbsp;')->text(trans('texts.email_paid')) !!}
{!! Former::checkbox('notify_approved')->label('&nbsp;')->text(trans('texts.email_approved')) !!} {!! Former::checkbox('notify_approved')->label('&nbsp;')->text(trans('texts.email_approved')) !!}
</div>
</div>
<!--
{!! Former::legend(trans('texts.site_updates')) !!} {!! Former::legend(trans('texts.site_updates')) !!}
<div class="form-group"> <div class="form-group">
@ -37,13 +45,21 @@
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div></div> </div></div>
-->
{!! Former::legend(trans('texts.custom_messages')) !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.custom_messages') !!}</h3>
</div>
<div class="panel-body">
{!! Former::textarea('invoice_terms')->label(trans('texts.default_invoice_terms')) {!! Former::textarea('invoice_terms')->label(trans('texts.default_invoice_terms'))
->onchange("$('#invoice_terms').val(wordWrapText($('#invoice_terms').val(), 300))") !!} ->onchange("$('#invoice_terms').val(wordWrapText($('#invoice_terms').val(), 300))") !!}
{!! Former::textarea('invoice_footer')->label(trans('texts.default_invoice_footer')) {!! Former::textarea('invoice_footer')->label(trans('texts.default_invoice_footer'))
->onchange("$('#invoice_footer').val(wordWrapText($('#invoice_footer').val(), 600))") !!} ->onchange("$('#invoice_footer').val(wordWrapText($('#invoice_footer').val(), 600))") !!}
{!! Former::textarea('email_footer')->label(trans('texts.default_email_footer')) !!} {!! Former::textarea('email_footer')->label(trans('texts.default_email_footer')) !!}
</div>
</div>
{!! Former::actions( {!! Former::actions(
Button::success(trans('texts.save')) Button::success(trans('texts.save'))

View File

@ -10,6 +10,9 @@
{!! Former::legend($title) !!} {!! Former::legend($title) !!}
<div class="panel panel-default">
<div class="panel-body">
@if ($product) @if ($product)
{{ Former::populate($product) }} {{ Former::populate($product) }}
{{ Former::populateField('cost', number_format($product->cost, 2, '.', '')) }} {{ Former::populateField('cost', number_format($product->cost, 2, '.', '')) }}
@ -19,6 +22,9 @@
{!! Former::textarea('notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") !!} {!! Former::textarea('notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('cost') !!} {!! Former::text('cost') !!}
</div>
</div>
{!! Former::actions( {!! Former::actions(
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')), Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),
Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/products')->appendIcon(Icon::create('remove-circle')) Button::normal(trans('texts.cancel'))->large()->asLinkTo('/company/products')->appendIcon(Icon::create('remove-circle'))

View File

@ -3,17 +3,22 @@
@section('content') @section('content')
@parent @parent
{!! Former::open()->addClass('col-md-10 col-md-offset-1 warn-on-exit') !!} {!! Former::open()->addClass('warn-on-exit') !!}
{{ Former::populateField('fill_products', intval($account->fill_products)) }} {{ Former::populateField('fill_products', intval($account->fill_products)) }}
{{ Former::populateField('update_products', intval($account->update_products)) }} {{ Former::populateField('update_products', intval($account->update_products)) }}
{!! Former::legend(trans('texts.product_library')) !!} {!! Former::legend(trans('texts.product_library')) !!}
<div class="panel panel-default">
<div class="panel-body">
{!! Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) !!} {!! Former::checkbox('fill_products')->text(trans('texts.fill_products_help')) !!}
{!! Former::checkbox('update_products')->text(trans('texts.update_products_help')) !!} {!! Former::checkbox('update_products')->text(trans('texts.update_products_help')) !!}
&nbsp; &nbsp;
{!! Former::actions( Button::success(trans('texts.save'))->submit()->appendIcon(Icon::create('floppy-disk')) ) !!} {!! Former::actions( Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) ) !!}
{!! Former::close() !!} {!! Former::close() !!}
</div>
</div>
{!! Button::success(trans('texts.create_product')) {!! Button::success(trans('texts.create_product'))
->asLinkTo('/products/create') ->asLinkTo('/products/create')

View File

@ -10,7 +10,8 @@
{!! Former::legend($title) !!} {!! Former::legend($title) !!}
<p>&nbsp;</p> <div class="panel panel-default">
<div class="panel-body">
@if ($token) @if ($token)
{!! Former::populate($token) !!} {!! Former::populate($token) !!}
@ -18,7 +19,8 @@
{!! Former::text('name') !!} {!! Former::text('name') !!}
<p>&nbsp;</p> </div>
</div>
{!! Former::actions( {!! Former::actions(
Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')), Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')),

View File

@ -18,7 +18,12 @@
<div class="col-md-6"> <div class="col-md-6">
{!! Former::legend('organization') !!} <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.organization') !!}</h3>
</div>
<div class="panel-body">
{!! Former::text('name')->data_bind("attr { placeholder: placeholderName }") !!} {!! Former::text('name')->data_bind("attr { placeholder: placeholderName }") !!}
{!! Former::text('id_number') !!} {!! Former::text('id_number') !!}
{!! Former::text('vat_number') !!} {!! Former::text('vat_number') !!}
@ -33,8 +38,15 @@
{!! Former::text('custom_value2')->label($customLabel2) !!} {!! Former::text('custom_value2')->label($customLabel2) !!}
@endif @endif
@endif @endif
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.address') !!}</h3>
</div>
<div class="panel-body">
{!! Former::legend('address') !!}
{!! Former::text('address1') !!} {!! Former::text('address1') !!}
{!! Former::text('address2') !!} {!! Former::text('address2') !!}
{!! Former::text('city') !!} {!! Former::text('city') !!}
@ -43,11 +55,18 @@
{!! Former::select('country_id')->addOption('','') {!! Former::select('country_id')->addOption('','')
->fromQuery($countries, 'name', 'id') !!} ->fromQuery($countries, 'name', 'id') !!}
</div>
</div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{!! Former::legend('contacts') !!}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.contacts') !!}</h3>
</div>
<div class="panel-body">
<div data-bind='template: { foreach: contacts, <div data-bind='template: { foreach: contacts,
beforeRemove: hideContact, beforeRemove: hideContact,
afterAdd: showContact }'> afterAdd: showContact }'>
@ -68,18 +87,27 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.additional_info') !!}</h3>
</div>
<div class="panel-body">
{!! Former::legend('additional_info') !!}
{!! Former::select('payment_terms')->addOption('','')
->fromQuery($paymentTerms, 'name', 'num_days') !!}
{!! Former::select('currency_id')->addOption('','') {!! Former::select('currency_id')->addOption('','')
->fromQuery($currencies, 'name', 'id') !!} ->fromQuery($currencies, 'name', 'id') !!}
{!! Former::select('payment_terms')->addOption('','')
->fromQuery($paymentTerms, 'name', 'num_days') !!}
{!! Former::select('size_id')->addOption('','') {!! Former::select('size_id')->addOption('','')
->fromQuery($sizes, 'name', 'id') !!} ->fromQuery($sizes, 'name', 'id') !!}
{!! Former::select('industry_id')->addOption('','') {!! Former::select('industry_id')->addOption('','')
->fromQuery($industries, 'name', 'id') !!} ->fromQuery($industries, 'name', 'id') !!}
{!! Former::textarea('private_notes') !!} {!! Former::textarea('private_notes') !!}
</div>
</div>
</div> </div>
</div> </div>

View File

@ -14,7 +14,10 @@
)) !!} )) !!}
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-body">
{!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!} {!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!}
{!! Former::text('amount') !!} {!! Former::text('amount') !!}
@ -22,10 +25,12 @@
{!! Former::textarea('private_notes') !!} {!! Former::textarea('private_notes') !!}
</div> </div>
<div class="col-md-6"> </div>
</div> </div>
</div> </div>
<center class="buttons"> <center class="buttons">
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!} {!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/credits')->appendIcon(Icon::create('remove-circle')) !!} {!! Button::normal(trans('texts.cancel'))->large()->asLinkTo('/credits')->appendIcon(Icon::create('remove-circle')) !!}

View File

@ -113,7 +113,8 @@
<form class="navbar-form navbar-right" role="search"> <form class="navbar-form navbar-right" role="search">
<div class="form-group"> <div class="form-group">
<input type="text" id="search" class="form-control" placeholder="{{ trans('texts.search') }}"> <input type="text" id="search" style="width: 160px"
class="form-control" placeholder="{{ trans('texts.search') }}">
</div> </div>
</form> </form>

View File

@ -30,9 +30,13 @@
'product_key' => 'max:20' 'product_key' => 'max:20'
)) !!} )) !!}
<input type="submit" style="display:none" name="submitButton" id="submitButton"> <input type="submit" style="display:none" name="submitButton" id="submitButton">
<div data-bind="with: invoice"> <div data-bind="with: invoice">
<div class="panel panel-default">
<div class="panel-body">
<div class="row" style="min-height:195px" onkeypress="formEnterClick(event)"> <div class="row" style="min-height:195px" onkeypress="formEnterClick(event)">
<div class="col-md-4" id="col_1"> <div class="col-md-4" id="col_1">
@ -175,7 +179,7 @@
<tfoot> <tfoot>
<tr> <tr>
<td class="hide-border"/> <td class="hide-border"/>
<td colspan="2" rowspan="6" style="vertical-align:top"> <td class="hide-border" colspan="2" rowspan="6" style="vertical-align:top">
<br/> <br/>
<div role="tabpanel"> <div role="tabpanel">
@ -275,15 +279,17 @@
<tr> <tr>
<td class="hide-border" colspan="3"/> <td class="hide-border" colspan="3"/>
<td style="display:none" data-bind="visible: $root.invoice_item_taxes.show"/> <td class="hide-border" style="display:none" data-bind="visible: $root.invoice_item_taxes.show"/>
<td colspan="{{ $account->hide_quantity ? 1 : 2 }}"><b>{{ trans($entityType == ENTITY_INVOICE ? 'texts.balance_due' : 'texts.total') }}</b></td> <td class="hide-border" colspan="{{ $account->hide_quantity ? 1 : 2 }}"><b>{{ trans($entityType == ENTITY_INVOICE ? 'texts.balance_due' : 'texts.total') }}</b></td>
<td style="text-align: right"><span data-bind="text: totals.total"></span></td> <td class="hide-border" style="text-align: right"><span data-bind="text: totals.total"></span></td>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</div>
</div>
</div> </div>
<p>&nbsp;</p> <p>&nbsp;</p>
@ -302,9 +308,9 @@
@if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS) @if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS)
{!! Former::select('invoice_design_id')->style('display:inline;width:150px')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id")->addOption(trans('texts.more_designs') . '...', '-1') !!} {!! Former::select('invoice_design_id')->style('display:inline;width:150px;background-color:white !important')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id")->addOption(trans('texts.more_designs') . '...', '-1') !!}
@else @else
{!! Former::select('invoice_design_id')->style('display:inline;width:150px')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") !!} {!! Former::select('invoice_design_id')->style('display:inline;width:150px;background-color:white !important')->raw()->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") !!}
@endif @endif
{!! Button::primary(trans('texts.download_pdf'))->withAttributes(array('onclick' => 'onDownloadClick()'))->appendIcon(Icon::create('download-alt')) !!} {!! Button::primary(trans('texts.download_pdf'))->withAttributes(array('onclick' => 'onDownloadClick()'))->appendIcon(Icon::create('download-alt')) !!}
@ -372,19 +378,22 @@
@endif @endif
<div class="modal fade" id="clientModal" tabindex="-1" role="dialog" aria-labelledby="clientModalLabel" aria-hidden="true"> <div class="modal fade" id="clientModal" tabindex="-1" role="dialog" aria-labelledby="clientModalLabel" aria-hidden="true">
<div class="modal-dialog large-dialog"> <div class="modal-dialog" data-bind="css: {'large-dialog': $root.showMore}">
<div class="modal-content"> <div class="modal-content" style="background-color: #f8f8f8">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="clientModalLabel">{{ trans('texts.client') }}</h4> <h4 class="modal-title" id="clientModalLabel">{{ trans('texts.client') }}</h4>
</div> </div>
<div class="container" style="width: 100%"> <div class="container" style="width: 100%; padding-bottom: 0px !important">
<div style="background-color: #fff" class="row" data-bind="with: client" onkeypress="clientModalEnterClick(event)"> <div class="panel panel-default">
<div class="col-md-6" style="margin-left:0px;margin-right:0px" > <div class="panel-body">
{!! Former::legend('organization') !!} <div class="row" data-bind="with: client" onkeypress="clientModalEnterClick(event)">
{!! Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }") !!} <div style="margin-left:0px;margin-right:0px" data-bind="css: {'col-md-6': $root.showMore}">
{!! Former::text('name')->data_bind("value: name, valueUpdate: 'afterkeydown', attr { placeholder: name.placeholder }")->label('client_name') !!}
<span data-bind="visible: $root.showMore">
{!! Former::text('id_number')->data_bind("value: id_number, valueUpdate: 'afterkeydown'") !!} {!! Former::text('id_number')->data_bind("value: id_number, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") !!} {!! Former::text('vat_number')->data_bind("value: vat_number, valueUpdate: 'afterkeydown'") !!}
@ -402,7 +411,8 @@
@endif @endif
@endif @endif
{!! Former::legend('address') !!} &nbsp;
{!! Former::text('address1')->data_bind("value: address1, valueUpdate: 'afterkeydown'") !!} {!! Former::text('address1')->data_bind("value: address1, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('address2')->data_bind("value: address2, valueUpdate: 'afterkeydown'") !!} {!! Former::text('address2')->data_bind("value: address2, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('city')->data_bind("value: city, valueUpdate: 'afterkeydown'") !!} {!! Former::text('city')->data_bind("value: city, valueUpdate: 'afterkeydown'") !!}
@ -410,12 +420,11 @@
{!! Former::text('postal_code')->data_bind("value: postal_code, valueUpdate: 'afterkeydown'") !!} {!! Former::text('postal_code')->data_bind("value: postal_code, valueUpdate: 'afterkeydown'") !!}
{!! Former::select('country_id')->addOption('','')->addGroupClass('country_select') {!! Former::select('country_id')->addOption('','')->addGroupClass('country_select')
->fromQuery($countries, 'name', 'id')->data_bind("dropdown: country_id") !!} ->fromQuery($countries, 'name', 'id')->data_bind("dropdown: country_id") !!}
</span>
</div> </div>
<div class="col-md-6" style="margin-left:0px;margin-right:0px" > <div style="margin-left:0px;margin-right:0px" data-bind="css: {'col-md-6': $root.showMore}">
{!! Former::legend('contacts') !!}
<div data-bind='template: { foreach: contacts, <div data-bind='template: { foreach: contacts,
beforeRemove: hideContact, beforeRemove: hideContact,
afterAdd: showContact }'> afterAdd: showContact }'>
@ -424,7 +433,6 @@
{!! Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") !!} {!! Former::text('last_name')->data_bind("value: last_name, valueUpdate: 'afterkeydown'") !!}
{!! Former::text('email')->data_bind('value: email, valueUpdate: \'afterkeydown\', attr: {id:\'email\'+$index()}') !!} {!! Former::text('email')->data_bind('value: email, valueUpdate: \'afterkeydown\', attr: {id:\'email\'+$index()}') !!}
{!! Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") !!} {!! Former::text('phone')->data_bind("value: phone, valueUpdate: 'afterkeydown'") !!}
<div class="form-group"> <div class="form-group">
<div class="col-lg-8 col-lg-offset-4"> <div class="col-lg-8 col-lg-offset-4">
<span class="redlink bold" data-bind="visible: $parent.contacts().length > 1"> <span class="redlink bold" data-bind="visible: $parent.contacts().length > 1">
@ -437,25 +445,32 @@
</div> </div>
</div> </div>
{!! Former::legend('additional_info') !!} <span data-bind="visible: $root.showMore">
{!! Former::select('payment_terms')->addOption('','0')->data_bind('value: payment_terms') &nbsp;
->fromQuery($paymentTerms, 'name', 'num_days') !!} </span>
{!! Former::select('currency_id')->addOption('','')->data_bind('value: currency_id') {!! Former::select('currency_id')->addOption('','')->data_bind('value: currency_id')
->fromQuery($currencies, 'name', 'id') !!} ->fromQuery($currencies, 'name', 'id') !!}
<span data-bind="visible: $root.showMore">
{!! Former::select('payment_terms')->addOption('','0')->data_bind('value: payment_terms')
->fromQuery($paymentTerms, 'name', 'num_days') !!}
{!! Former::select('size_id')->addOption('','')->data_bind('value: size_id') {!! Former::select('size_id')->addOption('','')->data_bind('value: size_id')
->fromQuery($sizes, 'name', 'id') !!} ->fromQuery($sizes, 'name', 'id') !!}
{!! Former::select('industry_id')->addOption('','')->data_bind('value: industry_id') {!! Former::select('industry_id')->addOption('','')->data_bind('value: industry_id')
->fromQuery($industries, 'name', 'id') !!} ->fromQuery($industries, 'name', 'id') !!}
{!! Former::textarea('private_notes')->data_bind('value: private_notes') !!} {!! Former::textarea('private_notes')->data_bind('value: private_notes') !!}
</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer" style="margin-top: 0px"> <div class="modal-footer" style="margin-top: 0px; padding-top:0px;">
<span class="error-block" id="emailError" style="display:none;float:left;font-weight:bold">{{ trans('texts.provide_email') }}</span><span>&nbsp;</span> <span class="error-block" id="emailError" style="display:none;float:left;font-weight:bold">{{ trans('texts.provide_email') }}</span><span>&nbsp;</span>
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button> <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
<button type="button" class="btn btn-default" data-bind="click: $root.showMoreFields, text: $root.showMore() ? '{{ trans('texts.less_fields') }}' : '{{ trans('texts.more_fields') }}'"></button>
<button id="clientDoneButton" type="button" class="btn btn-primary" data-bind="click: $root.clientFormComplete">{{ trans('texts.done') }}</button> <button id="clientDoneButton" type="button" class="btn btn-primary" data-bind="click: $root.clientFormComplete">{{ trans('texts.done') }}</button>
</div> </div>
@ -538,7 +553,6 @@
{!! Former::close() !!} {!! Former::close() !!}
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
@ -857,6 +871,7 @@
function ViewModel(data) { function ViewModel(data) {
var self = this; var self = this;
self.showMore = ko.observable(false);
//self.invoice = data ? false : new InvoiceModel(); //self.invoice = data ? false : new InvoiceModel();
self.invoice = ko.observable(data ? false : new InvoiceModel()); self.invoice = ko.observable(data ? false : new InvoiceModel());
self.tax_rates = ko.observableArray(); self.tax_rates = ko.observableArray();
@ -866,6 +881,10 @@
self.setDueDate(); self.setDueDate();
} }
self.showMoreFields = function() {
self.showMore(!self.showMore());
}
self.setDueDate = function() { self.setDueDate = function() {
var paymentTerms = parseInt(self.invoice().client().payment_terms()); var paymentTerms = parseInt(self.invoice().client().payment_terms());
if (paymentTerms && !self.invoice().due_date()) if (paymentTerms && !self.invoice().due_date())

View File

@ -21,7 +21,7 @@
<div id="top_right_buttons" class="pull-right"> <div id="top_right_buttons" class="pull-right">
<input id="tableFilter" type="text" style="width:140px;margin-right:17px" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/> <input id="tableFilter" type="text" style="width:140px;margin-right:17px" class="form-control pull-left" placeholder="{{ trans('texts.filter') }}"/>
{!! Button::normal(trans("texts.new_$entityType"))->asLinkTo("/{$entityType}s/create")->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!} {!! Button::primary(trans("texts.new_$entityType"))->asLinkTo("/{$entityType}s/create")->withAttributes(array('class' => 'pull-right'))->appendIcon(Icon::create('plus-sign')) !!}
</div> </div>

View File

@ -18,8 +18,12 @@
{!! Former::populate($payment) !!} {!! Former::populate($payment) !!}
@endif @endif
<div class="row"> <div class="row">
<div class="col-md-8"> <div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-body">
@if (!$payment) @if (!$payment)
{!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!} {!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!}
@ -33,11 +37,12 @@
{!! Former::text('transaction_reference') !!} {!! Former::text('transaction_reference') !!}
</div> </div>
<div class="col-md-6"> </div>
</div> </div>
</div> </div>
<center class="buttons"> <center class="buttons">
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!} {!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo('/payments')->large() !!} {!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo('/payments')->large() !!}

View File

@ -22,6 +22,9 @@
<div class="col-lg-4"> <div class="col-lg-4">
{!! Former::open()->addClass('warn-on-exit') !!} {!! Former::open()->addClass('warn-on-exit') !!}
<div class="panel panel-default">
<div class="panel-body">
{!! Former::populateField('start_date', $startDate) !!} {!! Former::populateField('start_date', $startDate) !!}
{!! Former::populateField('end_date', $endDate) !!} {!! Former::populateField('end_date', $endDate) !!}
{!! Former::select('chart_type')->options($chartTypes, $chartType) !!} {!! Former::select('chart_type')->options($chartTypes, $chartType) !!}
@ -30,6 +33,8 @@
->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'start_date\')"></i>') !!} ->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'start_date\')"></i>') !!}
{!! Former::text('end_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) {!! Former::text('end_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))
->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'end_date\')"></i>') !!} ->append('<i class="glyphicon glyphicon-calendar" onclick="toggleDatePicker(\'end_date\')"></i>') !!}
</div>
</div>
@if (Auth::user()->isPro()) @if (Auth::user()->isPro())
{!! Former::actions( Button::primary('Generate')->submit() ) !!} {!! Former::actions( Button::primary('Generate')->submit() ) !!}

View File

@ -16,10 +16,16 @@
{!! Former::populate($user) !!} {!! Former::populate($user) !!}
@endif @endif
<div class="panel panel-default">
<div class="panel-body">
{!! Former::text('first_name') !!} {!! Former::text('first_name') !!}
{!! Former::text('last_name') !!} {!! Former::text('last_name') !!}
{!! Former::text('email') !!} {!! Former::text('email') !!}
</div>
</div>
{!! Former::actions( {!! Former::actions(
Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')), Button::success(trans($user && $user->confirmed ? 'texts.save' : 'texts.send_invite'))->submit()->large()->appendIcon(Icon::create($user && $user->confirmed ? 'floppy-disk' : 'send')),
Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/user_management')->appendIcon(Icon::create('remove-circle'))->large() Button::normal(trans('texts.cancel'))->asLinkTo('/company/advanced_settings/user_management')->appendIcon(Icon::create('remove-circle'))->large()