mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
This commit is contained in:
@@ -83,11 +83,10 @@ $(document).ready(function()
|
||||
submitHandler:function(form)
|
||||
{
|
||||
$(form).ajaxSubmit({
|
||||
beforeSerialize: setup_csrf_token(),
|
||||
success:function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
table_support.handle_submit('<?php echo site_url($controller_name); ?>', response);
|
||||
table_support.handle_submit('<?php echo site_url($controller_name); ?>', response);
|
||||
},
|
||||
dataType:'json'
|
||||
});
|
||||
|
||||
@@ -331,7 +331,6 @@
|
||||
$('#item_form').validate($.extend({
|
||||
submitHandler: function(form, event) {
|
||||
$(form).ajaxSubmit({
|
||||
beforeSerialize: setup_csrf_token,
|
||||
success: function(response) {
|
||||
var stay_open = dialog_support.clicked_id() != 'submit';
|
||||
if (stay_open)
|
||||
|
||||
@@ -36,5 +36,11 @@
|
||||
|
||||
setup_csrf_token();
|
||||
|
||||
$(document).ajaxComplete(setup_csrf_token);
|
||||
$.ajaxSetup({
|
||||
dataFilter: function(data) {
|
||||
setup_csrf_token();
|
||||
return data;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -85,7 +85,10 @@ if (isset($success))
|
||||
<?php echo form_input(array('name'=>'item', 'id'=>'item', 'class'=>'form-control input-sm', 'size'=>'50', 'tabindex'=>'1')); ?>
|
||||
</li>
|
||||
<li class="pull-right">
|
||||
<button id='new_item_button' class='btn btn-info btn-sm pull-right modal-dlg' data-btn-submit='<?php echo $this->lang->line('common_submit') ?>' data-href='<?php echo site_url("items/view"); ?>'
|
||||
<button id='new_item_button' class='btn btn-info btn-sm pull-right modal-dlg'
|
||||
data-btn-new='<?php echo $this->lang->line('common_new') ?>'
|
||||
data-btn-submit='<?php echo $this->lang->line('common_submit') ?>'
|
||||
data-href='<?php echo site_url("items/view"); ?>'
|
||||
title='<?php echo $this->lang->line('sales_new_item'); ?>'>
|
||||
<span class="glyphicon glyphicon-tag"> </span><?php echo $this->lang->line('sales_new_item'); ?>
|
||||
</button>
|
||||
@@ -493,7 +496,6 @@ $(document).ready(function()
|
||||
{
|
||||
if(response.success)
|
||||
{
|
||||
setup_csrf_token();
|
||||
if (resource.match(/suppliers$/))
|
||||
{
|
||||
$("#supplier").attr("value",response.id);
|
||||
|
||||
@@ -164,7 +164,6 @@ $(document).ready(function()
|
||||
{
|
||||
$(this).ajaxSubmit(
|
||||
{
|
||||
beforeSerialize: setup_csrf_token(),
|
||||
success: function(response)
|
||||
{
|
||||
dialog_support.hide();
|
||||
|
||||
@@ -672,7 +672,6 @@ $(document).ready(function()
|
||||
table_support.handle_submit = function(resource, response, stay_open)
|
||||
{
|
||||
if(response.success) {
|
||||
setup_csrf_token();
|
||||
if (resource.match(/customers$/))
|
||||
{
|
||||
$("#customer").val(response.id);
|
||||
|
||||
Reference in New Issue
Block a user