Closed Loadir closed 3 years ago
https://github.com/instantsoft/icms2/blob/b62f9f95a67019d5ab6dee9c9edc558cb7bf0a70/system/libs/template.helper.php#L98 Предлагаю эту функцию привести к виду https://getbootstrap.com/docs/5.0/forms/checks-radios/#radios function html_radio($name, $checked=false, $value=1, $attributes=array()){ if ($checked) { $attributes['checked'] = 'checked'; } $attr_str = html_attr_str($attributes); $class = 'input-radio'; if (isset($attributes['class'])) { $class .= ' '.$attributes['class']; } return '<input type="radio" class="form-check-input '.$class.'" name="'.$name.'" value="'.$value.'" '.$attr_str.'/>'; }
function html_radio($name, $checked=false, $value=1, $attributes=array()){ if ($checked) { $attributes['checked'] = 'checked'; } $attr_str = html_attr_str($attributes); $class = 'input-radio'; if (isset($attributes['class'])) { $class .= ' '.$attributes['class']; } return '<input type="radio" class="form-check-input '.$class.'" name="'.$name.'" value="'.$value.'" '.$attr_str.'/>'; }
https://github.com/instantsoft/icms2/blob/b62f9f95a67019d5ab6dee9c9edc558cb7bf0a70/system/libs/template.helper.php#L98 Предлагаю эту функцию привести к виду https://getbootstrap.com/docs/5.0/forms/checks-radios/#radios
function html_radio($name, $checked=false, $value=1, $attributes=array()){ if ($checked) { $attributes['checked'] = 'checked'; } $attr_str = html_attr_str($attributes); $class = 'input-radio'; if (isset($attributes['class'])) { $class .= ' '.$attributes['class']; } return '<input type="radio" class="form-check-input '.$class.'" name="'.$name.'" value="'.$value.'" '.$attr_str.'/>'; }