How can I add to the dropDowList the option to select all without using an extension? I need to be able to mark one or all at once, in the image I show how it should look.
I have this code:
<?php
echo CHtml::dropDownList('client', '', (array) $all_client, array(
'empty' => 'Select All',
'class' => "form-control selectpicker",
'id' => "f_client",
'style' => "width: 150px;",
'data-live-search' => "true",
'onchange' => 'myFunction()',
'multiple' => 'multiple'
));
?>