close #113 Added: [Enhancement] Create Customer/Vendor on all pages where it is needed ({incomes/revenues/create} and {expenses/payments/create})
This commit is contained in:
parent
816c28d449
commit
eb6c26d9c1
@ -12,7 +12,7 @@
|
|||||||
{!! Form::label('vendor_id', trans_choice('general.vendors', 1), ['class' => 'control-label']) !!}
|
{!! Form::label('vendor_id', trans_choice('general.vendors', 1), ['class' => 'control-label']) !!}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-addon"><i class="fa fa-user"></i></div>
|
<div class="input-group-addon"><i class="fa fa-user"></i></div>
|
||||||
{!! Form::select('vendor_id', $vendors, null, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)])])) !!}
|
{!! Form::select('vendor_id', $vendors, null, array_merge(['id' => 'vendor_id', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)])])) !!}
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button type="button" onclick="createVendor();" class="btn btn-primary">{{ trans('general.add_new') }}</button>
|
<button type="button" onclick="createVendor();" class="btn btn-primary">{{ trans('general.add_new') }}</button>
|
||||||
</span>
|
</span>
|
||||||
@ -344,22 +344,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#button-create-vendor', function (e) {
|
$(document).on('click', '#button-create-vendor', function (e) {
|
||||||
|
$('#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("expenses/vendors/vendor") }}',
|
url: '{{ url("expenses/vendors/vendor") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: $("#form-create-vendor").serialize(),
|
data: $("#form-create-vendor").serialize(),
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
|
$('#modal-create-vendor .modal-content').append();
|
||||||
|
|
||||||
$(".form-group").removeClass("has-error");
|
$(".form-group").removeClass("has-error");
|
||||||
$(".help-block").remove();
|
$(".help-block").remove();
|
||||||
},
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
$('#modal-create-vendor').modal('hide');
|
$('#modal-create-vendor').modal('hide');
|
||||||
|
|
||||||
$("#vendor_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
$("#vendor_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
$("#vendor_id").select2('refresh');
|
$("#vendor_id").select2('refresh');
|
||||||
},
|
},
|
||||||
error: function(error, textStatus, errorThrown) {
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
if (error.responseJSON.name) {
|
||||||
$("input[name='name']").parent().parent().addClass('has-error');
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
@ -28,7 +28,16 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors, null, []) }}
|
<div class="form-group col-md-6">
|
||||||
|
{!! Form::label('vendor_id', trans_choice('general.vendors', 1), ['class' => 'control-label']) !!}
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-addon"><i class="fa fa-user"></i></div>
|
||||||
|
{!! Form::select('vendor_id', $vendors, null, array_merge(['id' => 'vendor_id', 'class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)])])) !!}
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button type="button" onclick="createVendor();" class="btn btn-primary">{{ trans('general.add_new') }}</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('general.default_payment_method')) }}
|
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('general.default_payment_method')) }}
|
||||||
|
|
||||||
@ -101,5 +110,118 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function createVendor() {
|
||||||
|
$('#modal-create-vendor').remove();
|
||||||
|
|
||||||
|
modal = '<div class="modal fade" id="modal-create-vendor" style="display: none;">';
|
||||||
|
modal += ' <div class="modal-dialog modal-lg">';
|
||||||
|
modal += ' <div class="modal-content">';
|
||||||
|
modal += ' <div class="modal-header">';
|
||||||
|
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]) }}</h4>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-body">';
|
||||||
|
modal += ' {!! Form::open(['id' => 'form-create-vendor', 'role' => 'form']) !!}';
|
||||||
|
modal += ' <div class="row">';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans('general.email') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-envelope"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.email') }}" required="required" name="email" type="text" id="email">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6">';
|
||||||
|
modal += ' <label for="tax_number" class="control-label">{{ trans('general.tax_number') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-percent"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.tax_number') }}" name="tax_number" type="text" id="tax_number">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans_choice('general.currencies', 1) }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||||
|
modal += ' <select class="form-control" required="required" id="currency_code" name="currency_code">';
|
||||||
|
modal += ' <option value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}</option>';
|
||||||
|
@foreach($currencies as $currency_code => $currency_name)
|
||||||
|
modal += ' <option value="{{ $currency_code }}" {{ (setting('general.default_currency') == $currency_code) ? 'selected' : '' }}>{{ $currency_name }}</option>';
|
||||||
|
@endforeach
|
||||||
|
modal += ' </select>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-12">';
|
||||||
|
modal += ' <label for="address" class="control-label">{{ trans('general.address') }}</label>';
|
||||||
|
modal += ' <textarea class="form-control" placeholder="{{ trans('general.address') }}" rows="3" name="address" cols="50" id="address"></textarea>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::close() !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-footer">';
|
||||||
|
modal += ' <div class="pull-left">';
|
||||||
|
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-vendor', 'class' => 'btn btn-success']) !!}';
|
||||||
|
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += '</div>';
|
||||||
|
|
||||||
|
$('body').append(modal);
|
||||||
|
|
||||||
|
$("#modal-create-vendor #currency_code").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#modal-create-vendor').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#button-create-vendor', function (e) {
|
||||||
|
$('#modal-create-vendor .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ url("expenses/vendors/vendor") }}',
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'JSON',
|
||||||
|
data: $("#form-create-vendor").serialize(),
|
||||||
|
beforeSend: function () {
|
||||||
|
$(".form-group").removeClass("has-error");
|
||||||
|
$(".help-block").remove();
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
$('#modal-create-vendor').modal('hide');
|
||||||
|
|
||||||
|
$("#vendor_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
|
$("#vendor_id").select2('refresh');
|
||||||
|
},
|
||||||
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
if (error.responseJSON.name) {
|
||||||
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.email) {
|
||||||
|
$("input[name='email']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.currency_code) {
|
||||||
|
$("select[name='currency_code']").parent().parent().addClass('has-error');
|
||||||
|
$("select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -345,6 +345,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', '#button-create-customer', function (e) {
|
$(document).on('click', '#button-create-customer', function (e) {
|
||||||
|
$('#modal-create-customer .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("incomes/customers/customer") }}',
|
url: '{{ url("incomes/customers/customer") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@ -355,12 +357,16 @@
|
|||||||
$(".help-block").remove();
|
$(".help-block").remove();
|
||||||
},
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
$('#modal-create-customer').modal('hide');
|
$('#modal-create-customer').modal('hide');
|
||||||
|
|
||||||
$("#customer_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
$("#customer_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
$("#customer_id").select2('refresh');
|
$("#customer_id").select2('refresh');
|
||||||
},
|
},
|
||||||
error: function(error, textStatus, errorThrown) {
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
if (error.responseJSON.name) {
|
if (error.responseJSON.name) {
|
||||||
$("input[name='name']").parent().parent().addClass('has-error');
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
@ -28,7 +28,16 @@
|
|||||||
|
|
||||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||||
|
|
||||||
{{ Form::selectGroup('customer_id', trans_choice('general.customers', 1), 'user', $customers, null, []) }}
|
<div class="form-group col-md-6">
|
||||||
|
{!! Form::label('customer_id', trans_choice('general.customers', 1), ['class' => 'control-label']) !!}
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-addon"><i class="fa fa-user"></i></div>
|
||||||
|
{!! Form::select('customer_id', $customers, null, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.customers', 1)])])) !!}
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button type="button" onclick="createCustomer();" class="btn btn-primary">{{ trans('general.add_new') }}</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('general.default_payment_method')) }}
|
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, setting('general.default_payment_method')) }}
|
||||||
|
|
||||||
@ -101,5 +110,118 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function createCustomer() {
|
||||||
|
$('#modal-create-customer').remove();
|
||||||
|
|
||||||
|
modal = '<div class="modal fade" id="modal-create-customer" style="display: none;">';
|
||||||
|
modal += ' <div class="modal-dialog modal-lg">';
|
||||||
|
modal += ' <div class="modal-content">';
|
||||||
|
modal += ' <div class="modal-header">';
|
||||||
|
modal += ' <h4 class="modal-title">{{ trans('general.title.new', ['type' => trans_choice('general.customers', 1)]) }}</h4>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-body">';
|
||||||
|
modal += ' {!! Form::open(['id' => 'form-create-customer', 'role' => 'form']) !!}';
|
||||||
|
modal += ' <div class="row">';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="name" class="control-label">{{ trans('general.name') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-id-card-o"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.name') }}" required="required" name="name" type="text" id="name">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans('general.email') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-envelope"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.email') }}" required="required" name="email" type="text" id="email">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6">';
|
||||||
|
modal += ' <label for="tax_number" class="control-label">{{ trans('general.tax_number') }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-percent"></i></div>';
|
||||||
|
modal += ' <input class="form-control" placeholder="{{ trans('general.tax_number') }}" name="tax_number" type="text" id="tax_number">';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-6 required">';
|
||||||
|
modal += ' <label for="email" class="control-label">{{ trans_choice('general.currencies', 1) }}</label>';
|
||||||
|
modal += ' <div class="input-group">';
|
||||||
|
modal += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||||
|
modal += ' <select class="form-control" required="required" id="currency_code" name="currency_code">';
|
||||||
|
modal += ' <option value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}</option>';
|
||||||
|
@foreach($currencies as $currency_code => $currency_name)
|
||||||
|
modal += ' <option value="{{ $currency_code }}" {{ (setting('general.default_currency') == $currency_code) ? 'selected' : '' }}>{{ $currency_name }}</option>';
|
||||||
|
@endforeach
|
||||||
|
modal += ' </select>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="form-group col-md-12">';
|
||||||
|
modal += ' <label for="address" class="control-label">{{ trans('general.address') }}</label>';
|
||||||
|
modal += ' <textarea class="form-control" placeholder="{{ trans('general.address') }}" rows="3" name="address" cols="50" id="address"></textarea>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::hidden('enabled', '1', []) !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' {!! Form::close() !!}';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' <div class="modal-footer">';
|
||||||
|
modal += ' <div class="pull-left">';
|
||||||
|
modal += ' {!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'button', 'id' =>'button-create-customer', 'class' => 'btn btn-success']) !!}';
|
||||||
|
modal += ' <button type="button" class="btn btn-default" data-dismiss="modal"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</button>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += ' </div>';
|
||||||
|
modal += '</div>';
|
||||||
|
|
||||||
|
$('body').append(modal);
|
||||||
|
|
||||||
|
$("#modal-create-customer #currency_code").select2({
|
||||||
|
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#modal-create-customer').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '#button-create-customer', function (e) {
|
||||||
|
$('#modal-create-customer .modal-header').before('<span id="span-loading" style="position: absolute; height: 100%; width: 100%; z-index: 99; background: #6da252; opacity: 0.4;"><i class="fa fa-spinner fa-spin" style="font-size: 16em !important;margin-left: 35%;margin-top: 8%;"></i></span>');
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '{{ url("incomes/customers/customer") }}',
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'JSON',
|
||||||
|
data: $("#form-create-customer").serialize(),
|
||||||
|
beforeSend: function () {
|
||||||
|
$(".form-group").removeClass("has-error");
|
||||||
|
$(".help-block").remove();
|
||||||
|
},
|
||||||
|
success: function(data) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
$('#modal-create-customer').modal('hide');
|
||||||
|
|
||||||
|
$("#customer_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
|
||||||
|
$("#customer_id").select2('refresh');
|
||||||
|
},
|
||||||
|
error: function(error, textStatus, errorThrown) {
|
||||||
|
$('#span-loading').remove();
|
||||||
|
|
||||||
|
if (error.responseJSON.name) {
|
||||||
|
$("input[name='name']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='name']").parent().after('<p class="help-block">' + error.responseJSON.name + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.email) {
|
||||||
|
$("input[name='email']").parent().parent().addClass('has-error');
|
||||||
|
$("input[name='email']").parent().after('<p class="help-block">' + error.responseJSON.email + '</p>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (error.responseJSON.currency_code) {
|
||||||
|
$("select[name='currency_code']").parent().parent().addClass('has-error');
|
||||||
|
$("select[name='currency_code']").parent().after('<p class="help-block">' + error.responseJSON.currency_code + '</p>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user