Skip to content

Commit

Permalink
fix(radiosfield): prevent css to apply on plain html radios
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Nov 16, 2020
1 parent 3857b00 commit e7eb2bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ form#plugin_formcreator_form {
}

#plugin_formcreator_form input[type = checkbox]:focus + label,
#plugin_formcreator_form input[type = radio]:focus + label,
#plugin_formcreator_form input[type = radio].new_radio:focus + label,
#plugin_formcreator_form input[type = file]:focus {
color: #66afe9;
color: rgba(102,175,233, 1);
Expand Down Expand Up @@ -430,31 +430,31 @@ form#plugin_formcreator_form {
.radios .form-group-radio + label {
margin-left: 7px;
}
input[type = radio] {
input[type = radio].new_radio {
display: none;
}
.label-radio .radio {
padding: 2px 0;
}
input[type = radio] + label.label-radio span {
input[type = radio].new_radio + label.label-radio span {
display: inline-block;
position: absolute;
width: 16px;
height: 16px;
}
input[type = radio] + label.label-radio .box {
input[type = radio].new_radio + label.label-radio .box {
background-color: #fff;
border: 2px solid #727272;
border-radius: 50%;
}
input[type = radio] + label.label-radio .check {
input[type = radio].new_radio + label.label-radio .check {
left: 4px;
top: 4px;
width: 0px;
height: 0px;
opacity: 0;
}
input[type = radio]:checked + label.label-radio .check {
input[type = radio].new_radio:checked + label.label-radio .check {
border: 6px solid #727272;
border-radius: 50%;
transition: opacity 0.3s ease;
Expand Down Expand Up @@ -1099,7 +1099,7 @@ a.plugin_formcreator_formTile_title {
opacity: 1;
color: #3874BC;
}
.plugin_formcreator_sort:hover .radios input[type = radio] + label:before {
.plugin_formcreator_sort:hover .radios input[type = radio].new_radio + label:before {
background-color: #3874BC;
border: 2px solid #3874BC;
}
Expand All @@ -1110,7 +1110,7 @@ a.plugin_formcreator_formTile_title {
text-align: left;
margin: 0 20px;
}
.plugin_formcreator_sort .radios input[type = radio] + label {
.plugin_formcreator_sort .radios input[type = radio].new_radio + label {
display: inline-block;
margin-right: 10px;
}
Expand Down
2 changes: 1 addition & 1 deletion inc/field/radiosfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getRenderedHtml($canEdit = true) {
$html .= '<span class="form-group-radio">';
$html .= Html::input($fieldName, [
'type' => 'radio',
'class' => 'form-control',
'class' => 'new_radio form-control',
'id' => $domId . '_' . $i,
'value' => $value
] + $checked);
Expand Down

0 comments on commit e7eb2bd

Please sign in to comment.