Skip to content

Commit

Permalink
close #2940 Fixed: If setting use select element clearable, While It …
Browse files Browse the repository at this point in the history
…broken date and default values
  • Loading branch information
cuneytsenturk committed Mar 16, 2023
1 parent 497d366 commit 2101a5d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
12 changes: 6 additions & 6 deletions resources/views/settings/default/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<x-form.group.currency name="currency" not-required />

<x-form.group.select name="tax" label="{{ trans_choice('general.taxes', 1) }}" :options="$taxes" :selected="setting('default.tax')" not-required />
<x-form.group.select name="tax" label="{{ trans_choice('general.taxes', 1) }}" :options="$taxes" :selected="setting('default.tax')" :clearable="'false'" not-required />

<x-form.group.payment-method not-required />
<x-form.group.payment-method :clearable="'false'" not-required />
</x-slot>
</x-form.section>

Expand All @@ -26,9 +26,9 @@
</x-slot>

<x-slot name="body">
<x-form.group.select remote name="income_category" label="{{ trans('settings.default.income_category') }}" :options="$sales_categories" :selected="setting('default.income_category')" remote_action="{{ route('categories.index'). '?search=type:income enabled:1' }}" sort-options="false" />
<x-form.group.select remote name="income_category" label="{{ trans('settings.default.income_category') }}" :options="$sales_categories" :clearable="'false'" :selected="setting('default.income_category')" remote_action="{{ route('categories.index'). '?search=type:income enabled:1' }}" sort-options="false" />

<x-form.group.select remote name="expense_category" label="{{ trans('settings.default.expense_category') }}" :options="$purchases_categories" :selected="setting('default.expense_category')" remote_action="{{ route('categories.index'). '?search=type:expense enabled:1' }}" sort-options="false" />
<x-form.group.select remote name="expense_category" label="{{ trans('settings.default.expense_category') }}" :options="$purchases_categories" :clearable="'false'" :selected="setting('default.expense_category')" remote_action="{{ route('categories.index'). '?search=type:expense enabled:1' }}" sort-options="false" />
</x-slot>
</x-form.section>

Expand All @@ -38,9 +38,9 @@
</x-slot>

<x-slot name="body">
<x-form.group.locale not-required />
<x-form.group.locale :clearable="'false'" not-required />

<x-form.group.select name="list_limit" label="{{ trans('settings.default.list_limit') }}" :options="['10' => '10', '25' => '25', '50' => '50', '100' => '100']" :selected="setting('default.list_limit')" not-required />
<x-form.group.select name="list_limit" label="{{ trans('settings.default.list_limit') }}" :options="['10' => '10', '25' => '25', '50' => '50', '100' => '100']" :clearable="'false'" :selected="setting('default.list_limit')" not-required />
</x-slot>
</x-form.section>

Expand Down
7 changes: 5 additions & 2 deletions resources/views/settings/invoice/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<x-slot name="body">
<x-form.group.text name="number_prefix" label="{{ trans('settings.invoice.prefix') }}" value="{{ setting('invoice.number_prefix') }}" not-required />

<x-form.group.number_digit not-required />
<x-form.group.number_digit :clearable="'false'" not-required />

<x-form.group.text name="number_next" label="{{ trans('settings.invoice.next') }}" value="{{ setting('invoice.number_next') }}" not-required />

<x-form.group.select name="payment_terms" label="{{ trans('settings.invoice.payment_terms') }}" :options="$payment_terms" :selected="setting('invoice.payment_terms')" not-required />
<x-form.group.select name="payment_terms" label="{{ trans('settings.invoice.payment_terms') }}" :options="$payment_terms" :clearable="'false'" :selected="setting('invoice.payment_terms')" not-required />
</x-slot>
</x-form.section>

