diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index c23a1b6ae..06e4ac67e 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -887,7 +887,7 @@ class Reports extends Secure_Controller 'reference' => $report_data['reference'], 'comment' => $report_data['comment'], 'edit' => anchor("receivings/edit/". $report_data['receiving_id'], '', - array('class'=>"modal-dlg print_hide", 'data-btn-delete' => $this->lang->line('common_delete'), 'data-btn-submit' => $this->lang->line('common_submit'), 'title' => $this->lang->line('receivings_update')) + array('class'=>"modal-dlg print_hide", 'data-btn-submit' => $this->lang->line('common_submit'), 'data-btn-delete' => $this->lang->line('common_delete'), 'title' => $this->lang->line('receivings_update')) ) )); diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index 84ab9e5cd..4aee062ee 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -283,10 +283,10 @@ function get_item_data_row($item, $controller) array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_count')) ), 'stock' => anchor($controller_name."/count_details/$item->item_id", '', - array('class' => 'modal-dlg', 'title' => $CI->lang->line($controller_name.'_details_count')) + array('class' => 'modal-dlg', 'title' => $CI->lang->line($controller_name.'_details_count')) ), 'edit' => anchor($controller_name."/view/$item->item_id", '', - array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_update')) + array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'data-btn-new' => $CI->lang->line('common_new'), 'title' => $CI->lang->line($controller_name.'_update')) )); } diff --git a/application/views/customers/form.php b/application/views/customers/form.php index 2a6732cba..47d14dc5f 100644 --- a/application/views/customers/form.php +++ b/application/views/customers/form.php @@ -83,6 +83,7 @@ $(document).ready(function() submitHandler:function(form) { $(form).ajaxSubmit({ + beforeSerialize: setup_csrf_token(), success:function(response) { dialog_support.hide(); @@ -102,14 +103,14 @@ $(document).ready(function() { url: "", type: "post", - data: + data: $.extend(csrf_form_base(), { "person_id" : "person_id; ?>", "account_number" : function() { return $("#account_number").val(); } - } + }) } } }, diff --git a/application/views/items/form.php b/application/views/items/form.php index 78fcd0e39..a114ef328 100644 --- a/application/views/items/form.php +++ b/application/views/items/form.php @@ -283,8 +283,9 @@ //validation and submit handling $(document).ready(function() { - $("#continue").click(function() { + $("#new").click(function() { stay_open = true; + $("#item_form").submit(); }); $("#submit").click(function() { @@ -303,7 +304,7 @@ type: "POST", url: "", dataType: "json", - data: $.extend(request, {field_no: }), + data: $.extend(request, $extend(csrf_form_base(), {field_no: })), success: function(data) { response($.map(data, function(item) { return { @@ -330,6 +331,7 @@ $('#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) @@ -363,14 +365,14 @@ { url: "", type: "post", - data: + data: $.extend(csrf_form_base(), { "item_id" : "item_id; ?>", "item_number" : function() { return $("#item_number").val(); - } - } + }, + }) } }, cost_price: diff --git a/application/views/partial/header.php b/application/views/partial/header.php index 83d9ef62c..de025fad5 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -55,6 +55,7 @@ + @@ -68,50 +69,15 @@ - + - + load->view('partial/lang_lines'); ?> - - + load->view('partial/header_js'); ?>