crudbooster icon indicating copy to clipboard operation
crudbooster copied to clipboard

button_bulk_action not working, I don't know a solution to fix it. please help me.

Open phat111437 opened this issue 3 years ago • 3 comments

phat111437 avatar Jan 15 '22 08:01 phat111437

My Code. public function cbInit() {

		# START CONFIGURATION DO NOT REMOVE THIS LINE
		$this->title_field = "id";
		$this->limit = "20";
		$this->orderby = "id,desc";
		$this->global_privilege = false;
		$this->button_table_action = true;
		$this->button_bulk_action = true;
		$this->button_action_style = "button_icon";
		$this->button_add = true;
		$this->button_edit = true;
		$this->button_delete = true;
		$this->button_detail = true;
		$this->button_show = true;
		$this->button_filter = true;
		$this->button_import = false;
		$this->button_export = false;
		$this->table = "Deliveryorder"

phat111437 avatar Jan 15 '22 08:01 phat111437

Hello @phat111437 ,

i had problems too with bulk action and i did two things :

  • in storage / views you can found file with those lines : $('.selected-action ul li a').click(function () { var name = $(this).data('name'); $('#form-table input[name="button_name"]').val(name); var title = $(this).attr('title'); swal({ title: "<?php echo e(cbLang("confirmation_title")); ?>", text: "<?php echo e(cbLang("alert_bulk_action_button")); ?> " + title + " ?", type: "warning", showCancelButton: true, confirmButtonColor: "#008D4C", confirmButtonText: "<?php echo e(cbLang('confirmation_yes')); ?>", closeOnConfirm: false, showLoaderOnConfirm: true }, function () { $('#form-table').submit(); }); })

    you should verify if the line with 'text' is the same for you

  • second thing in vendor -> crudbooster -> controllers in CBcontroller : check if postActionSelected function do correctly this job , for me there was this line and the code was block here: CRUDBooster::redirect($_SERVER['HTTP_REFERER'], cbLang("alert_select_a_data"), 'warning');

i hope this help you, it was the solution for me

eniotnam avatar Feb 02 '22 10:02 eniotnam

@eniotnam Thank you. I fixed it.

phat111437 avatar Feb 11 '22 04:02 phat111437