Expand Down Expand Up @@ -98,6 +98,7 @@
name="item_name"
label="{{ trans('settings.invoice.item_name') }}"
:options="$item_names"
:clearable="'false'"
:selected="setting('invoice.item_name')"
change="settingsInvoice"
input-name="item_name_input"
Expand All @@ -109,6 +110,7 @@
name="price_name"
label="{{ trans('settings.invoice.price_name') }}"
:options="$price_names"
:clearable="'false'"
:selected="setting('invoice.price_name')"
change="settingsInvoice"
input-name="price_name_input"
Expand All @@ -120,6 +122,7 @@
name="quantity_name"
label="{{ trans('settings.invoice.quantity_name') }}"
:options="$quantity_names"
:clearable="'false'"
:selected="setting('invoice.quantity_name')"
change="settingsInvoice"
input-name="quantity_name_input"
Expand Down
12 changes: 6 additions & 6 deletions resources/views/settings/localisation/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<x-slot name="body">
<x-form.group.date name="financial_start" label="{{ trans('settings.localisation.financial_start') }}" icon="calendar_today" value="{{ setting('localisation.financial_start') }}" show-date-format="j F" date-format="d-m" autocomplete="off" hidden_year />

<x-form.group.select name="financial_denote" label="{{ trans('settings.localisation.financial_denote.title') }}" :options="$financial_denote_options" :selected="setting('localisation.financial_denote')" not-required />
<x-form.group.select name="financial_denote" label="{{ trans('settings.localisation.financial_denote.title') }}" :options="$financial_denote_options" :clearable="'false'" :selected="setting('localisation.financial_denote')" not-required />
</x-slot>
</x-form.section>

Expand All @@ -22,9 +22,9 @@
</x-slot>

<x-slot name="body">
<x-form.group.select name="date_format" label="{{ trans('settings.localisation.date.format') }}" :options="$date_formats" :selected="setting('localisation.date_format')" autocomplete="off" />
<x-form.group.select name="date_format" label="{{ trans('settings.localisation.date.format') }}" :options="$date_formats" :clearable="'false'" :selected="setting('localisation.date_format')" autocomplete="off" />

<x-form.group.select name="date_separator" label="{{ trans('settings.localisation.date.separator') }}" :options="$date_separators" :selected="setting('localisation.date_separator')" />
<x-form.group.select name="date_separator" label="{{ trans('settings.localisation.date.separator') }}" :options="$date_separators" :clearable="'false'" :selected="setting('localisation.date_separator')" />
</x-slot>
</x-form.section>

Expand All @@ -34,11 +34,11 @@
</x-slot>

<x-slot name="body">
<x-form.group.select group name="timezone" label="{{ trans('settings.localisation.timezone') }}" :options="$timezones" :selected="setting('localisation.timezone')" />
<x-form.group.select group name="timezone" label="{{ trans('settings.localisation.timezone') }}" :options="$timezones" :clearable="'false'" :selected="setting('localisation.timezone')" />

<x-form.group.select name="percent_position" label="{{ trans('settings.localisation.percent.title') }}" :options="$percent_positions" :selected="setting('localisation.percent_position')" not-required />
<x-form.group.select name="percent_position" label="{{ trans('settings.localisation.percent.title') }}" :options="$percent_positions" :clearable="'false'" :selected="setting('localisation.percent_position')" not-required />

<x-form.group.select name="discount_location" label="{{ trans('settings.localisation.discount_location.name') }}" :options="$discount_locations" :selected="setting('localisation.discount_location')" not-required />
<x-form.group.select name="discount_location" label="{{ trans('settings.localisation.discount_location.name') }}" :options="$discount_locations" :clearable="'false'" :selected="setting('localisation.discount_location')" not-required />
</x-slot>
</x-form.section>

Expand Down
3 changes: 3 additions & 0 deletions resources/views/settings/modules/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
name="{{ $field['name'] }}"
label="{{ trans($field['title']) }}"
:options="$field['values']"
:clearable="'false'"
:selected="setting($module->getAlias() . '.' . $field['name'], $field['selected'])"
:dynamic-attributes="$field['attributes']"
/>
Expand Down Expand Up @@ -71,6 +72,7 @@

<x-form.group.account
:selected="$account"
:clearable="'false'"
:dynamic-attributes="$field['attributes']"
without-add-new
/>
Expand All @@ -81,6 +83,7 @@

<x-form.group.category
:value="$category"
:clearable="'false'"
:dynamic-attributes="$field['attributes']"
without-add-new
/>
Expand Down

0 comments on commit 2101a5d

Please sign in to comment.