mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-06-08 07:34:40 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5632a2f5a | ||
|
|
2e7e9cecd8 | ||
|
|
5ce7fcf5ed |
@@ -1,3 +1,7 @@
|
|||||||
|
Version 3.2.2
|
||||||
|
-------------
|
||||||
|
+ Revert CSRF change causing regression
|
||||||
|
|
||||||
Version 3.2.1
|
Version 3.2.1
|
||||||
-------------
|
-------------
|
||||||
+ Support for GDPR
|
+ Support for GDPR
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['application_version'] = '3.2.1';
|
$config['application_version'] = '3.2.2';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ $(document).ready(function()
|
|||||||
var data = { number_locale: $('#number_locale').val() };
|
var data = { number_locale: $('#number_locale').val() };
|
||||||
data[field] = value;
|
data[field] = value;
|
||||||
$.post("<?php echo site_url($controller_name . '/ajax_check_number_locale')?>",
|
$.post("<?php echo site_url($controller_name . '/ajax_check_number_locale')?>",
|
||||||
data,
|
$.extend(csrf_form_base(), data),
|
||||||
function(response) {
|
function(response) {
|
||||||
$('#number_locale_example').text(response.number_locale_example);
|
$('#number_locale_example').text(response.number_locale_example);
|
||||||
},
|
},
|
||||||
@@ -253,10 +253,10 @@ $(document).ready(function()
|
|||||||
{
|
{
|
||||||
url: "<?php echo site_url($controller_name . '/ajax_check_number_locale')?>",
|
url: "<?php echo site_url($controller_name . '/ajax_check_number_locale')?>",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: $.extend(csrf_form_base(), {
|
||||||
'number_locale': $('#number_locale').val(),
|
'number_locale': $('#number_locale').val(),
|
||||||
'thousands_separator': $('#thousands_separator').is(':checked')
|
'thousands_separator': $('#thousands_separator').is(':checked')
|
||||||
},
|
}),
|
||||||
dataFilter: function(data) {
|
dataFilter: function(data) {
|
||||||
setup_csrf_token();
|
setup_csrf_token();
|
||||||
var response = JSON.parse(data);
|
var response = JSON.parse(data);
|
||||||
|
|||||||
@@ -50,9 +50,10 @@
|
|||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
$('#mailchimp_api_key').change(function() {
|
$('#mailchimp_api_key').change(function() {
|
||||||
$.post("<?php echo site_url($controller_name . '/ajax_check_mailchimp_api_key')?>", {
|
$.post("<?php echo site_url($controller_name . '/ajax_check_mailchimp_api_key')?>",
|
||||||
|
$.extend(csrf_form_base(), {
|
||||||
'mailchimp_api_key': $('#mailchimp_api_key').val()
|
'mailchimp_api_key': $('#mailchimp_api_key').val()
|
||||||
},
|
}),
|
||||||
function(response) {
|
function(response) {
|
||||||
$.notify(response.message, {type: response.success ? 'success' : 'danger'} );
|
$.notify(response.message, {type: response.success ? 'success' : 'danger'} );
|
||||||
$('#mailchimp_list_id').empty();
|
$('#mailchimp_list_id').empty();
|
||||||
|
|||||||
@@ -454,38 +454,38 @@ $(document).ready(function()
|
|||||||
first_name: 'required',
|
first_name: 'required',
|
||||||
last_name: 'required',
|
last_name: 'required',
|
||||||
consent: 'required',
|
consent: 'required',
|
||||||
email:
|
email:
|
||||||
{
|
{
|
||||||
remote:
|
remote:
|
||||||
{
|
{
|
||||||
url: "<?php echo site_url($controller_name . '/ajax_check_email')?>",
|
url: "<?php echo site_url($controller_name . '/ajax_check_email')?>",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: $.extend(csrf_form_base(), {
|
||||||
'person_id': '<?php echo $person_info->person_id; ?>'
|
'person_id': '<?php echo $person_info->person_id; ?>'
|
||||||
// email is posted by default
|
// email is posted by default
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
account_number:
|
account_number:
|
||||||
{
|
{
|
||||||
remote:
|
remote:
|
||||||
{
|
{
|
||||||
url: "<?php echo site_url($controller_name . '/ajax_check_account_number')?>",
|
url: "<?php echo site_url($controller_name . '/ajax_check_account_number')?>",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: $.extend(csrf_form_base(), {
|
||||||
'person_id': '<?php echo $person_info->person_id; ?>'
|
'person_id': '<?php echo $person_info->person_id; ?>'
|
||||||
// account_number is posted by default
|
// account_number is posted by default
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
messages:
|
messages:
|
||||||
{
|
{
|
||||||
first_name: "<?php echo $this->lang->line('common_first_name_required'); ?>",
|
first_name: "<?php echo $this->lang->line('common_first_name_required'); ?>",
|
||||||
last_name: "<?php echo $this->lang->line('common_last_name_required'); ?>",
|
last_name: "<?php echo $this->lang->line('common_last_name_required'); ?>",
|
||||||
consent: "<?php echo $this->lang->line('customers_consent_required'); ?>",
|
consent: "<?php echo $this->lang->line('customers_consent_required'); ?>",
|
||||||
email: "<?php echo $this->lang->line('customers_email_duplicate'); ?>",
|
email: "<?php echo $this->lang->line('customers_email_duplicate'); ?>",
|
||||||
account_number: "<?php echo $this->lang->line('customers_account_number_duplicate'); ?>"
|
account_number: "<?php echo $this->lang->line('customers_account_number_duplicate'); ?>"
|
||||||
}
|
}
|
||||||
}, form_support.error));
|
}, form_support.error));
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ $(document).ready(function()
|
|||||||
source: '<?php echo site_url("customers/suggest"); ?>',
|
source: '<?php echo site_url("customers/suggest"); ?>',
|
||||||
minChars: 0,
|
minChars: 0,
|
||||||
delay: 15,
|
delay: 15,
|
||||||
cacheLength: 1,
|
cacheLength: 1,
|
||||||
appendTo: '.modal-content',
|
appendTo: '.modal-content',
|
||||||
select: fill_value,
|
select: fill_value,
|
||||||
focus: fill_value
|
focus: fill_value
|
||||||
@@ -125,9 +125,9 @@ $(document).ready(function()
|
|||||||
{
|
{
|
||||||
url: "<?php echo site_url($controller_name . '/ajax_check_number_giftcard')?>",
|
url: "<?php echo site_url($controller_name . '/ajax_check_number_giftcard')?>",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: $.extend(csrf_form_base(), {
|
||||||
'amount': $('#giftcard_amount').val()
|
'amount': $('#giftcard_amount').val()
|
||||||
},
|
}),
|
||||||
dataFilter: function(data) {
|
dataFilter: function(data) {
|
||||||
setup_csrf_token();
|
setup_csrf_token();
|
||||||
var response = JSON.parse(data);
|
var response = JSON.parse(data);
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
from: '<?php echo $this->config->item('notify_vertical_position'); ?>'
|
from: '<?php echo $this->config->item('notify_vertical_position'); ?>'
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
var post = $.post;
|
||||||
|
|
||||||
var csrf_token = function() {
|
var csrf_token = function() {
|
||||||
return Cookies.get('<?php echo $this->config->item('csrf_cookie_name'); ?>');
|
return Cookies.get('<?php echo $this->config->item('csrf_cookie_name'); ?>');
|
||||||
};
|
};
|
||||||
@@ -24,23 +26,9 @@
|
|||||||
return { <?php echo $this->security->get_csrf_token_name(); ?> : function () { return csrf_token(); } };
|
return { <?php echo $this->security->get_csrf_token_name(); ?> : function () { return csrf_token(); } };
|
||||||
};
|
};
|
||||||
|
|
||||||
var ajax = $.ajax;
|
$.post = function() {
|
||||||
|
arguments[1] = csrf_token() ? $.extend(arguments[1], csrf_form_base()) : arguments[1];
|
||||||
$.ajax = function() {
|
post.apply(this, arguments);
|
||||||
var args = arguments[0];
|
|
||||||
|
|
||||||
if (args['type'] && args['type'].toLowerCase() == 'post' && csrf_token()) {
|
|
||||||
if (typeof args['data'] === 'string')
|
|
||||||
{
|
|
||||||
args['data'] += $.param(csrf_form_base());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
args['data'] = $.extend(args['data'], csrf_form_base());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ajax.apply(this, arguments);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var setup_csrf_token = function() {
|
var setup_csrf_token = function() {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ $(document).ready(function()
|
|||||||
});
|
});
|
||||||
|
|
||||||
var submit_form = function()
|
var submit_form = function()
|
||||||
{
|
{
|
||||||
$(this).ajaxSubmit(
|
$(this).ajaxSubmit(
|
||||||
{
|
{
|
||||||
success: function(response)
|
success: function(response)
|
||||||
@@ -191,12 +191,12 @@ $(document).ready(function()
|
|||||||
{
|
{
|
||||||
url: "<?php echo site_url($controller_name . '/check_invoice_number')?>",
|
url: "<?php echo site_url($controller_name . '/check_invoice_number')?>",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: {
|
data: $.extend(csrf_form_base(), {
|
||||||
'sale_id': <?php echo $sale_info['sale_id']; ?>,
|
'sale_id' : <?php echo $sale_info['sale_id']; ?>,
|
||||||
'invoice_number': function() {
|
'invoice_number' : function() {
|
||||||
return $('#invoice_number').val();
|
return $('#invoice_number').val();
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "opensourcepos",
|
"name": "opensourcepos",
|
||||||
"description": "Open Source Point of Sale is a web based POS system written in the PHP language. It uses MySQL as backend and has a simple user interface",
|
"description": "Open Source Point of Sale is a web based POS system written in the PHP language. It uses MySQL as backend and has a simple user interface",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
"jekkos <jeroen.peelaerts - at - gmail.com>",
|
"jekkos <jeroen.peelaerts - at - gmail.com>",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"public_stats": true
|
"public_stats": true
|
||||||
},
|
},
|
||||||
"version": {
|
"version": {
|
||||||
"name": "3.2.1"
|
"name": "3.2.2"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
{"includePattern": "dist(.*)\\.(zip)", "uploadPattern": "$1.$2"}
|
{"includePattern": "dist(.*)\\.(zip)", "uploadPattern": "$1.$2"}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "opensourcepos",
|
"name": "opensourcepos",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"description": "Open Source Point of Sale is a web based point of sale system written in the PHP language. It uses MySQL as the data storage back-end and has a simple user interface.",
|
"description": "Open Source Point of Sale is a web based point of sale system written in the PHP language. It uses MySQL as the data storage back-end and has a simple user interface.",
|
||||||
"main": "index.php",
|
"main": "index.php",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "OpenSourcePOS",
|
"name": "OpenSourcePOS",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user