SecuritySuite Mass assign JS

I’ve installed a 7.4.3 out of box

Got probem on mass assign SecurityGroup translations

When I massassign for delete security group in listview the message is “Are you sure you want to delete the xxx selected record(s)?”

Inspecting input button :

[code]

[code]

I thought the problem was in SecurityGroups translations but no…
Look at /modules/SecurityGroups/AssignGroups.php

Generated JS in PHP :

[code]function confirm_massassign(del,start_string, end_string) {
if (del == 1) {
return confirm( start_string + sugarListView.get_num_selected() + end_string);
}
else {
return confirm( start_string + sugarListView.get_num_selected() + end_string);
}
}

function send_massassign(mode, no_record_txt, start_string, end_string, del) {

if(!sugarListView.confirm_action(del, start_string, end_string))
	return false;
[...]

}
[/code]

calling sugarListView.confirm_action call Sugar core js (not the goal, i suppose)


sugarListView.prototype.confirm_action = function(del) {
	if (del == 1) {
		return confirm( SUGAR.language.get('app_strings', 'NTC_DELETE_CONFIRMATION_NUM') + sugarListView.get_num_selected()  + SUGAR.language.get('app_strings', 'NTC_DELETE_SELECTED_RECORDS'));
	}
	else {
		return confirm( SUGAR.language.get('app_strings', 'NTC_UPDATE_CONFIRMATION_NUM') + sugarListView.get_num_selected()  + SUGAR.language.get('app_strings', 'NTC_DELETE_SELECTED_RECORDS'));
	}

}

Supposed :


function send_massassign(mode, no_record_txt, start_string, end_string, del) {

	if(!confirm_massassign(del, start_string, end_string))
		return false;
	[...]
}

And the function confirm_massassign is not very usefull neither… prefer this one


function confirm_massassign(del,start_string, end_string) {
	return confirm( start_string + sugarListView.get_num_selected()  + end_string);
}

No check neither on the number of records selected… ? Even if we have the “no_record_txt”, something else missing in validation, no ?