diff --git a/application/controllers/Config.php b/application/controllers/Config.php
index 98d3a1fae..72d59d6b4 100644
--- a/application/controllers/Config.php
+++ b/application/controllers/Config.php
@@ -322,7 +322,7 @@ class Config extends Secure_Controller
));
}
- public function check_number_locale()
+ public function ajax_check_number_locale()
{
$number_locale = $this->input->post('number_locale');
$fmt = new \NumberFormatter($number_locale, \NumberFormatter::CURRENCY);
diff --git a/application/views/configs/locale_config.php b/application/views/configs/locale_config.php
index b331f1fbc..0ca28abc8 100644
--- a/application/views/configs/locale_config.php
+++ b/application/views/configs/locale_config.php
@@ -231,11 +231,12 @@ $(document).ready(function()
var value = $(this).is(":checkbox") ? $(this).is(":checked") : $(this).val();
var data = { number_locale: $("#number_locale").val() };
data[field] = value;
- $.post("",
+ $.post("",
$.extend(csrf_form_base(), data),
function(response) {
$("#number_locale_example").text(response.number_locale_example);
- }
+ },
+ 'json'
);
});
@@ -246,19 +247,14 @@ $(document).ready(function()
number_locale:
{
required: true,
- remote: $.extend({
- url: "",
- type: "POST"
- }, {
+ remote: {
+ url: "",
+ type: 'post',
data: $.extend(csrf_form_base(), {
- "number_locale" : function() {
- return $("#number_locale").val();
- },
- "thousands_separator": function() {
- return $("#thousands_separator").is(":checked");
- }
+ 'number_locale': $("#number_locale").val(),
+ 'thousands_separator': $("#thousands_separator").is(":checked")
}),
- dataFilter: function(data, dataType) {
+ dataFilter: function(data) {
setup_csrf_token();
var response = JSON.parse(data);
$("#number_locale_example").text(response.number_locale_example);
@@ -266,7 +262,7 @@ $(document).ready(function()
$("#thousands_separator").prop('checked', response.thousands_separator);
return response.success;
}
- })
+ }
}
},
diff --git a/application/views/configs/mailchimp_config.php b/application/views/configs/mailchimp_config.php
index 58ebef6d4..528f86fbd 100644
--- a/application/views/configs/mailchimp_config.php
+++ b/application/views/configs/mailchimp_config.php
@@ -52,7 +52,7 @@ $(document).ready(function()
$('#mailchimp_api_key').change(function() {
$.post("",
$.extend(csrf_form_base(), {
- 'mailchimp_api_key': $('#mailchimp_api_key').val()
+ 'mailchimp_api_key': $('#mailchimp_api_key').val()
}),
function(response) {
$.notify(response.message, { type: response.success ? 'success' : 'danger'} );
diff --git a/application/views/partial/header.php b/application/views/partial/header.php
index a483f93b1..931d8d1fb 100644
--- a/application/views/partial/header.php
+++ b/application/views/partial/header.php
@@ -61,7 +61,6 @@
-
@@ -77,7 +76,7 @@
-
+
diff --git a/bower.json b/bower.json
index 6f26accbd..244e7b6d5 100644
--- a/bower.json
+++ b/bower.json
@@ -25,7 +25,7 @@
],
"dependencies": {
"jquery-form": "~4.2.2",
- "jquery-validate": "~1.17.0",
+ "jquery-validate": "~1.14.0",
"jquery": "~2.1.4",
"jquery-ui": "~1.11.4",
"bootstrap3-dialog": "https://github.com/nakupanda/bootstrap3-dialog.git#master",
@@ -44,8 +44,7 @@
"remarkable-bootstrap-notify": "~3.1.3",
"js-cookie": "~2.1.4",
"blockUI": "*",
- "bootstrap-tagsinput": "~0.8.0",
- "accounting-js": "~0.4.2"
+ "bootstrap-tagsinput": "~0.8.0"
},
"overrides": {
"jquery-ui": {