mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Show empty string if country is not set:
- Replace "No country set" with empty string in HtmlEngine.php - Allow country_id & shipping_country_id to be null in shipping-address.blade.php & personal-address.blade.php
This commit is contained in:
parent
5cd1acd484
commit
b0c383f75b
@ -53,6 +53,10 @@ class PersonalAddress extends Component
|
||||
{
|
||||
$data = $this->validate($this->rules);
|
||||
|
||||
if ($data['country_id'] == 'none') {
|
||||
$data['country_id'] = null;
|
||||
}
|
||||
|
||||
$this->profile
|
||||
->fill($data)
|
||||
->save();
|
||||
|
@ -53,6 +53,10 @@ class ShippingAddress extends Component
|
||||
{
|
||||
$data = $this->validate($this->rules);
|
||||
|
||||
if ($data['shipping_country_id'] == 'none') {
|
||||
$data['shipping_country_id'] = null;
|
||||
}
|
||||
|
||||
$this->profile
|
||||
->fill($data)
|
||||
->save();
|
||||
|
@ -217,7 +217,7 @@ class HtmlEngine
|
||||
$data['$vat_number'] = ['value' => $this->client->vat_number ?: ' ', 'label' => ctrans('texts.vat_number')];
|
||||
$data['$website'] = ['value' => $this->client->present()->website() ?: ' ', 'label' => ctrans('texts.website')];
|
||||
$data['$phone'] = ['value' => $this->client->present()->phone() ?: ' ', 'label' => ctrans('texts.phone')];
|
||||
$data['$country'] = ['value' => isset($this->client->country->name) ? $this->client->country->name : 'No Country Set', 'label' => ctrans('texts.country')];
|
||||
$data['$country'] = ['value' => isset($this->client->country->name) ? $this->client->country->name : '', 'label' => ctrans('texts.country')];
|
||||
$data['$email'] = ['value' => isset($this->contact) ? $this->contact->email : 'no contact email on record', 'label' => ctrans('texts.email')];
|
||||
$data['$client_name'] = ['value' => $this->entity->present()->clientName() ?: ' ', 'label' => ctrans('texts.client_name')];
|
||||
$data['$client.name'] = &$data['$client_name'];
|
||||
|
@ -61,6 +61,7 @@
|
||||
<div class="col-span-6 sm:col-span-2">
|
||||
<label for="country" class="input-label">@lang('texts.country')</label>
|
||||
<select id="country" class="input w-full form-select" wire:model.defer="country_id">
|
||||
<option value="none"></option>
|
||||
@foreach($countries as $country)
|
||||
<option value="{{ $country->id }}">
|
||||
{{ $country->iso_3166_2 }} ({{ $country->name }})
|
||||
|
@ -61,7 +61,8 @@
|
||||
</div>
|
||||
<div class="col-span-4 sm:col-span-2">
|
||||
<label for="shipping_country" class="input-label">@lang('texts.shipping_country')</label>
|
||||
<select id="shippking_country" class="input w-full form-select" wire:model.defer="shipping_country_id">
|
||||
<select id="shipping_country" class="input w-full form-select" wire:model.defer="shipping_country_id">
|
||||
<option value="none"></option>
|
||||
@foreach($countries as $country)
|
||||
<option value="{{ $country->id }}">
|
||||
{{ $country->iso_3166_2 }} ({{ $country->name }})
|
||||
|
Loading…
Reference in New Issue
Block a user