1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Change custom fields to textareas

This commit is contained in:
Hillel Coren 2018-04-05 13:12:03 +03:00
parent 9c12e17c9e
commit 34fb338b3f
8 changed files with 47 additions and 19 deletions

View File

@ -73,24 +73,50 @@ class AddMoreCustomFields extends Migration
});
Schema::table('tasks', function ($table) {
$table->string('custom_value1')->nullable();
$table->string('custom_value2')->nullable();
$table->text('custom_value1')->nullable();
$table->text('custom_value2')->nullable();
});
Schema::table('projects', function ($table) {
$table->string('custom_value1')->nullable();
$table->string('custom_value2')->nullable();
$table->text('custom_value1')->nullable();
$table->text('custom_value2')->nullable();
});
Schema::table('expenses', function ($table) {
$table->string('custom_value1')->nullable();
$table->string('custom_value2')->nullable();
$table->text('custom_value1')->nullable();
$table->text('custom_value2')->nullable();
});
Schema::table('vendors', function ($table) {
$table->string('custom_value1')->nullable();
$table->string('custom_value2')->nullable();
$table->text('custom_value1')->nullable();
$table->text('custom_value2')->nullable();
});
Schema::table('products', function ($table) {
$table->text('custom_value1')->nullable()->change();
$table->text('custom_value2')->nullable()->change();
});
Schema::table('clients', function ($table) {
$table->text('custom_value1')->nullable()->change();
$table->text('custom_value2')->nullable()->change();
});
Schema::table('contacts', function ($table) {
$table->text('custom_value1')->nullable()->change();
$table->text('custom_value2')->nullable()->change();
});
Schema::table('invoices', function ($table) {
$table->text('custom_text_value1')->nullable()->change();
$table->text('custom_text_value2')->nullable()->change();
});
Schema::table('invoice_items', function ($table) {
$table->text('custom_value1')->nullable()->change();
$table->text('custom_value2')->nullable()->change();
});
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -670,7 +670,7 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
'product.discount',
];
if (isSecondTable) {
if (isSecondTable && invoice.hasStandard) {
styles.push('secondTableHeader');
}

View File

@ -101,10 +101,10 @@
@endif
@if ($client->account->customLabel('client1') && $client->custom_value1)
{{ $client->account->present()->customLabel('client1') . ': ' . $client->custom_value1 }}<br/>
{{ $client->account->present()->customLabel('client1') . ': ' }} {!! nl2br(e($client->custom_value1)) !!}<br/>
@endif
@if ($client->account->customLabel('client2') && $client->custom_value2)
{{ $client->account->present()->customLabel('client2') . ': ' . $client->custom_value2 }}<br/>
{{ $client->account->present()->customLabel('client2') . ': ' }} {!! nl2br(e($client->custom_value2)) !!}<br/>
@endif
@if ($client->work_phone)

View File

@ -6,7 +6,8 @@
->options(Utils::getCustomValues($label))
->data_bind(empty($databind) ? '' : $databind) !!}
@else
{!! Former::text($field)
{!! Former::textarea($field)
->rows(1)
->label(e($label))
->data_bind(empty($databind) ? '' : $databind) !!}
@endif
@ -20,7 +21,8 @@
->addClass('form-control invoice-item')
->raw() !!}
@else
{!! Former::text($field)
{!! Former::textarea($field)
->rows(1)
->label(e($label))
->data_bind(empty($databind) ? '' : $databind)
->addClass('form-control invoice-item')

View File

@ -73,10 +73,10 @@
@endif
@if ($account->customLabel('project1') && $project->custom_value1)
{{ $account->present()->customLabel('project1') . ': ' . $project->custom_value1 }}<br/>
{{ $account->present()->customLabel('project1') . ': ' }} {!! nl2br(e($project->custom_value1)) !!}<br/>
@endif
@if ($account->customLabel('project2') && $project->custom_value2)
{{ $account->present()->customLabel('project2') . ': ' . $project->custom_value2 }}<br/>
{{ $account->present()->customLabel('project2') . ': ' }} {!! nl2br(e($project->custom_value2)) !!}<br/>
@endif
</div>

View File

@ -89,10 +89,10 @@
@endif
@if ($vendor->account->customLabel('vendor1') && $vendor->custom_value1)
{{ $vendor->account->present()->customLabel('vendor1') . ': ' . $vendor->custom_value1 }}<br/>
{{ $vendor->account->present()->customLabel('vendor1') . ': ' }} {!! nl2br(e($vendor->custom_value1)) !!}<br/>
@endif
@if ($vendor->account->customLabel('vendor2') && $vendor->custom_value2)
{{ $vendor->account->present()->customLabel('vendor2') . ': ' . $vendor->custom_value2 }}<br/>
{{ $vendor->account->present()->customLabel('vendor2') . ': ' }} {!! nl2br(e($vendor->custom_value2)) !!}<br/>
@endif