Fix for creative design

This commit is contained in:
Hillel Coren 2017-08-16 15:45:55 +03:00
parent 755f7d74e0
commit 217f502501

View File

@ -639,7 +639,8 @@
{!! Former::select('client[country_id]') {!! Former::select('client[country_id]')
->label(trans('texts.country_id')) ->label(trans('texts.country_id'))
->addOption('','')->addGroupClass('country_select') ->addOption('','')->addGroupClass('country_select')
->fromQuery($countries, 'name', 'id')->data_bind("dropdown: country_id") !!} ->fromQuery($countries, 'name', 'id')
->data_bind("dropdown: country_id") !!}
</span> </span>
</div> </div>
@ -933,6 +934,7 @@
$('#country_id').combobox().on('change', function(e) { $('#country_id').combobox().on('change', function(e) {
var countryId = $('input[name=country_id]').val(); var countryId = $('input[name=country_id]').val();
var country = _.findWhere(countries, {id: countryId}); var country = _.findWhere(countries, {id: countryId});
console.log(countryId + ' - ' + country);
if (country) { if (country) {
model.invoice().client().country = country; model.invoice().client().country = country;
model.invoice().client().country_id(countryId); model.invoice().client().country_id(countryId);