Skip to content

Commit

Permalink
Hidden inputs don't need classes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThompsonTLDR authored Sep 18, 2020
1 parent 924e994 commit f8f066e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/View/Components/Bs.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,17 @@ private function classes()
// Input

// nothing set by application
if (in_array($this->type, ['checkbox', 'radio']) && $this->inputClass === 'form-control') {
$this->inputClass = 'form-check-input';
if ($this->inputClass === 'form-control') {
// do input specific logic
switch ($this->type) {
case 'checkbox':
case 'radio':
$this->inputClass = 'form-check-input';
break;
case 'hidden':
$this->inputClass = '';
break;
}
}

if (!empty($this->inputClass)) {
Expand Down

0 comments on commit f8f066e

Please sign in to comment.