diff --git a/app/Helpers/report_helper.php b/app/Helpers/report_helper.php index fe573055e..10f12adab 100644 --- a/app/Helpers/report_helper.php +++ b/app/Helpers/report_helper.php @@ -33,7 +33,7 @@ function show_report(string $report_prefix, string $report_name, string $lang_ke if(!empty($report_label) && $report_label != $lang_key . ' (TBD)') //TODO: String Interpolation. Also !== {//TODO: Is there a better way to do this? breaking the php like this makes it more difficult to read. ?> - ">= $report_label; ?> + ">= $report_label; ?> ', {definition_id: definition_id, attribute_value: value}); + $.post('', {definition_id: definition_id, attribute_value: value}); } $(this).parents("li").remove(); }; @@ -210,7 +210,7 @@ $(document).ready(function() } else { - $.post('', {definition_id: definition_id, attribute_value: value}); + $.post('', {definition_id: definition_id, attribute_value: value}); } } @@ -256,7 +256,7 @@ $(document).ready(function() success: function(response) { dialog_support.hide(); - table_support.handle_submit('', response); + table_support.handle_submit('', response); }, dataType: 'json' }); diff --git a/app/Views/attributes/item.php b/app/Views/attributes/item.php index e4e3fb526..f0058ed3c 100644 --- a/app/Views/attributes/item.php +++ b/app/Views/attributes/item.php @@ -100,7 +100,7 @@ foreach($definition_values as $definition_id => $definition_value) $("input[name='attribute_ids[" + definition_id + "]']").val(''); }).autocomplete({ source: function(request, response) { - $.get('' + this.element.data('definition-id') + '?term=' + request.term, function(data) { + $.get('' + this.element.data('definition-id') + '?term=' + request.term, function(data) { return response(data); }, 'json'); }, @@ -125,7 +125,7 @@ foreach($definition_values as $definition_id => $definition_value) var definition_id = $("#definition_name option:selected").val(); var attribute_values = definition_values(); attribute_values[definition_id] = ''; - $('#attributes').load('', { + $('#attributes').load('', { 'definition_ids': JSON.stringify(attribute_values) }, enable_delete); }; diff --git a/app/Views/attributes/manage.php b/app/Views/attributes/manage.php index 8133db010..46f0e869d 100644 --- a/app/Views/attributes/manage.php +++ b/app/Views/attributes/manage.php @@ -23,7 +23,7 @@
diff --git a/app/Views/configs/general_config.php b/app/Views/configs/general_config.php index 7c7932374..7d9b8130c 100644 --- a/app/Views/configs/general_config.php +++ b/app/Views/configs/general_config.php @@ -473,12 +473,12 @@ $(document).ready(function() lines_per_page: { required: true, - remote: "" + remote: "" }, default_sales_discount: { required: true, - remote: "" + remote: "" }, gcaptcha_site_key: { diff --git a/app/Views/configs/info_config.php b/app/Views/configs/info_config.php index 7b42b0e03..5220a6f1f 100644 --- a/app/Views/configs/info_config.php +++ b/app/Views/configs/info_config.php @@ -149,7 +149,7 @@ $(document).ready(function() $("a.fileinput-exists").click(function() { $.ajax({ type: 'POST', - url: '', + url: '', dataType: 'json' }) }); diff --git a/app/Views/configs/integrations_config.php b/app/Views/configs/integrations_config.php index 5663d6273..e01f3953a 100644 --- a/app/Views/configs/integrations_config.php +++ b/app/Views/configs/integrations_config.php @@ -61,7 +61,7 @@ $(document).ready(function() { $('#mailchimp_api_key').change(function() { - $.post("", { + $.post("", { 'mailchimp_api_key': $('#mailchimp_api_key').val() }, function(response) { diff --git a/app/Views/configs/reward_config.php b/app/Views/configs/reward_config.php index a4478fb5e..ffd345121 100644 --- a/app/Views/configs/reward_config.php +++ b/app/Views/configs/reward_config.php @@ -122,7 +122,7 @@ $(document).ready(function() }, success: function(response) { $.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'}); - $("#customer_rewards").load('', init_add_remove_tables); + $("#customer_rewards").load('', init_add_remove_tables); }, dataType: 'json' }); diff --git a/app/Views/configs/stock_config.php b/app/Views/configs/stock_config.php index 77b6f8136..dc918e9f4 100644 --- a/app/Views/configs/stock_config.php +++ b/app/Views/configs/stock_config.php @@ -80,7 +80,7 @@ $(document).ready(function() $(form).ajaxSubmit({ success: function(response) { $.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'}); - $("#stock_locations").load('', init_add_remove_locations); + $("#stock_locations").load('', init_add_remove_locations); }, dataType: 'json' }); diff --git a/app/Views/configs/table_config.php b/app/Views/configs/table_config.php index 21e81df98..5dc6301bf 100644 --- a/app/Views/configs/table_config.php +++ b/app/Views/configs/table_config.php @@ -117,7 +117,7 @@ $(document).ready(function() }, success: function(response) { $.notify({ message: response.message }, { type: response.success ? 'success' : 'danger'}); - $("#dinner_tables").load('', init_add_remove_tables); + $("#dinner_tables").load('', init_add_remove_tables); }, dataType: 'json' }); diff --git a/app/Views/configs/tax_config.php b/app/Views/configs/tax_config.php index 42870e31d..a401d3883 100644 --- a/app/Views/configs/tax_config.php +++ b/app/Views/configs/tax_config.php @@ -159,11 +159,11 @@ $(document).ready(function() { default_tax_1_rate: { - remote: "" + remote: "" }, default_tax2_rate: { - remote: "" + remote: "" }, }, diff --git a/app/Views/employees/form.php b/app/Views/employees/form.php index 3bed72c9a..17ba45825 100644 --- a/app/Views/employees/form.php +++ b/app/Views/employees/form.php @@ -209,7 +209,7 @@ $(document).ready(function() success: function(response) { dialog_support.hide(); - table_support.handle_submit("", response); + table_support.handle_submit("", response); }, dataType: 'json' }); @@ -226,7 +226,7 @@ $(document).ready(function() required: true, minlength: 5, - remote: '' + remote: '' }, password: { diff --git a/app/Views/expenses/form.php b/app/Views/expenses/form.php index 6e03aabb0..e4487af79 100644 --- a/app/Views/expenses/form.php +++ b/app/Views/expenses/form.php @@ -170,7 +170,7 @@ $(document).ready(function() var amount_validator = function(field) { return { - url: "", + url: "", type: 'POST', dataFilter: function(data) { var response = JSON.parse(data); @@ -226,7 +226,7 @@ $(document).ready(function() success: function(response) { dialog_support.hide(); - table_support.handle_submit("", response); + table_support.handle_submit("", response); }, dataType: 'json' }); diff --git a/app/Views/expenses/manage.php b/app/Views/expenses/manage.php index d09852838..a9a9a2cb6 100644 --- a/app/Views/expenses/manage.php +++ b/app/Views/expenses/manage.php @@ -53,7 +53,7 @@ $(document).ready(function()