close #34 Fixed: Offline Payments not saving changes
This commit is contained in:
parent
2f00c96ab3
commit
238e98b772
@ -36,7 +36,9 @@ class Settings extends Controller
|
||||
if (isset($request['method'])) {
|
||||
foreach ($offlinepayment as $key => $method) {
|
||||
if ($method['code'] == $request['method']) {
|
||||
$offlinepayment[$key]['code'] = 'offlinepayment.' . $request['code'] . '.' . (count($offlinepayment) + 1);
|
||||
$method = explode('.', $request['method']);
|
||||
|
||||
$offlinepayment[$key]['code'] = 'offlinepayment.' . $request['code'] . '.' . $method[2];
|
||||
$offlinepayment[$key]['name'] = $request['name'];
|
||||
$offlinepayment[$key]['order'] = $request['order'];
|
||||
$offlinepayment[$key]['description'] = $request['description'];
|
||||
@ -74,6 +76,7 @@ class Settings extends Controller
|
||||
foreach ($offlinepayment as $key => $method) {
|
||||
if ($method['code'] == $code) {
|
||||
$method['title'] = trans('offlinepayment::offlinepayment.edit', ['method' => $method['name']]);
|
||||
$method['method'] = $code;
|
||||
|
||||
$code = explode('.', $method['code']);
|
||||
|
||||
|
@ -134,12 +134,12 @@
|
||||
$('.col-md-4.no-padding-left .box-header.with-border .box-title').html(json['data']['title']);
|
||||
$('input[name="name"]').val(json['data']['name']);
|
||||
$('input[name="code"]').val(json['data']['code']);
|
||||
$('input[name="sort"]').val(json['data']['sort']);
|
||||
$('input[name="order"]').val(json['data']['order']);
|
||||
$('input[name="description"]').val(json['data']['description']);
|
||||
|
||||
$('input[name="method"]').remove();
|
||||
|
||||
$('.col-md-4 .box-body').append('<input type="hidden" name="method" value="' + json['data']['code'] + '">');
|
||||
$('.col-md-4 .box-body').append('<input type="hidden" name="method" value="' + json['data']['method'] + '">');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -167,4 +167,3 @@
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user