diff --git a/public/css/app.css b/public/css/app.css index 9758ac10f..4165d56a3 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -745,3 +745,23 @@ input[type="number"] { padding-left: 0; padding-right: 0; } + +#items .select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: #6da252; + border: 1px solid #6da252; + margin-bottom: 5px; +} + +#items .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + color: #fffdfd; +} + +#items span.select2.select2-container.select2-container--default .select2-selection.select2-selection--multiple { + border-color: #d2d6de; + border-radius: 0; +} + +#items .select2-container--default.select2-container--focus .select2-selection--multiple { + border-color: #6da252; + border-radius: 0; +} diff --git a/resources/views/incomes/invoices/create.blade.php b/resources/views/incomes/invoices/create.blade.php index 2b9d28ffb..868647f25 100644 --- a/resources/views/incomes/invoices/create.blade.php +++ b/resources/views/incomes/invoices/create.blade.php @@ -248,6 +248,14 @@ placeholder: { id: '-1', // the value of the option text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}" + }, + escapeMarkup: function (markup) { + return markup; + }, + language: { + noResults: function () { + return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}'; + } } }); @@ -269,6 +277,24 @@ placeholder : '{{ trans('general.form.no_file_selected') }}' }); + $(document).on('click', '#tax-add-new', function(e){ + tax_name = $('.select2-search__field').val(); + + $('#modal-create-tax').remove(); + + $.ajax({ + url: '{{ url("modals/taxes/create") }}', + type: 'GET', + dataType: 'JSON', + data: {name: tax_name}, + success: function(json) { + if (json['success']) { + $('body').append(json['html']); + } + } + }); + }); + var autocomplete_path = "{{ url('common/items/autocomplete') }}"; $(document).on('click', '.form-control.typeahead', function() { diff --git a/resources/views/incomes/invoices/item.blade.php b/resources/views/incomes/invoices/item.blade.php index 882277924..8b65fb23a 100644 --- a/resources/views/incomes/invoices/item.blade.php +++ b/resources/views/incomes/invoices/item.blade.php @@ -7,7 +7,7 @@ @stack('actions_td_end') @stack('name_td_start') -
:message
') !!} @@ -24,7 +24,7 @@:message
') !!} @stack('tax_id_input_end')