@@ -57,7 +57,7 @@ abstract class BaseColumn extends Object
57
57
/**
58
58
* @var mixed default value for input
59
59
*/
60
- public $ defaultValue = '' ;
60
+ public $ defaultValue ;
61
61
62
62
/**
63
63
* @var array
@@ -272,6 +272,9 @@ protected function renderRadio($name, $value, $options)
272
272
if (!isset ($ options ['label ' ])) {
273
273
$ options ['label ' ] = '' ;
274
274
}
275
+ if (!array_key_exists ('uncheck ' , $ options )) {
276
+ $ options ['uncheck ' ] = 0 ;
277
+ }
275
278
$ input = Html::radio ($ name , $ value , $ options );
276
279
return Html::tag ('div ' , $ input , ['class ' => 'radio ' ]);
277
280
}
@@ -284,11 +287,14 @@ protected function renderRadio($name, $value, $options)
284
287
*/
285
288
protected function renderRadioList ($ name , $ value , $ options )
286
289
{
290
+ if (!array_key_exists ('unselect ' , $ options )) {
291
+ $ options ['unselect ' ] = '' ;
292
+ }
287
293
$ options ['item ' ] = function ($ index , $ label , $ name , $ checked , $ value ) {
288
294
return '<div class="radio"> ' . Html::radio ($ name , $ checked , ['label ' => $ label , 'value ' => $ value ]) . '</div> ' ;
289
295
};
290
296
$ input = Html::radioList ($ name , $ value , $ this ->items , $ options );
291
- return Html::tag ('div ' , $ input , ['class ' => 'radio ' ]);
297
+ return Html::tag ('div ' , $ input , ['class ' => 'radio-list ' ]);
292
298
}
293
299
294
300
/**
@@ -302,6 +308,9 @@ protected function renderCheckbox($name, $value, $options)
302
308
if (!isset ($ options ['label ' ])) {
303
309
$ options ['label ' ] = '' ;
304
310
}
311
+ if (!array_key_exists ('uncheck ' , $ options )) {
312
+ $ options ['uncheck ' ] = 0 ;
313
+ }
305
314
$ input = Html::checkbox ($ name , $ value , $ options );
306
315
return Html::tag ('div ' , $ input , ['class ' => 'checkbox ' ]);
307
316
}
@@ -314,11 +323,14 @@ protected function renderCheckbox($name, $value, $options)
314
323
*/
315
324
protected function renderCheckboxList ($ name , $ value , $ options )
316
325
{
326
+ if (!array_key_exists ('unselect ' , $ options )) {
327
+ $ options ['unselect ' ] = '' ;
328
+ }
317
329
$ options ['item ' ] = function ($ index , $ label , $ name , $ checked , $ value ) {
318
330
return '<div class="checkbox"> ' . Html::checkbox ($ name , $ checked , ['label ' => $ label , 'value ' => $ value ]) . '</div> ' ;
319
331
};
320
332
$ input = Html::checkboxList ($ name , $ value , $ this ->items , $ options );
321
- return Html::tag ('div ' , $ input , ['class ' => 'checkbox ' ]);
333
+ return Html::tag ('div ' , $ input , ['class ' => 'checkbox-list ' ]);
322
334
}
323
335
324
336
/**
0 commit comments